Bluetooth: L2CAP: Add definitions introduced in 5.2

This introduces new Enhanced Credit Based Flow Control PDUs and related
definitions which were introduced in 5.2.

Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2020-02-26 10:27:23 -08:00 committed by Johan Hedberg
commit 95e109bc8e

View file

@ -174,6 +174,7 @@ struct bt_l2cap_le_conn_req {
#define BT_L2CAP_LE_ERR_INVALID_SCID 0x0009 #define BT_L2CAP_LE_ERR_INVALID_SCID 0x0009
#define BT_L2CAP_LE_ERR_SCID_IN_USE 0x000A #define BT_L2CAP_LE_ERR_SCID_IN_USE 0x000A
#define BT_L2CAP_LE_ERR_UNACCEPT_PARAMS 0x000B #define BT_L2CAP_LE_ERR_UNACCEPT_PARAMS 0x000B
#define BT_L2CAP_LE_ERR_INVALID_PARAMS 0x000C
#define BT_L2CAP_LE_CONN_RSP 0x15 #define BT_L2CAP_LE_CONN_RSP 0x15
struct bt_l2cap_le_conn_rsp { struct bt_l2cap_le_conn_rsp {
@ -190,6 +191,40 @@ struct bt_l2cap_le_credits {
u16_t credits; u16_t credits;
} __packed; } __packed;
#define BT_L2CAP_ECRED_CONN_REQ 0x17
struct bt_l2cap_ecred_conn_req {
u16_t psm;
u16_t mtu;
u16_t mps;
u16_t credits;
u16_t scid[0];
} __packed;
#define BT_L2CAP_ECRED_CONN_RSP 0x18
struct bt_l2cap_ecred_conn_rsp {
u16_t mtu;
u16_t mps;
u16_t credits;
u16_t result;
u16_t dcid[0];
} __packed;
#define BT_L2CAP_ECRED_RECONF_REQ 0x19
struct bt_l2cap_ecred_reconf_req {
u16_t mtu;
u16_t mps;
u16_t scid[0];
} __packed;
#define BT_L2CAP_RECONF_SUCCESS 0x0000
#define BT_L2CAP_RECONF_INVALID_MTU 0x0001
#define BT_L2CAP_RECONF_INVALID_MPS 0x0002
#define BT_L2CAP_ECRED_RECONF_RSP 0x1a
struct bt_l2cap_ecred_reconf_rsp {
u16_t result;
} __packed;
#define BT_L2CAP_SDU_HDR_LEN 2 #define BT_L2CAP_SDU_HDR_LEN 2
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL) #if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)