diff options
author | Srinu Jella <sjella@codeaurora.org> | 2015-11-02 17:00:38 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-11-06 03:02:55 -0800 |
commit | b6fff8a1418a91db1afed22ad910d7f0901cc481 (patch) | |
tree | aaa4029d4590dcce0ec1b203046c6ba9d184fd2e | |
parent | 0e3889d76e8b1c6156835e818f1eec41397796e5 (diff) | |
download | android_system_bt-b6fff8a1418a91db1afed22ad910d7f0901cc481.tar.gz android_system_bt-b6fff8a1418a91db1afed22ad910d7f0901cc481.tar.bz2 android_system_bt-b6fff8a1418a91db1afed22ad910d7f0901cc481.zip |
Bluetooth: Correct the max sdu length used from BT-IF layer
- Correct the max sdu length used from BT-IF layer to be in
sync with max sdu calculation from L2cap layer.
- max sdu of l2cap layer will be communicated to the upper
layers, and same length of sdu being sent from upper layer
to BT-IF layer, but because of change in the max sdu of
BT-IF, it will receive less bytes than expected will lead
to form incomplete PUT request.
CRs-Fixed: 932092
Change-Id: Ie037c85e798bebf6a71c56488aae37455725028c
-rw-r--r-- | stack/include/l2cdefs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stack/include/l2cdefs.h b/stack/include/l2cdefs.h index e24ae2720..cb6f9d829 100644 --- a/stack/include/l2cdefs.h +++ b/stack/include/l2cdefs.h @@ -302,10 +302,12 @@ #define L2CAP_EXT_CONTROL_OVERHEAD 4 /* Extended Control Field */ #define L2CAP_MAX_HEADER_FCS (L2CAP_PKT_OVERHEAD + L2CAP_EXT_CONTROL_OVERHEAD + L2CAP_SDU_LEN_OVERHEAD + L2CAP_FCS_LEN) /* length(2), channel(2), control(4), SDU length(2) FCS(2) */ + /* To optimize this, it must be a multiplum of the L2CAP PDU length AND match the 3DH5 air * including the l2cap headers in each packet - to match the latter - the -5 is added + * Changed it to 8087 to have same value between BTIF and L2cap layers */ -#define L2CAP_MAX_SDU_LENGTH (GKI_BUF4_SIZE - (L2CAP_MIN_OFFSET + L2CAP_MAX_HEADER_FCS) -5) +#define L2CAP_MAX_SDU_LENGTH (GKI_BUF4_SIZE - (L2CAP_MIN_OFFSET + 6)) /* Part of L2CAP_MIN_OFFSET that is not part of L2CAP */ |