diff options
author | Andrei Emeltchenko <andrei.emeltchenko@intel.com> | 2011-10-11 06:37:43 -0400 |
---|---|---|
committer | Gustavo F. Padovan <padovan@profusion.mobi> | 2011-10-13 15:44:41 -0400 |
commit | 57253fd8c91e76780e9628451f680efcbcc52c85 (patch) | |
tree | bfc37d8b5932de8d118954e0d4c2baf327371cfe /include/net/bluetooth | |
parent | 6327eb980d2ff0c96363b81cb0ce580165cb81b8 (diff) |
Bluetooth: EWS: adds ext control field bit mask
Adds extended control field bit masks and rearrange defines to logical
groups: masks, flags and shift groups.
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'include/net/bluetooth')
-rw-r--r-- | include/net/bluetooth/l2cap.h | 41 |
1 files changed, 29 insertions, 12 deletions
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 51998ff6b8ca..fa7edabde4d9 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -109,18 +109,35 @@ struct l2cap_conninfo { | |||
109 | #define L2CAP_FCS_CRC16 0x01 | 109 | #define L2CAP_FCS_CRC16 0x01 |
110 | 110 | ||
111 | /* L2CAP Control Field bit masks */ | 111 | /* L2CAP Control Field bit masks */ |
112 | #define L2CAP_CTRL_SAR 0xC000 | 112 | #define L2CAP_CTRL_SAR 0xC000 |
113 | #define L2CAP_CTRL_REQSEQ 0x3F00 | 113 | #define L2CAP_CTRL_REQSEQ 0x3F00 |
114 | #define L2CAP_CTRL_TXSEQ 0x007E | 114 | #define L2CAP_CTRL_TXSEQ 0x007E |
115 | #define L2CAP_CTRL_RETRANS 0x0080 | 115 | #define L2CAP_CTRL_SUPERVISE 0x000C |
116 | #define L2CAP_CTRL_FINAL 0x0080 | 116 | |
117 | #define L2CAP_CTRL_POLL 0x0010 | 117 | #define L2CAP_CTRL_RETRANS 0x0080 |
118 | #define L2CAP_CTRL_SUPERVISE 0x000C | 118 | #define L2CAP_CTRL_FINAL 0x0080 |
119 | #define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */ | 119 | #define L2CAP_CTRL_POLL 0x0010 |
120 | 120 | #define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */ | |
121 | #define L2CAP_CTRL_TXSEQ_SHIFT 1 | 121 | |
122 | #define L2CAP_CTRL_REQSEQ_SHIFT 8 | 122 | #define L2CAP_CTRL_TXSEQ_SHIFT 1 |
123 | #define L2CAP_CTRL_SAR_SHIFT 14 | 123 | #define L2CAP_CTRL_SUPER_SHIFT 2 |
124 | #define L2CAP_CTRL_REQSEQ_SHIFT 8 | ||
125 | #define L2CAP_CTRL_SAR_SHIFT 14 | ||
126 | |||
127 | /* L2CAP Extended Control Field bit mask */ | ||
128 | #define L2CAP_EXT_CTRL_TXSEQ 0xFFFC0000 | ||
129 | #define L2CAP_EXT_CTRL_SAR 0x00030000 | ||
130 | #define L2CAP_EXT_CTRL_SUPERVISE 0x00030000 | ||
131 | #define L2CAP_EXT_CTRL_REQSEQ 0x0000FFFC | ||
132 | |||
133 | #define L2CAP_EXT_CTRL_POLL 0x00040000 | ||
134 | #define L2CAP_EXT_CTRL_FINAL 0x00000002 | ||
135 | #define L2CAP_EXT_CTRL_FRAME_TYPE 0x00000001 /* I- or S-Frame */ | ||
136 | |||
137 | #define L2CAP_EXT_CTRL_REQSEQ_SHIFT 2 | ||
138 | #define L2CAP_EXT_CTRL_SAR_SHIFT 16 | ||
139 | #define L2CAP_EXT_CTRL_SUPER_SHIFT 16 | ||
140 | #define L2CAP_EXT_CTRL_TXSEQ_SHIFT 18 | ||
124 | 141 | ||
125 | /* L2CAP Supervisory Function */ | 142 | /* L2CAP Supervisory Function */ |
126 | #define L2CAP_SUPER_RCV_READY 0x0000 | 143 | #define L2CAP_SUPER_RCV_READY 0x0000 |