wlan_mlme_public_struct.h 9.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. /*
  2. * Copyright (c) 2018 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. /*
  19. * DOC: contains mlme structure definations
  20. */
  21. #ifndef _WLAN_MLME_STRUCT_H_
  22. #define _WLAN_MLME_STRUCT_H_
  23. #include <wlan_cmn.h>
  24. #define CFG_PMKID_MODES_OKC (0x1)
  25. #define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
  26. /**
  27. * struct mlme_ht_capabilities_info - HT Capabilities Info
  28. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  29. * @stbc_control_frame: STBC Control frame support
  30. * @psmp: PSMP Support
  31. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  32. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  33. * @delayed_ba: Support of Delayed Block Ack
  34. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  35. * @tx_stbc: Tx STBC Support
  36. * @short_gi_40_mhz: Short GI Support for HT40
  37. * @short_gi_20_mhz: Short GI support for HT20
  38. * @green_field: Support for HT Greenfield PPDUs
  39. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  40. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  41. * @adv_coding_cap: Rx LDPC support
  42. */
  43. #ifndef ANI_LITTLE_BIT_ENDIAN
  44. struct mlme_ht_capabilities_info {
  45. uint16_t l_sig_tx_op_protection:1;
  46. uint16_t stbc_control_frame:1;
  47. uint16_t psmp:1;
  48. uint16_t dsss_cck_mode_40_mhz:1;
  49. uint16_t maximal_amsdu_size:1;
  50. uint16_t delayed_ba:1;
  51. uint16_t rx_stbc:2;
  52. uint16_t tx_stbc:1;
  53. uint16_t short_gi_40_mhz:1;
  54. uint16_t short_gi_20_mhz:1;
  55. uint16_t green_field:1;
  56. uint16_t mimo_power_save:2;
  57. uint16_t supported_channel_width_set:1;
  58. uint16_t adv_coding_cap:1;
  59. } qdf_packed;
  60. #else
  61. struct mlme_ht_capabilities_info {
  62. uint16_t adv_coding_cap:1;
  63. uint16_t supported_channel_width_set:1;
  64. uint16_t mimo_power_save:2;
  65. uint16_t green_field:1;
  66. uint16_t short_gi_20_mhz:1;
  67. uint16_t short_gi_40_mhz:1;
  68. uint16_t tx_stbc:1;
  69. uint16_t rx_stbc:2;
  70. uint16_t delayed_ba:1;
  71. uint16_t maximal_amsdu_size:1;
  72. uint16_t dsss_cck_mode_40_mhz:1;
  73. uint16_t psmp:1;
  74. uint16_t stbc_control_frame:1;
  75. uint16_t l_sig_tx_op_protection:1;
  76. } qdf_packed;
  77. #endif
  78. /**
  79. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  80. * @ht_cap_info: HT capabilities Info Structure
  81. */
  82. struct wlan_mlme_ht_caps {
  83. struct mlme_ht_capabilities_info ht_cap_info;
  84. };
  85. /**
  86. * struct wlan_mlme_ - HT Capabilities related config items
  87. * @ht_cap_info: HT capabilities Info Structure
  88. */
  89. struct wlan_mlme_cfg_sap {
  90. uint8_t cfg_ssid[32];
  91. uint16_t beacon_interval;
  92. uint16_t dtim_interval;
  93. uint16_t listen_interval;
  94. bool sap_11g_policy;
  95. uint8_t assoc_sta_limit;
  96. bool enable_lte_coex;
  97. uint16_t rmc_action_period_freq;
  98. uint8_t rate_tx_mgmt;
  99. uint8_t rate_tx_mgmt_2g;
  100. uint8_t rate_tx_mgmt_5g;
  101. bool tele_bcn_wakeup_en;
  102. uint8_t tele_bcn_max_li;
  103. bool sap_get_peer_info;
  104. bool sap_allow_all_chan_param_name;
  105. uint8_t sap_max_no_peers;
  106. uint8_t sap_max_offload_peers;
  107. uint8_t sap_max_offload_reorder_buffs;
  108. uint8_t sap_ch_switch_beacon_cnt;
  109. bool sap_ch_switch_mode;
  110. bool sap_internal_restart_name;
  111. bool chan_switch_hostapd_rate_enabled_name;
  112. uint8_t reduced_beacon_interval;
  113. };
  114. struct wlan_mlme_vht_caps {
  115. /* VHT related configs */
  116. };
  117. /**
  118. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  119. * @tx_aggregation_size: TX aggr size in number of MPDUs
  120. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  121. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  122. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  123. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  124. * @rx_aggregation_size: No. of MPDUs for RX aggr
  125. * @tx_aggr_sw_retry_threshold_be: Tx aggregation sw retry for BE
  126. * @tx_aggr_sw_retry_threshold_bk: Tx aggregation sw retry for BK
  127. * @tx_aggr_sw_retry_threshold_vi: Tx aggregation sw retry for VI
  128. * @tx_aggr_sw_retry_threshold_vo: Tx aggregation sw retry for VO
  129. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  130. * hostapd.conf
  131. */
  132. struct wlan_mlme_qos {
  133. uint32_t tx_aggregation_size;
  134. uint32_t tx_aggregation_size_be;
  135. uint32_t tx_aggregation_size_bk;
  136. uint32_t tx_aggregation_size_vi;
  137. uint32_t tx_aggregation_size_vo;
  138. uint32_t rx_aggregation_size;
  139. uint32_t tx_aggr_sw_retry_threshold_be;
  140. uint32_t tx_aggr_sw_retry_threshold_bk;
  141. uint32_t tx_aggr_sw_retry_threshold_vi;
  142. uint32_t tx_aggr_sw_retry_threshold_vo;
  143. bool sap_max_inactivity_override;
  144. };
  145. /**
  146. * struct wlan_mlme_rates - RATES related config items
  147. * @cfpPeriod: cfp period info
  148. * @cfpMaxDuration: cfp Max duration info
  149. * @max_htmcs_txdata: max HT mcs info for Tx
  150. * @disable_abg_rate_txdata: disable abg rate info for tx data
  151. * @sap_max_mcs_txdata: sap max mcs info
  152. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  153. */
  154. struct wlan_mlme_rates {
  155. uint8_t cfp_period;
  156. uint16_t cfp_max_duration;
  157. uint16_t max_htmcs_txdata;
  158. bool disable_abg_rate_txdata;
  159. uint16_t sap_max_mcs_txdata;
  160. uint8_t disable_high_ht_mcs_2x2;
  161. };
  162. /*
  163. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  164. *
  165. * @protection_enabled - Force enable protection. static via cfg
  166. * @protection_force_policy - Protection force policy. Static via cfg
  167. * @ignore_peer_ht_mode - ignore the ht opmode of the peer. Dynamic via INI.
  168. *
  169. */
  170. struct wlan_mlme_sap_protection {
  171. uint32_t protection_enabled;
  172. uint8_t protection_force_policy;
  173. bool ignore_peer_ht_mode;
  174. };
  175. /*
  176. * struct wlan_mlme_chainmask - All chainmask related cfg items
  177. *
  178. * @txchainmask1x1 - to set transmit chainmask
  179. * @rxchainmask1x1 - to set rx chainmask
  180. * @tx_chain_mask_cck - Used to enable/disable Cck ChainMask
  181. * @tx_chain_mask_1ss - Enables/disables tx chain Mask1ss
  182. * @num_11b_tx_chains - Number of Tx Chains in 11b mode
  183. * @num_11ag_tx_chains - Number of Tx Chains in 11ag mode
  184. * @tx_chain_mask_2g - tx chain mask for 2g
  185. * @rx_chain_mask_2g - rx chain mask for 2g
  186. * @tx_chain_mask_5g - tx chain mask for 5g
  187. * @rx_chain_mask_5g - rx chain mask for 5g
  188. */
  189. struct wlan_mlme_chainmask {
  190. uint8_t txchainmask1x1;
  191. uint8_t rxchainmask1x1;
  192. bool tx_chain_mask_cck;
  193. uint8_t tx_chain_mask_1ss;
  194. uint16_t num_11b_tx_chains;
  195. uint16_t num_11ag_tx_chains;
  196. uint8_t tx_chain_mask_2g;
  197. uint8_t rx_chain_mask_2g;
  198. uint8_t tx_chain_mask_5g;
  199. uint8_t rx_chain_mask_5g;
  200. };
  201. /**
  202. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  203. * @active_dwelltime: obss active dwelltime
  204. * @passive_dwelltime: obss passive dwelltime
  205. * @width_trigger_interval: obss trigger interval
  206. * @passive_per_channel: obss scan passive total duration per channel
  207. * @active_per_channel: obss scan active total duration per channel
  208. * @width_trans_delay: obss width transition delay
  209. * @scan_activity_threshold: obss scan activity threshold
  210. */
  211. struct wlan_mlme_obss_ht40 {
  212. uint32_t active_dwelltime;
  213. uint32_t passive_dwelltime;
  214. uint32_t width_trigger_interval;
  215. uint32_t passive_per_channel;
  216. uint32_t active_per_channel;
  217. uint32_t width_trans_delay;
  218. uint32_t scan_activity_threshold;
  219. };
  220. /**
  221. * enum dot11p_mode - The 802.11p mode of operation
  222. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  223. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  224. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  225. */
  226. enum dot11p_mode {
  227. CFG_11P_DISABLED = 0,
  228. CFG_11P_STANDALONE,
  229. CFG_11P_CONCURRENT,
  230. };
  231. /**
  232. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  233. * @sta_keep_alive_period: Sends NULL frame to AP period
  234. * @tgt_gtx_usr_cfg: Target gtx user config
  235. * @pmkid_modes: Enable PMKID modes
  236. * @wait_cnf_timeout: Wait assoc cnf timeout
  237. * @dot11p_mode: Set 802.11p mode
  238. * @fils_max_chan_guard_time: Set maximum channel guard time
  239. * @current_rssi: Current rssi
  240. * @ignore_peer_erp_info: Ignore peer infrormation
  241. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  242. * @enable_5g_ebt: Set default 5G early beacon termination
  243. * @deauth_before_connection: Send deauth before connection or not
  244. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  245. * @qcn_ie_support: QCN IE support
  246. * @force_rsne_override: Force rsnie override from user
  247. * @single_tid: Set replay counter for all TID
  248. */
  249. struct wlan_mlme_sta_cfg {
  250. uint32_t sta_keep_alive_period;
  251. uint32_t tgt_gtx_usr_cfg;
  252. uint32_t pmkid_modes;
  253. uint32_t wait_cnf_timeout;
  254. uint8_t dot11p_mode;
  255. uint8_t fils_max_chan_guard_time;
  256. uint8_t current_rssi;
  257. bool ignore_peer_erp_info;
  258. bool sta_prefer_80mhz_over_160mhz;
  259. bool enable_5g_ebt;
  260. bool deauth_before_connection;
  261. bool enable_go_cts2self_for_sta;
  262. bool qcn_ie_support;
  263. bool force_rsne_override;
  264. bool single_tid;
  265. };
  266. /**
  267. * struct wlan_mlme_cfg - MLME config items
  268. * @ht_cfg: HT related CFG Items
  269. * @obss_ht40:obss ht40 CFG Items
  270. * @vht_cfg: VHT related CFG Items
  271. * @rates: Rates related cfg items
  272. * @sap_protection_cfg: SAP erp protection related CFG items
  273. * @sta: sta CFG Items
  274. */
  275. struct wlan_mlme_cfg {
  276. struct wlan_mlme_ht_caps ht_caps;
  277. struct wlan_mlme_obss_ht40 obss_ht40;
  278. struct wlan_mlme_vht_caps vht_caps;
  279. struct wlan_mlme_qos qos_mlme_params;
  280. struct wlan_mlme_rates rates;
  281. struct wlan_mlme_sap_protection sap_protection_cfg;
  282. struct wlan_mlme_chainmask chainmask_cfg;
  283. struct wlan_mlme_cfg_sap sap_cfg;
  284. struct wlan_mlme_sta_cfg sta;
  285. };
  286. #endif