Bluetooth: Remove LE fixed channel mask bits
Subsystems (2)
PATCH 1/2 Bluetooth: Remove LE fixed channel mask bits
From: Johan Hedberg <[email protected]>
The LE fixed channels are never exposed through the supported channels bit mask so just remove their defines to avoid any mistaken usage.
--- include/net/bluetooth/l2cap.h | 3 --- 1 file changed, 3 deletions(-)
include/net/bluetooth/l2cap.h +0 -3
@@ -137,9 +137,6 @@ struct l2cap_conninfo {#define L2CAP_FC_SIG_BREDR 0x02#define L2CAP_FC_CONNLESS 0x04#define L2CAP_FC_A2MP 0x08 -#define L2CAP_FC_ATT 0x10 -#define L2CAP_FC_SIG_LE 0x20 -#define L2CAP_FC_SMP_LE 0x40/* L2CAP Control Field bit masks */ #define L2CAP_CTRL_SAR 0xC000
Signature · 1 line
1.9.3
PATCH 2/2 Bluetooth: Add clarifying comment for LE CoC result value
From: Johan Hedberg <[email protected]>
The "pending" L2CAP response value is not defined for LE CoC. This patch adds a clarifying comment to the code so that the reader will not think there is a bug in trying to use this value for LE CoC.
--- net/bluetooth/l2cap_core.c | 5 +++++ 1 file changed, 5 insertions(+)
net/bluetooth/l2cap_core.c +5 -0
@@ -5413,6 +5413,11 @@ static int l2cap_le_connect_req(struct l2cap_conn *conn,if (test_bit (FLAG_DEFER_SETUP , &chan->flags)) {l2cap_state_change (chan,BT_CONNECT2 ); +/* The following result value is actually not defined +* for LE CoC but we use it to let the function know +* that it should bail out after doing its cleanup +* instead of sending a response. +*/ result =L2CAP_CR_PEND ; chan->ops->defer (chan); }else {
Signature · 1 line
1.9.3
Marcel Holtmann
maintainerRe: [PATCH 2/2] Bluetooth: Add clarifying comment for LE CoC result value
Hi Johan,
Quoted 8 lines
The "pending" L2CAP response value is not defined for LE CoC. This patch adds a clarifying comment to the code so that the reader will not think there is a bug in trying to use this value for LE CoC.
Signed-off-by Johan Hedberg <[email protected]>---
net/bluetooth/l2cap_core.c| 5 +++++1 file changed, 5 insertions(+)
patch has been applied to bluetooth-next tree.
Regards
Marcel
Marcel Holtmann
maintainerHi Johan,
Quoted 13 lines
The LE fixed channels are never exposed through the supported channels bit mask so just remove their defines to avoid any mistaken usage.
Signed-off-by Johan Hedberg <[email protected]>---
include/net/bluetooth/l2cap.h| 3 ---1 file changed, 3 deletions(-)include/net/bluetooth/l2cap.h +0
-0
include/net/bluetooth/l2cap.h struct l2cap_conninfo { · line 142
Quoted 6 lines
include/net/bluetooth/l2cap.h +0
-3@@ -137,9 +137,6 @@ struct l2cap_conninfo {#define L2CAP_FC_SIG_BREDR 0x02#define L2CAP_FC_CONNLESS 0x04#define L2CAP_FC_A2MP 0x08 -#define L2CAP_FC_ATT 0x10 -#define L2CAP_FC_SIG_LE 0x20 -#define L2CAP_FC_SMP_LE 0x40
actually I put these into on purpose. Mainly for the broken Bluedroid stack that requires L2CAP_FC_ATT to be set to allow ATT over BR/EDR working correctly. So even while they are not valid for BR/EDR and fixed channel info is not (yet) defined for LE, I prefer we keep them here for completeness.
Regards
Marcel