Skip to content

Commit 15f02b9

Browse files
Vudentzholtmann
authored andcommitted
Bluetooth: L2CAP: Add initial code for Enhanced Credit Based Mode
This adds the initial code for Enhanced Credit Based Mode which introduces a new socket mode called L2CAP_MODE_EXT_FLOWCTL, which for the most part work the same as L2CAP_MODE_LE_FLOWCTL but uses different PDUs to setup the connections and also works over BR/EDR. Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
1 parent 1457209 commit 15f02b9

3 files changed

Lines changed: 552 additions & 20 deletions

File tree

‎include/net/bluetooth/l2cap.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ struct l2cap_conn_rsp {
294294
#define L2CAP_CR_LE_ENCRYPTION 0x0008
295295
#define L2CAP_CR_LE_INVALID_SCID 0x0009
296296
#define L2CAP_CR_LE_SCID_IN_USE 0X000A
297+
#define L2CAP_CR_LE_UNACCEPT_PARAMS 0X000B
298+
#define L2CAP_CR_LE_INVALID_PARAMS 0X000C
297299

298300
/* connect/create channel status */
299301
#define L2CAP_CS_NO_INFO 0x0000
@@ -962,6 +964,7 @@ void l2cap_cleanup_sockets(void);
962964
bool l2cap_is_socket(struct socket *sock);
963965

964966
void __l2cap_le_connect_rsp_defer(struct l2cap_chan *chan);
967+
void __l2cap_ecred_conn_rsp_defer(struct l2cap_chan *chan);
965968
void __l2cap_connect_rsp_defer(struct l2cap_chan *chan);
966969

967970
int l2cap_add_psm(struct l2cap_chan *chan, bdaddr_t *src, __le16 psm);
@@ -971,6 +974,7 @@ struct l2cap_chan *l2cap_chan_create(void);
971974
void l2cap_chan_close(struct l2cap_chan *chan, int reason);
972975
int l2cap_chan_connect(struct l2cap_chan *chan, __le16 psm, u16 cid,
973976
bdaddr_t *dst, u8 dst_type);
977+
int l2cap_chan_reconfigure(struct l2cap_chan *chan, __u16 mtu);
974978
int l2cap_chan_send(struct l2cap_chan *chan, struct msghdr *msg, size_t len);
975979
void l2cap_chan_busy(struct l2cap_chan *chan, int busy);
976980
int l2cap_chan_check_security(struct l2cap_chan *chan, bool initiator);

0 commit comments

Comments
 (0)