xref: /dflybsd-src/contrib/wpa_supplicant/src/fst/fst_defs.h (revision 3a84a4273475ed07d0ab1c2dfeffdfedef35d9cd)
1*a1157835SDaniel Fojt /*
2*a1157835SDaniel Fojt  * FST module - FST related definitions
3*a1157835SDaniel Fojt  * Copyright (c) 2014, Qualcomm Atheros, Inc.
4*a1157835SDaniel Fojt  *
5*a1157835SDaniel Fojt  * This software may be distributed under the terms of the BSD license.
6*a1157835SDaniel Fojt  * See README for more details.
7*a1157835SDaniel Fojt  */
8*a1157835SDaniel Fojt 
9*a1157835SDaniel Fojt #ifndef IEEE_80211_FST_DEFS_H
10*a1157835SDaniel Fojt #define IEEE_80211_FST_DEFS_H
11*a1157835SDaniel Fojt 
12*a1157835SDaniel Fojt /* IEEE Std 802.11ad */
13*a1157835SDaniel Fojt 
14*a1157835SDaniel Fojt #define MB_STA_CHANNEL_ALL 0
15*a1157835SDaniel Fojt 
16*a1157835SDaniel Fojt enum session_type {
17*a1157835SDaniel Fojt 	SESSION_TYPE_BSS = 0, /*  Infrastructure BSS */
18*a1157835SDaniel Fojt 	SESSION_TYPE_IBSS = 1,
19*a1157835SDaniel Fojt 	SESSION_TYPE_DLS = 2,
20*a1157835SDaniel Fojt 	SESSION_TYPE_TDLS = 3,
21*a1157835SDaniel Fojt 	SESSION_TYPE_PBSS = 4
22*a1157835SDaniel Fojt };
23*a1157835SDaniel Fojt 
24*a1157835SDaniel Fojt #define SESSION_CONTROL(session_type, switch_intent) \
25*a1157835SDaniel Fojt 	(((u8) ((session_type) & 0x7)) | ((switch_intent) ? 0x10 : 0x00))
26*a1157835SDaniel Fojt 
27*a1157835SDaniel Fojt #define GET_SESSION_CONTROL_TYPE(session_control) \
28*a1157835SDaniel Fojt 	((u8) ((session_control) & 0x7))
29*a1157835SDaniel Fojt 
30*a1157835SDaniel Fojt #define GET_SESSION_CONTROL_SWITCH_INTENT(session_control) \
31*a1157835SDaniel Fojt 	(((session_control) & 0x10) >> 4)
32*a1157835SDaniel Fojt 
33*a1157835SDaniel Fojt /* 8.4.2.147  Session Transition element */
34*a1157835SDaniel Fojt struct session_transition_ie {
35*a1157835SDaniel Fojt 	u8 element_id;
36*a1157835SDaniel Fojt 	u8 length;
37*a1157835SDaniel Fojt 	le32 fsts_id;
38*a1157835SDaniel Fojt 	u8 session_control;
39*a1157835SDaniel Fojt 	u8 new_band_id;
40*a1157835SDaniel Fojt 	u8 new_band_setup;
41*a1157835SDaniel Fojt 	u8 new_band_op;
42*a1157835SDaniel Fojt 	u8 old_band_id;
43*a1157835SDaniel Fojt 	u8 old_band_setup;
44*a1157835SDaniel Fojt 	u8 old_band_op;
45*a1157835SDaniel Fojt } STRUCT_PACKED;
46*a1157835SDaniel Fojt 
47*a1157835SDaniel Fojt struct fst_setup_req {
48*a1157835SDaniel Fojt 	u8 action;
49*a1157835SDaniel Fojt 	u8 dialog_token;
50*a1157835SDaniel Fojt 	le32 llt;
51*a1157835SDaniel Fojt 	struct session_transition_ie stie;
52*a1157835SDaniel Fojt 	/* Multi-band (optional) */
53*a1157835SDaniel Fojt 	/* Wakeup Schedule (optional) */
54*a1157835SDaniel Fojt 	/* Awake Window (optional) */
55*a1157835SDaniel Fojt 	/* Switching Stream (optional) */
56*a1157835SDaniel Fojt } STRUCT_PACKED;
57*a1157835SDaniel Fojt 
58*a1157835SDaniel Fojt struct fst_setup_res {
59*a1157835SDaniel Fojt 	u8 action;
60*a1157835SDaniel Fojt 	u8 dialog_token;
61*a1157835SDaniel Fojt 	u8 status_code;
62*a1157835SDaniel Fojt 	struct session_transition_ie stie;
63*a1157835SDaniel Fojt 	/* Multi-band (optional) */
64*a1157835SDaniel Fojt 	/* Wakeup Schedule (optional) */
65*a1157835SDaniel Fojt 	/* Awake Window (optional) */
66*a1157835SDaniel Fojt 	/* Switching Stream (optional) */
67*a1157835SDaniel Fojt 	/* Timeout Interval (optional) */
68*a1157835SDaniel Fojt } STRUCT_PACKED;
69*a1157835SDaniel Fojt 
70*a1157835SDaniel Fojt struct fst_ack_req {
71*a1157835SDaniel Fojt 	u8 action;
72*a1157835SDaniel Fojt 	u8 dialog_token;
73*a1157835SDaniel Fojt 	le32 fsts_id;
74*a1157835SDaniel Fojt } STRUCT_PACKED;
75*a1157835SDaniel Fojt 
76*a1157835SDaniel Fojt struct fst_ack_res {
77*a1157835SDaniel Fojt 	u8 action;
78*a1157835SDaniel Fojt 	u8 dialog_token;
79*a1157835SDaniel Fojt 	le32 fsts_id;
80*a1157835SDaniel Fojt } STRUCT_PACKED;
81*a1157835SDaniel Fojt 
82*a1157835SDaniel Fojt struct fst_tear_down {
83*a1157835SDaniel Fojt 	u8 action;
84*a1157835SDaniel Fojt 	le32 fsts_id;
85*a1157835SDaniel Fojt } STRUCT_PACKED;
86*a1157835SDaniel Fojt 
87*a1157835SDaniel Fojt #endif /* IEEE_80211_FST_DEFS_H */
88