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