diff options
| author | Johan Hedberg <johan.hedberg@intel.com> | 2013-05-13 05:15:39 -0400 |
|---|---|---|
| committer | Marcel Holtmann <marcel@holtmann.org> | 2013-12-05 10:05:32 -0500 |
| commit | ee5ec5cf00760b8810f7e3350b82434092a960e3 (patch) | |
| tree | c2a87087c89b91e90af6910f8357d28290d84205 /include | |
| parent | 96ac34fb4050e358eed55ac93572f58191a304aa (diff) | |
Bluetooth: Add definitions for LE connection oriented channels
This patch adds the necessary defines and structs for LE connection
oriented channels.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/net/bluetooth/l2cap.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 94645d56fea7..84c0754b87dc 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
| @@ -112,6 +112,9 @@ struct l2cap_conninfo { | |||
| 112 | #define L2CAP_MOVE_CHAN_CFM_RSP 0x11 | 112 | #define L2CAP_MOVE_CHAN_CFM_RSP 0x11 |
| 113 | #define L2CAP_CONN_PARAM_UPDATE_REQ 0x12 | 113 | #define L2CAP_CONN_PARAM_UPDATE_REQ 0x12 |
| 114 | #define L2CAP_CONN_PARAM_UPDATE_RSP 0x13 | 114 | #define L2CAP_CONN_PARAM_UPDATE_RSP 0x13 |
| 115 | #define L2CAP_LE_CONN_REQ 0x14 | ||
| 116 | #define L2CAP_LE_CONN_RSP 0x15 | ||
| 117 | #define L2CAP_LE_CREDITS 0x16 | ||
| 115 | 118 | ||
| 116 | /* L2CAP extended feature mask */ | 119 | /* L2CAP extended feature mask */ |
| 117 | #define L2CAP_FEAT_FLOWCTL 0x00000001 | 120 | #define L2CAP_FEAT_FLOWCTL 0x00000001 |
| @@ -257,6 +260,10 @@ struct l2cap_conn_rsp { | |||
| 257 | #define L2CAP_CR_SEC_BLOCK 0x0003 | 260 | #define L2CAP_CR_SEC_BLOCK 0x0003 |
| 258 | #define L2CAP_CR_NO_MEM 0x0004 | 261 | #define L2CAP_CR_NO_MEM 0x0004 |
| 259 | #define L2CAP_CR_BAD_AMP 0x0005 | 262 | #define L2CAP_CR_BAD_AMP 0x0005 |
| 263 | #define L2CAP_CR_AUTHENTICATION 0x0005 | ||
| 264 | #define L2CAP_CR_AUTHORIZATION 0x0006 | ||
| 265 | #define L2CAP_CR_BAD_KEY_SIZE 0x0007 | ||
| 266 | #define L2CAP_CR_ENCRYPTION 0x0008 | ||
| 260 | 267 | ||
| 261 | /* connect/create channel status */ | 268 | /* connect/create channel status */ |
| 262 | #define L2CAP_CS_NO_INFO 0x0000 | 269 | #define L2CAP_CS_NO_INFO 0x0000 |
| @@ -423,6 +430,30 @@ struct l2cap_conn_param_update_rsp { | |||
| 423 | #define L2CAP_CONN_PARAM_ACCEPTED 0x0000 | 430 | #define L2CAP_CONN_PARAM_ACCEPTED 0x0000 |
| 424 | #define L2CAP_CONN_PARAM_REJECTED 0x0001 | 431 | #define L2CAP_CONN_PARAM_REJECTED 0x0001 |
| 425 | 432 | ||
| 433 | #define L2CAP_LE_MAX_CREDITS 10 | ||
| 434 | #define L2CAP_LE_DEFAULT_MPS 230 | ||
| 435 | |||
| 436 | struct l2cap_le_conn_req { | ||
| 437 | __le16 psm; | ||
| 438 | __le16 scid; | ||
| 439 | __le16 mtu; | ||
| 440 | __le16 mps; | ||
| 441 | __le16 credits; | ||
| 442 | } __packed; | ||
| 443 | |||
| 444 | struct l2cap_le_conn_rsp { | ||
| 445 | __le16 dcid; | ||
| 446 | __le16 mtu; | ||
| 447 | __le16 mps; | ||
| 448 | __le16 credits; | ||
| 449 | __le16 result; | ||
| 450 | } __packed; | ||
| 451 | |||
| 452 | struct l2cap_le_credits { | ||
| 453 | __le16 cid; | ||
| 454 | __le16 credits; | ||
| 455 | } __packed; | ||
| 456 | |||
| 426 | /* ----- L2CAP channels and connections ----- */ | 457 | /* ----- L2CAP channels and connections ----- */ |
| 427 | struct l2cap_seq_list { | 458 | struct l2cap_seq_list { |
| 428 | __u16 head; | 459 | __u16 head; |
