Skip to content

Commit 57253fd

Browse files
finikorgGustavo F. Padovan
authored andcommitted
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>
1 parent 6327eb9 commit 57253fd

1 file changed

Lines changed: 29 additions & 12 deletions

File tree

‎include/net/bluetooth/l2cap.h‎

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -109,18 +109,35 @@ struct l2cap_conninfo {
109109
#define L2CAP_FCS_CRC16 0x01
110110

111111
/* L2CAP Control Field bit masks */
112-
#define L2CAP_CTRL_SAR 0xC000
113-
#define L2CAP_CTRL_REQSEQ 0x3F00
114-
#define L2CAP_CTRL_TXSEQ 0x007E
115-
#define L2CAP_CTRL_RETRANS 0x0080
116-
#define L2CAP_CTRL_FINAL 0x0080
117-
#define L2CAP_CTRL_POLL 0x0010
118-
#define L2CAP_CTRL_SUPERVISE 0x000C
119-
#define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */
120-
121-
#define L2CAP_CTRL_TXSEQ_SHIFT 1
122-
#define L2CAP_CTRL_REQSEQ_SHIFT 8
123-
#define L2CAP_CTRL_SAR_SHIFT 14
112+
#define L2CAP_CTRL_SAR 0xC000
113+
#define L2CAP_CTRL_REQSEQ 0x3F00
114+
#define L2CAP_CTRL_TXSEQ 0x007E
115+
#define L2CAP_CTRL_SUPERVISE 0x000C
116+
117+
#define L2CAP_CTRL_RETRANS 0x0080
118+
#define L2CAP_CTRL_FINAL 0x0080
119+
#define L2CAP_CTRL_POLL 0x0010
120+
#define L2CAP_CTRL_FRAME_TYPE 0x0001 /* I- or S-Frame */
121+
122+
#define L2CAP_CTRL_TXSEQ_SHIFT 1
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
124141

125142
/* L2CAP Supervisory Function */
126143
#define L2CAP_SUPER_RCV_READY 0x0000

0 commit comments

Comments
 (0)