xref: /OK3568_Linux_fs/external/rkwifibt/drivers/bcmdhd/include/802.11s.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * Fundamental types and constants relating to 802.11s Mesh
3*4882a593Smuzhiyun  *
4*4882a593Smuzhiyun  * Copyright (C) 2020, Broadcom.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  *      Unless you and Broadcom execute a separate written software license
7*4882a593Smuzhiyun  * agreement governing use of this software, this software is licensed to you
8*4882a593Smuzhiyun  * under the terms of the GNU General Public License version 2 (the "GPL"),
9*4882a593Smuzhiyun  * available at http://www.broadcom.com/licenses/GPLv2.php, with the
10*4882a593Smuzhiyun  * following added to such license:
11*4882a593Smuzhiyun  *
12*4882a593Smuzhiyun  *      As a special exception, the copyright holders of this software give you
13*4882a593Smuzhiyun  * permission to link this software with independent modules, and to copy and
14*4882a593Smuzhiyun  * distribute the resulting executable under terms of your choice, provided that
15*4882a593Smuzhiyun  * you also meet, for each linked independent module, the terms and conditions of
16*4882a593Smuzhiyun  * the license of that module.  An independent module is a module which is not
17*4882a593Smuzhiyun  * derived from this software.  The special exception does not apply to any
18*4882a593Smuzhiyun  * modifications of the software.
19*4882a593Smuzhiyun  *
20*4882a593Smuzhiyun  *
21*4882a593Smuzhiyun  * <<Broadcom-WL-IPTag/Dual:>>
22*4882a593Smuzhiyun  */
23*4882a593Smuzhiyun 
24*4882a593Smuzhiyun #ifndef _802_11s_h_
25*4882a593Smuzhiyun #define _802_11s_h_
26*4882a593Smuzhiyun 
27*4882a593Smuzhiyun /* This marks the start of a packed structure section. */
28*4882a593Smuzhiyun #include <packed_section_start.h>
29*4882a593Smuzhiyun 
30*4882a593Smuzhiyun #define DOT11_MESH_FLAGS_AE_MASK	0x3u
31*4882a593Smuzhiyun #define DOT11_MESH_FLAGS_AE_SHIFT	0u
32*4882a593Smuzhiyun 
33*4882a593Smuzhiyun /* Mesh Control Flags: Address Exetension mode values */
34*4882a593Smuzhiyun #define DOT11_MESH_AE_NONE              0u
35*4882a593Smuzhiyun #define DOT11_MESH_AE_A4                1u
36*4882a593Smuzhiyun #define DOT11_MESH_AE_A5_A6             2u
37*4882a593Smuzhiyun 
38*4882a593Smuzhiyun #define DOT11_MESH_CONNECTED_AS_SET         7
39*4882a593Smuzhiyun #define DOT11_MESH_NUMBER_PEERING_SET       1
40*4882a593Smuzhiyun #define DOT11_MESH_MESH_GWSET               0
41*4882a593Smuzhiyun 
42*4882a593Smuzhiyun #define DOT11_MESH_ACTION_LINK_MET_REP      0
43*4882a593Smuzhiyun #define DOT11_MESH_ACTION_PATH_SEL          1
44*4882a593Smuzhiyun #define DOT11_MESH_ACTION_GATE_ANN          2
45*4882a593Smuzhiyun #define DOT11_MESH_ACTION_CONG_CONT_NOTIF   3
46*4882a593Smuzhiyun #define DOT11_MESH_ACTION_MCCA_SETUP_REQ    4
47*4882a593Smuzhiyun #define DOT11_MESH_ACTION_MCCA_SETUP_REP    5
48*4882a593Smuzhiyun #define DOT11_MESH_ACTION_MCCA_ADVT_REQ     6
49*4882a593Smuzhiyun #define DOT11_MESH_ACTION_MCCA_ADVT         7
50*4882a593Smuzhiyun #define DOT11_MESH_ACTION_MCCA_TEARDOWN     8
51*4882a593Smuzhiyun #define DOT11_MESH_ACTION_TBTT_ADJ_REQ      9
52*4882a593Smuzhiyun #define DOT11_MESH_ACTION_TBTT_ADJ_RESP     10
53*4882a593Smuzhiyun 
54*4882a593Smuzhiyun /* self-protected action field values: 7-57v24 */
55*4882a593Smuzhiyun #define DOT11_SELFPROT_ACTION_MESH_PEER_OPEN    1
56*4882a593Smuzhiyun #define DOT11_SELFPROT_ACTION_MESH_PEER_CONFM   2
57*4882a593Smuzhiyun #define DOT11_SELFPROT_ACTION_MESH_PEER_CLOSE   3
58*4882a593Smuzhiyun #define DOT11_SELFPROT_ACTION_MESH_PEER_GK_INF  4
59*4882a593Smuzhiyun #define DOT11_SELFPROT_ACTION_MESH_PEER_GK_ACK  5
60*4882a593Smuzhiyun 
61*4882a593Smuzhiyun #define DOT11_MESH_AUTH_PROTO_NONE        0
62*4882a593Smuzhiyun #define DOT11_MESH_AUTH_PROTO_SAE         1
63*4882a593Smuzhiyun #define DOT11_MESH_AUTH_PROTO_8021X       2
64*4882a593Smuzhiyun #define DOT11_MESH_AUTH_PROTO_VS        255
65*4882a593Smuzhiyun 
66*4882a593Smuzhiyun #define DOT11_MESH_PATHSEL_LEN   2
67*4882a593Smuzhiyun #define DOT11_MESH_PERR_LEN1     2   /* Least PERR length fixed */
68*4882a593Smuzhiyun #define DOT11_MESH_PERR_LEN2     13  /* Least PERR length variable */
69*4882a593Smuzhiyun #define DOT11_MESH_PREP_LEN      31  /* Least PREP length */
70*4882a593Smuzhiyun #define DOT11_MESH_PREQ_LEN      37  /* Least PREQ length */
71*4882a593Smuzhiyun 
72*4882a593Smuzhiyun #define DOT11_MESH_PATHSEL_PROTID_HWMP    1
73*4882a593Smuzhiyun #define DOT11_MESH_PATHSEL_METRICID_ALM   1 /* Air link metric */
74*4882a593Smuzhiyun #define DOT11_MESH_CONGESTCTRL_NONE       0
75*4882a593Smuzhiyun #define DOT11_MESH_CONGESTCTRL_SP         1
76*4882a593Smuzhiyun #define DOT11_MESH_SYNCMETHOD_NOFFSET     1
77*4882a593Smuzhiyun 
78*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct dot11_meshctrl_hdr {
79*4882a593Smuzhiyun 	uint8               flags;      /* flag bits such as ae etc */
80*4882a593Smuzhiyun 	uint8               ttl;        /* time to live */
81*4882a593Smuzhiyun 	uint32              seq;        /* sequence control */
82*4882a593Smuzhiyun 	struct ether_addr   a5;         /* optional address 5 */
83*4882a593Smuzhiyun 	struct ether_addr   a6;         /* optional address 6 */
84*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
85*4882a593Smuzhiyun 
86*4882a593Smuzhiyun #define DOT11_MESH_CONTROL_MIN_LEN      6u
87*4882a593Smuzhiyun #define DOT11_MESH_CONTROL_A4_LEN      12u
88*4882a593Smuzhiyun #define DOT11_MESH_CONTROL_A5A6_LEN    18u
89*4882a593Smuzhiyun 
90*4882a593Smuzhiyun /* Mesh Path Selection Action Frame */
91*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct dot11_mesh_pathsel {
92*4882a593Smuzhiyun 	uint8   category;
93*4882a593Smuzhiyun 	uint8   meshaction;
94*4882a593Smuzhiyun 	uint8   data[];
95*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
96*4882a593Smuzhiyun typedef struct dot11_mesh_pathsel dot11_mesh_pathsel_t;
97*4882a593Smuzhiyun 
98*4882a593Smuzhiyun /*  Mesh PREQ IE */
99*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_preq_ie {
100*4882a593Smuzhiyun 	uint8   id;
101*4882a593Smuzhiyun 	uint8   len;
102*4882a593Smuzhiyun 	uint8   flags;
103*4882a593Smuzhiyun 	uint8   hop_count;
104*4882a593Smuzhiyun 	uint8   ttl;
105*4882a593Smuzhiyun 	uint32  pathdis_id;
106*4882a593Smuzhiyun 	struct  ether_addr  originator_addr;
107*4882a593Smuzhiyun 	uint32  originator_seq;
108*4882a593Smuzhiyun 	union {
109*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
110*4882a593Smuzhiyun 			struct ether_addr target_ext_add;
111*4882a593Smuzhiyun 			uint32  lifetime;
112*4882a593Smuzhiyun 			uint32  metric;
113*4882a593Smuzhiyun 			uint8   target_count;
114*4882a593Smuzhiyun 			uint8   data[];
115*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT oea;
116*4882a593Smuzhiyun 
117*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
118*4882a593Smuzhiyun 			uint32  lifetime;
119*4882a593Smuzhiyun 			uint32  metric;
120*4882a593Smuzhiyun 			uint8   target_count;
121*4882a593Smuzhiyun 			uint8   data[];
122*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT noea;
123*4882a593Smuzhiyun 	} u;
124*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
125*4882a593Smuzhiyun typedef struct mesh_preq_ie mesh_preq_ie_t;
126*4882a593Smuzhiyun 
127*4882a593Smuzhiyun /* Target info (part of Mesh PREQ IE) */
128*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_targetinfo {
129*4882a593Smuzhiyun 	uint8	target_flag;
130*4882a593Smuzhiyun 	struct	ether_addr	target_addr;
131*4882a593Smuzhiyun 	uint32	target_seq;
132*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
133*4882a593Smuzhiyun typedef struct mesh_targetinfo mesh_targetinfo_t;
134*4882a593Smuzhiyun 
135*4882a593Smuzhiyun /* Mesh PREP IE */
136*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_prep_ie {
137*4882a593Smuzhiyun 	uint8	id;
138*4882a593Smuzhiyun 	uint8	len;
139*4882a593Smuzhiyun 	uint8	flags;
140*4882a593Smuzhiyun 	uint8	hop_count;
141*4882a593Smuzhiyun 	uint8	ttl;
142*4882a593Smuzhiyun 	struct	ether_addr	target_addr;
143*4882a593Smuzhiyun 	uint32	target_seq;
144*4882a593Smuzhiyun 	union {
145*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
146*4882a593Smuzhiyun 			struct ether_addr target_ext_add;
147*4882a593Smuzhiyun 			uint32  lifetime;
148*4882a593Smuzhiyun 			uint32  metric;
149*4882a593Smuzhiyun 			uint8   target_count;
150*4882a593Smuzhiyun 	                struct	ether_addr	originator_addr;
151*4882a593Smuzhiyun 	                uint32	originator_seq;
152*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT oea;
153*4882a593Smuzhiyun 
154*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
155*4882a593Smuzhiyun 			uint32  lifetime;
156*4882a593Smuzhiyun 			uint32  metric;
157*4882a593Smuzhiyun 			uint8   target_count;
158*4882a593Smuzhiyun 	                struct	ether_addr	originator_addr;
159*4882a593Smuzhiyun 	                uint32	originator_seq;
160*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT noea;
161*4882a593Smuzhiyun 	} u;
162*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
163*4882a593Smuzhiyun typedef struct mesh_prep_ie mesh_prep_ie_t;
164*4882a593Smuzhiyun 
165*4882a593Smuzhiyun /* Mesh PERR IE */
166*4882a593Smuzhiyun struct mesh_perr_ie {
167*4882a593Smuzhiyun 	uint8	id;
168*4882a593Smuzhiyun 	uint8	len;
169*4882a593Smuzhiyun 	uint8	ttl;
170*4882a593Smuzhiyun 	uint8	num_dest;
171*4882a593Smuzhiyun 	uint8	data[];
172*4882a593Smuzhiyun };
173*4882a593Smuzhiyun typedef struct mesh_perr_ie mesh_perr_ie_t;
174*4882a593Smuzhiyun 
175*4882a593Smuzhiyun /* Destination info is part of PERR IE */
176*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_perr_destinfo {
177*4882a593Smuzhiyun 	uint8	flags;
178*4882a593Smuzhiyun 	struct	ether_addr	destination_addr;
179*4882a593Smuzhiyun 	uint32	dest_seq;
180*4882a593Smuzhiyun 	union {
181*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
182*4882a593Smuzhiyun 			struct  ether_addr      dest_ext_addr;
183*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT dea;
184*4882a593Smuzhiyun 
185*4882a593Smuzhiyun 		BWL_PRE_PACKED_STRUCT struct {
186*4882a593Smuzhiyun 		/* 1 byte reason code to be populated manually in software */
187*4882a593Smuzhiyun 			uint16	reason_code;
188*4882a593Smuzhiyun 		} BWL_POST_PACKED_STRUCT nodea;
189*4882a593Smuzhiyun 	} u;
190*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
191*4882a593Smuzhiyun typedef struct mesh_perr_destinfo mesh_perr_destinfo_t;
192*4882a593Smuzhiyun 
193*4882a593Smuzhiyun /* Mesh peering action frame hdr */
194*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_peering_frmhdr {
195*4882a593Smuzhiyun 	uint8	category;
196*4882a593Smuzhiyun 	uint8	action;
197*4882a593Smuzhiyun 	union	{
198*4882a593Smuzhiyun 		struct {
199*4882a593Smuzhiyun 			uint16	capability;
200*4882a593Smuzhiyun 		} open;
201*4882a593Smuzhiyun 		struct {
202*4882a593Smuzhiyun 			uint16	capability;
203*4882a593Smuzhiyun 			uint16	AID;
204*4882a593Smuzhiyun 		} confirm;
205*4882a593Smuzhiyun 		uint8 data[1];
206*4882a593Smuzhiyun 	} u;
207*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
208*4882a593Smuzhiyun typedef struct mesh_peering_frmhdr mesh_peering_frmhdr_t;
209*4882a593Smuzhiyun 
210*4882a593Smuzhiyun /* Mesh peering mgmt IE */
211*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_peer_mgmt_ie_common {
212*4882a593Smuzhiyun 	uint16	mesh_peer_prot_id;
213*4882a593Smuzhiyun 	uint16	local_link_id;
214*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
215*4882a593Smuzhiyun typedef struct mesh_peer_mgmt_ie_common mesh_peer_mgmt_ie_common_t;
216*4882a593Smuzhiyun #define MESH_PEER_MGMT_IE_OPEN_LEN	(4)
217*4882a593Smuzhiyun 
218*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_peer_mgmt_ie_cfm {
219*4882a593Smuzhiyun 	mesh_peer_mgmt_ie_common_t	common;
220*4882a593Smuzhiyun 	uint16	peer_link_id;
221*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
222*4882a593Smuzhiyun typedef struct mesh_peer_mgmt_ie_cfm mesh_peer_mgmt_ie_cfm_t;
223*4882a593Smuzhiyun #define MESH_PEER_MGMT_IE_CONF_LEN	(6)
224*4882a593Smuzhiyun 
225*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct mesh_peer_mgmt_ie_close {
226*4882a593Smuzhiyun 	mesh_peer_mgmt_ie_common_t	common;
227*4882a593Smuzhiyun 	/* uint16	peer_link_id;
228*4882a593Smuzhiyun 	* simplicity: not supported, TODO for future
229*4882a593Smuzhiyun 	*/
230*4882a593Smuzhiyun 	uint16	reason_code;
231*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
232*4882a593Smuzhiyun typedef struct mesh_peer_mgmt_ie_close mesh_peer_mgmt_ie_close_t;
233*4882a593Smuzhiyun #define MESH_PEER_MGMT_IE_CLOSE_LEN	(6)
234*4882a593Smuzhiyun 
235*4882a593Smuzhiyun struct mesh_config_ie {
236*4882a593Smuzhiyun 	uint8	activ_path_sel_prot_id;
237*4882a593Smuzhiyun 	uint8	activ_path_sel_metric_id;
238*4882a593Smuzhiyun 	uint8	cong_ctl_mode_id;
239*4882a593Smuzhiyun 	uint8	sync_method_id;
240*4882a593Smuzhiyun 	uint8	auth_prot_id;
241*4882a593Smuzhiyun 	uint8	mesh_formation_info;
242*4882a593Smuzhiyun 	uint8	mesh_cap;
243*4882a593Smuzhiyun };
244*4882a593Smuzhiyun typedef struct mesh_config_ie mesh_config_ie_t;
245*4882a593Smuzhiyun #define MESH_CONFIG_IE_LEN	(7)
246*4882a593Smuzhiyun 
247*4882a593Smuzhiyun /* Mesh peering states */
248*4882a593Smuzhiyun #define MESH_PEERING_IDLE               0
249*4882a593Smuzhiyun #define MESH_PEERING_OPEN_SNT           1
250*4882a593Smuzhiyun #define MESH_PEERING_CNF_RCVD           2
251*4882a593Smuzhiyun #define MESH_PEERING_OPEN_RCVD          3
252*4882a593Smuzhiyun #define MESH_PEERING_ESTAB              4
253*4882a593Smuzhiyun #define MESH_PEERING_HOLDING            5
254*4882a593Smuzhiyun #define MESH_PEERING_LAST_STATE         6
255*4882a593Smuzhiyun /* for debugging: mapping strings */
256*4882a593Smuzhiyun #define MESH_PEERING_STATE_STRINGS \
257*4882a593Smuzhiyun 	{"IDLE  ", "OPNSNT", "CNFRCV", "OPNRCV", "ESTAB ", "HOLDNG"}
258*4882a593Smuzhiyun 
259*4882a593Smuzhiyun #ifdef WLMESH
260*4882a593Smuzhiyun typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info {
261*4882a593Smuzhiyun 	/* mesh_peer_instance as given in the spec. Note that, peer address
262*4882a593Smuzhiyun 	 * is stored in scb
263*4882a593Smuzhiyun 	 */
264*4882a593Smuzhiyun 	uint16	mesh_peer_prot_id;
265*4882a593Smuzhiyun 	uint16	local_link_id;
266*4882a593Smuzhiyun 	uint16	peer_link_id;
267*4882a593Smuzhiyun 	/* AID generated by *peer* to self & received in peer_confirm */
268*4882a593Smuzhiyun 	uint16  peer_aid;
269*4882a593Smuzhiyun 
270*4882a593Smuzhiyun 	/* TODO: no mention in spec? possibly used in PS case. Note that aid generated
271*4882a593Smuzhiyun 	* from self to peer is stored in scb.
272*4882a593Smuzhiyun 	*/
273*4882a593Smuzhiyun 	uint8   state;
274*4882a593Smuzhiyun 	/* TODO: struct mesh_peer_info *next; this field is required
275*4882a593Smuzhiyun 	 * if multiple peerings per same src is allowed, which is
276*4882a593Smuzhiyun 	 * true as per spec.
277*4882a593Smuzhiyun 	 */
278*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT mesh_peer_info_t;
279*4882a593Smuzhiyun 
280*4882a593Smuzhiyun typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info_ext {
281*4882a593Smuzhiyun 	mesh_peer_info_t	peer_info;
282*4882a593Smuzhiyun 	uint16	local_aid;	/* AID generated by *local* to peer */
283*4882a593Smuzhiyun 	struct ether_addr ea; /* peer ea */
284*4882a593Smuzhiyun 	uint32	entry_state;	/* see MESH_PEER_ENTRY_STATE_ACTIVE etc; valid
285*4882a593Smuzhiyun 		* ONLY for internal peering requests
286*4882a593Smuzhiyun 		*/
287*4882a593Smuzhiyun 	int rssi;
288*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT mesh_peer_info_ext_t;
289*4882a593Smuzhiyun 
290*4882a593Smuzhiyun /* #ifdef WLMESH */
291*4882a593Smuzhiyun typedef BWL_PRE_PACKED_STRUCT struct mesh_peer_info_dump {
292*4882a593Smuzhiyun 	uint32 buflen;
293*4882a593Smuzhiyun 	uint32 version;
294*4882a593Smuzhiyun 	uint32 count;	/* number of results */
295*4882a593Smuzhiyun 	mesh_peer_info_ext_t	mpi_ext[1];
296*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT mesh_peer_info_dump_t;
297*4882a593Smuzhiyun #define WL_MESH_PEER_RES_FIXED_SIZE (sizeof(mesh_peer_info_dump_t) - sizeof(mesh_peer_info_ext_t))
298*4882a593Smuzhiyun 
299*4882a593Smuzhiyun #endif /* WLMESH */
300*4882a593Smuzhiyun 
301*4882a593Smuzhiyun /* once an entry is added into mesh_peer_list, if peering is lost, it will
302*4882a593Smuzhiyun * get retried for peering, MAX_MESH_PEER_ENTRY_RETRIES times. after wards, it
303*4882a593Smuzhiyun * wont get retried and will be moved to MESH_PEER_ENTRY_STATE_TIMEDOUT state,
304*4882a593Smuzhiyun * until user adds it again explicitely, when its entry_state is changed
305*4882a593Smuzhiyun * to MESH_PEER_ENTRY_STATE_ACTIVE and tried again.
306*4882a593Smuzhiyun */
307*4882a593Smuzhiyun #define MAX_MESH_SELF_PEER_ENTRY_RETRIES	3
308*4882a593Smuzhiyun #define MESH_SELF_PEER_ENTRY_STATE_ACTIVE	1
309*4882a593Smuzhiyun #define MESH_SELF_PEER_ENTRY_STATE_TIMEDOUT	2
310*4882a593Smuzhiyun 
311*4882a593Smuzhiyun /** Mesh Channel Switch Parameter IE data structure */
312*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct dot11_mcsp_body {
313*4882a593Smuzhiyun 	uint8 ttl;           /* remaining number of hops allowed for this element. */
314*4882a593Smuzhiyun 	uint8 flags;         /* attributes of this channel switch attempt */
315*4882a593Smuzhiyun 	uint8 reason;        /* reason for the mesh channel switch */
316*4882a593Smuzhiyun 	uint16 precedence;    /* random value in the range 0 to 65535 */
317*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
318*4882a593Smuzhiyun 
319*4882a593Smuzhiyun #define DOT11_MCSP_TTL_DEFAULT          1
320*4882a593Smuzhiyun #define DOT11_MCSP_FLAG_TRANS_RESTRICT	0x1	/* no transmit except frames with mcsp */
321*4882a593Smuzhiyun #define DOT11_MCSP_FLAG_INIT		0x2	/* initiates the channel switch attempt */
322*4882a593Smuzhiyun #define DOT11_MCSP_FLAG_REASON		0x4	/* validity of reason code field */
323*4882a593Smuzhiyun #define DOT11_MCSP_REASON_REGULATORY	0	/* meet regulatory requirements */
324*4882a593Smuzhiyun #define DOT11_MCSP_REASON_UNSPECIFIED	1	/* unspecified reason */
325*4882a593Smuzhiyun 
326*4882a593Smuzhiyun BWL_PRE_PACKED_STRUCT struct dot11_mesh_csp {
327*4882a593Smuzhiyun 	uint8 id; /* id DOT11_MNG_MESH_CSP_ID */
328*4882a593Smuzhiyun 	uint8 len; /* length of IE */
329*4882a593Smuzhiyun 	struct dot11_mcsp_body body; /* body of the ie */
330*4882a593Smuzhiyun } BWL_POST_PACKED_STRUCT;
331*4882a593Smuzhiyun typedef struct dot11_mesh_csp dot11_mesh_csp_ie_t;
332*4882a593Smuzhiyun #define DOT11_MESH_CSP_IE_LEN    5       /* length of mesh channel switch parameter IE body */
333*4882a593Smuzhiyun 
334*4882a593Smuzhiyun /* This marks the end of a packed structure section. */
335*4882a593Smuzhiyun #include <packed_section_end.h>
336*4882a593Smuzhiyun 
337*4882a593Smuzhiyun #endif  /* #ifndef _802_11s_H_ */
338