wlan_mlme_public_struct.h 39 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147
  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. #include <reg_services_public_struct.h>
  25. #define CFG_PMKID_MODES_OKC (0x1)
  26. #define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
  27. #define CFG_STR_DATA_LEN 17
  28. #define CFG_EDCA_DATA_LEN 17
  29. /**
  30. * struct mlme_cfg_str - generic structure for all mlme CFG string items
  31. *
  32. * @max_len: maximum data length allowed
  33. * @len: valid no. of elements of the data
  34. * @data: uint8_t array to store values
  35. */
  36. struct mlme_cfg_str {
  37. qdf_size_t max_len;
  38. qdf_size_t len;
  39. uint8_t data[CFG_STR_DATA_LEN];
  40. };
  41. /**
  42. * enum e_edca_type - to index edca params for edca profile
  43. * EDCA profile AC unicast/bcast
  44. * @edca_ani_acbe_local: ani BE unicast
  45. * @edca_ani_acbk_local: ani BK unicast
  46. * @edca_ani_acvi_local: ani VI unicast
  47. * @edca_ani_acvo_local: ani VO unicast
  48. * @edca_ani_acbe_bcast: ani BE bcast
  49. * @edca_ani_acbk_bcast: ani BK bcast
  50. * @edca_ani_acvi_bcast: ani VI bcast
  51. * @edca_ani_acvo_bcast: ani VO bcast
  52. * @edca_wme_acbe_local: wme BE unicast
  53. * @edca_wme_acbk_local: wme BK unicast
  54. * @edca_wme_acvi_local: wme VI unicast
  55. * @edca_wme_acvo_local: wme VO unicast
  56. * @edca_wme_acbe_bcast: wme BE bcast
  57. * @edca_wme_acbk_bcast: wme BK bcast
  58. * @edca_wme_acvi_bcast: wme VI bcast
  59. * @edca_wme_acvo_bcast: wme VO bcast
  60. * @edca_etsi_acbe_local: etsi BE unicast
  61. * @edca_etsi_acbk_local: etsi BK unicast
  62. * @edca_etsi_acvi_local: etsi VI unicast
  63. * @edca_etsi_acvo_local: etsi VO unicast
  64. * @edca_etsi_acbe_bcast: etsi BE bcast
  65. * @edca_etsi_acbk_bcast: etsi BK bcast
  66. * @edca_etsi_acvi_bcast: etsi VI bcast
  67. * @edca_etsi_acvo_bcast: etsi VO bcast
  68. */
  69. enum e_edca_type {
  70. edca_ani_acbe_local,
  71. edca_ani_acbk_local,
  72. edca_ani_acvi_local,
  73. edca_ani_acvo_local,
  74. edca_ani_acbe_bcast,
  75. edca_ani_acbk_bcast,
  76. edca_ani_acvi_bcast,
  77. edca_ani_acvo_bcast,
  78. edca_wme_acbe_local,
  79. edca_wme_acbk_local,
  80. edca_wme_acvi_local,
  81. edca_wme_acvo_local,
  82. edca_wme_acbe_bcast,
  83. edca_wme_acbk_bcast,
  84. edca_wme_acvi_bcast,
  85. edca_wme_acvo_bcast,
  86. edca_etsi_acbe_local,
  87. edca_etsi_acbk_local,
  88. edca_etsi_acvi_local,
  89. edca_etsi_acvo_local,
  90. edca_etsi_acbe_bcast,
  91. edca_etsi_acbk_bcast,
  92. edca_etsi_acvi_bcast,
  93. edca_etsi_acvo_bcast
  94. };
  95. #define CFG_EDCA_PROFILE_ACM_IDX 0
  96. #define CFG_EDCA_PROFILE_AIFSN_IDX 1
  97. #define CFG_EDCA_PROFILE_CWMINA_IDX 2
  98. #define CFG_EDCA_PROFILE_CWMAXA_IDX 4
  99. #define CFG_EDCA_PROFILE_TXOPA_IDX 6
  100. #define CFG_EDCA_PROFILE_CWMINB_IDX 7
  101. #define CFG_EDCA_PROFILE_CWMAXB_IDX 9
  102. #define CFG_EDCA_PROFILE_TXOPB_IDX 11
  103. #define CFG_EDCA_PROFILE_CWMING_IDX 12
  104. #define CFG_EDCA_PROFILE_CWMAXG_IDX 14
  105. #define CFG_EDCA_PROFILE_TXOPG_IDX 16
  106. /**
  107. * struct mlme_edca_params - EDCA pramaters related config items
  108. *
  109. * @ani_acbk_l: EDCA parameters for ANI local access category background
  110. * @ani_acbe_l: EDCA parameters for ANI local access category best effort
  111. * @ani_acvi_l: EDCA parameters for ANI local access category video
  112. * @ani_acvo_l: EDCA parameters for ANI local access category voice
  113. * @ani_acbk_b: EDCA parameters for ANI bcast access category background
  114. * @ani_acbe_b: EDCA parameters for ANI bcast access category best effort
  115. * @ani_acvi_b: EDCA parameters for ANI bcast access category video
  116. * @ani_acvo_b: EDCA parameters for ANI bcast access category voice
  117. * @wme_acbk_l: EDCA parameters for WME local access category background
  118. * @wme_acbe_l: EDCA parameters for WME local access category best effort
  119. * @wme_acvi_l: EDCA parameters for WME local access category video
  120. * @wme_acvo_l: EDCA parameters for WME local access category voice
  121. * @wme_acbk_b: EDCA parameters for WME bcast access category background
  122. * @wme_acbe_b: EDCA parameters for WME bcast access category best effort
  123. * @wme_acvi_b: EDCA parameters for WME bcast access category video
  124. * @wme_acvo_b: EDCA parameters for WME bcast access category voice
  125. * @etsi_acbk_l: EDCA parameters for ETSI local access category background
  126. * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
  127. * @etsi_acvi_l: EDCA parameters for ETSI local access category video
  128. * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
  129. * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
  130. * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
  131. * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
  132. * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
  133. */
  134. struct wlan_mlme_edca_params {
  135. struct mlme_cfg_str ani_acbk_l;
  136. struct mlme_cfg_str ani_acbe_l;
  137. struct mlme_cfg_str ani_acvi_l;
  138. struct mlme_cfg_str ani_acvo_l;
  139. struct mlme_cfg_str ani_acbk_b;
  140. struct mlme_cfg_str ani_acbe_b;
  141. struct mlme_cfg_str ani_acvi_b;
  142. struct mlme_cfg_str ani_acvo_b;
  143. struct mlme_cfg_str wme_acbk_l;
  144. struct mlme_cfg_str wme_acbe_l;
  145. struct mlme_cfg_str wme_acvi_l;
  146. struct mlme_cfg_str wme_acvo_l;
  147. struct mlme_cfg_str wme_acbk_b;
  148. struct mlme_cfg_str wme_acbe_b;
  149. struct mlme_cfg_str wme_acvi_b;
  150. struct mlme_cfg_str wme_acvo_b;
  151. struct mlme_cfg_str etsi_acbk_l;
  152. struct mlme_cfg_str etsi_acbe_l;
  153. struct mlme_cfg_str etsi_acvi_l;
  154. struct mlme_cfg_str etsi_acvo_l;
  155. struct mlme_cfg_str etsi_acbk_b;
  156. struct mlme_cfg_str etsi_acbe_b;
  157. struct mlme_cfg_str etsi_acvi_b;
  158. struct mlme_cfg_str etsi_acvo_b;
  159. };
  160. #define WLAN_CFG_MFR_NAME_LEN (63)
  161. #define WLAN_CFG_MODEL_NUMBER_LEN (31)
  162. #define WLAN_CFG_MODEL_NAME_LEN (31)
  163. #define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
  164. #define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
  165. /**
  166. * struct mlme_ht_capabilities_info - HT Capabilities Info
  167. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  168. * @stbc_control_frame: STBC Control frame support
  169. * @psmp: PSMP Support
  170. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  171. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  172. * @delayed_ba: Support of Delayed Block Ack
  173. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  174. * @tx_stbc: Tx STBC Support
  175. * @short_gi_40_mhz: Short GI Support for HT40
  176. * @short_gi_20_mhz: Short GI support for HT20
  177. * @green_field: Support for HT Greenfield PPDUs
  178. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  179. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  180. * @adv_coding_cap: Rx LDPC support
  181. */
  182. #ifndef ANI_LITTLE_BIT_ENDIAN
  183. struct mlme_ht_capabilities_info {
  184. uint16_t l_sig_tx_op_protection:1;
  185. uint16_t stbc_control_frame:1;
  186. uint16_t psmp:1;
  187. uint16_t dsss_cck_mode_40_mhz:1;
  188. uint16_t maximal_amsdu_size:1;
  189. uint16_t delayed_ba:1;
  190. uint16_t rx_stbc:2;
  191. uint16_t tx_stbc:1;
  192. uint16_t short_gi_40_mhz:1;
  193. uint16_t short_gi_20_mhz:1;
  194. uint16_t green_field:1;
  195. uint16_t mimo_power_save:2;
  196. uint16_t supported_channel_width_set:1;
  197. uint16_t adv_coding_cap:1;
  198. } qdf_packed;
  199. #else
  200. struct mlme_ht_capabilities_info {
  201. uint16_t adv_coding_cap:1;
  202. uint16_t supported_channel_width_set:1;
  203. uint16_t mimo_power_save:2;
  204. uint16_t green_field:1;
  205. uint16_t short_gi_20_mhz:1;
  206. uint16_t short_gi_40_mhz:1;
  207. uint16_t tx_stbc:1;
  208. uint16_t rx_stbc:2;
  209. uint16_t delayed_ba:1;
  210. uint16_t maximal_amsdu_size:1;
  211. uint16_t dsss_cck_mode_40_mhz:1;
  212. uint16_t psmp:1;
  213. uint16_t stbc_control_frame:1;
  214. uint16_t l_sig_tx_op_protection:1;
  215. } qdf_packed;
  216. #endif
  217. /**
  218. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  219. * @ht_cap_info: HT capabilities Info Structure
  220. */
  221. struct wlan_mlme_ht_caps {
  222. struct mlme_ht_capabilities_info ht_cap_info;
  223. };
  224. /**
  225. * struct wlan_mlme_ - HT Capabilities related config items
  226. * @ht_cap_info: HT capabilities Info Structure
  227. */
  228. struct wlan_mlme_cfg_sap {
  229. uint8_t cfg_ssid[32];
  230. uint16_t beacon_interval;
  231. uint16_t dtim_interval;
  232. uint16_t listen_interval;
  233. bool sap_11g_policy;
  234. uint8_t assoc_sta_limit;
  235. bool enable_lte_coex;
  236. uint16_t rmc_action_period_freq;
  237. uint8_t rate_tx_mgmt;
  238. uint8_t rate_tx_mgmt_2g;
  239. uint8_t rate_tx_mgmt_5g;
  240. bool tele_bcn_wakeup_en;
  241. uint8_t tele_bcn_max_li;
  242. bool sap_get_peer_info;
  243. bool sap_allow_all_chan_param_name;
  244. uint8_t sap_max_no_peers;
  245. uint8_t sap_max_offload_peers;
  246. uint8_t sap_max_offload_reorder_buffs;
  247. uint8_t sap_ch_switch_beacon_cnt;
  248. bool sap_internal_restart;
  249. bool sap_ch_switch_mode;
  250. bool chan_switch_hostapd_rate_enabled_name;
  251. uint8_t reduced_beacon_interval;
  252. };
  253. /**
  254. * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
  255. * @dfs_master_capable: Is DFS master mode support enabled
  256. */
  257. struct wlan_mlme_dfs_cfg {
  258. bool dfs_master_capable;
  259. };
  260. /**
  261. * struct wlan_mlme_mbo - Multiband Operation related ini configs
  262. * @mbo_candidate_rssi_thres:
  263. * @mbo_current_rssi_thres:
  264. * @mbo_current_rssi_mcc_thres:
  265. * @mbo_candidate_rssi_btc_thres:
  266. */
  267. struct wlan_mlme_mbo {
  268. int8_t mbo_candidate_rssi_thres;
  269. int8_t mbo_current_rssi_thres;
  270. int8_t mbo_current_rssi_mcc_thres;
  271. int8_t mbo_candidate_rssi_btc_thres;
  272. };
  273. /**
  274. * struct wlan_mlme_vht_caps - MLME VHT config items
  275. * @supp_chan_width: Supported Channel Width
  276. * @ldpc_coding_cap: LDPC Coding Capability
  277. * @short_gi_80mhz: 80MHz Short Guard Interval
  278. * @short_gi_160mhz: 160MHz Short Guard Interval
  279. * @tx_stbc: Tx STBC cap
  280. * @rx_stbc: Rx STBC cap
  281. * @su_bformer: SU Beamformer cap
  282. * @su_bformee: SU Beamformee cap
  283. * @tx_bfee_ant_supp: Tx beamformee anti supp
  284. * @num_soundingdim: Number of sounding dimensions
  285. * @mu_bformer: MU Beamformer cap
  286. * @txop_ps: Tx OPs in power save
  287. * @htc_vhtc: htc_vht capability
  288. * @link_adap_cap: Link adaptation capability
  289. * @rx_antpattern: Rx Antenna Pattern cap
  290. * @tx_antpattern: Tx Antenna Pattern cap
  291. * @rx_mcs_map: Rx MCS Map
  292. * @tx_mcs_map: Tx MCS Map
  293. * @rx_supp_data_rate: Rx highest supported data rate
  294. * @tx_supp_data_rate: Tx highest supported data rate
  295. * @basic_mcs_set: Basic MCS set
  296. * @enable_txbf_20mhz: enable tx bf for 20mhz
  297. * @channel_width: Channel width capability for 11ac
  298. * @rx_mcs: VHT Rx MCS capability for 1x1 mode
  299. * @tx_mcs: VHT Tx MCS capability for 1x1 mode
  300. * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
  301. * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
  302. * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
  303. * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
  304. * @enable_mu_bformee: Enables/disables multi-user (MU)
  305. * beam formee capability
  306. * @enable_paid: Enables/disables paid
  307. * @enable_gid: Enables/disables gid
  308. * @b24ghz_band: To control VHT support in 2.4 GHz band
  309. * @vendor_24ghz_band: to control VHT support based on vendor
  310. * ie in 2.4 GHz band
  311. * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
  312. * @ampdu_len: To handle maximum receive AMPDU ampdu len
  313. */
  314. struct mlme_vht_capabilities_info {
  315. uint8_t supp_chan_width;
  316. bool ldpc_coding_cap;
  317. bool short_gi_80mhz;
  318. bool short_gi_160mhz;
  319. bool tx_stbc;
  320. bool rx_stbc;
  321. bool su_bformer;
  322. bool su_bformee;
  323. uint8_t tx_bfee_ant_supp;
  324. uint8_t num_soundingdim;
  325. bool mu_bformer;
  326. bool txop_ps;
  327. bool htc_vhtc;
  328. uint8_t link_adap_cap;
  329. bool rx_antpattern;
  330. bool tx_antpattern;
  331. uint32_t rx_mcs_map;
  332. uint32_t tx_mcs_map;
  333. uint32_t rx_supp_data_rate;
  334. uint32_t tx_supp_data_rate;
  335. uint32_t basic_mcs_set;
  336. bool enable_txbf_20mhz;
  337. uint8_t channel_width;
  338. uint8_t rx_mcs;
  339. uint8_t tx_mcs;
  340. uint8_t rx_mcs2x2;
  341. uint8_t tx_mcs2x2;
  342. bool enable_vht20_mcs9;
  343. bool enable2x2;
  344. bool enable_mu_bformee;
  345. bool enable_paid;
  346. bool enable_gid;
  347. bool b24ghz_band;
  348. bool vendor_24ghz_band;
  349. uint8_t ampdu_len_exponent;
  350. uint8_t ampdu_len;
  351. };
  352. /**
  353. * struct wlan_mlme_vht_caps - VHT Capabilities related config items
  354. * @vht_cap_info: VHT capabilities Info Structure
  355. */
  356. struct wlan_mlme_vht_caps {
  357. struct mlme_vht_capabilities_info vht_cap_info;
  358. };
  359. /**
  360. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  361. * @tx_aggregation_size: TX aggr size in number of MPDUs
  362. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  363. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  364. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  365. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  366. * @rx_aggregation_size: No. of MPDUs for RX aggr
  367. * @tx_aggr_sw_retry_threshold_be: Tx aggregation sw retry for BE
  368. * @tx_aggr_sw_retry_threshold_bk: Tx aggregation sw retry for BK
  369. * @tx_aggr_sw_retry_threshold_vi: Tx aggregation sw retry for VI
  370. * @tx_aggr_sw_retry_threshold_vo: Tx aggregation sw retry for VO
  371. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  372. * hostapd.conf
  373. */
  374. struct wlan_mlme_qos {
  375. uint32_t tx_aggregation_size;
  376. uint32_t tx_aggregation_size_be;
  377. uint32_t tx_aggregation_size_bk;
  378. uint32_t tx_aggregation_size_vi;
  379. uint32_t tx_aggregation_size_vo;
  380. uint32_t rx_aggregation_size;
  381. uint32_t tx_aggr_sw_retry_threshold_be;
  382. uint32_t tx_aggr_sw_retry_threshold_bk;
  383. uint32_t tx_aggr_sw_retry_threshold_vi;
  384. uint32_t tx_aggr_sw_retry_threshold_vo;
  385. bool sap_max_inactivity_override;
  386. };
  387. #define MLME_HE_PPET_LEN 25
  388. /**
  389. * struct wlan_mlme_he_caps - HE Capabilities related config items
  390. */
  391. struct wlan_mlme_he_caps {
  392. uint8_t he_control;
  393. uint8_t he_twt_requestor;
  394. uint8_t he_twt_responder;
  395. uint8_t he_twt_fragmentation;
  396. uint8_t he_max_frag_msdu;
  397. uint8_t he_min_frag_size;
  398. uint8_t he_trig_pad;
  399. uint8_t he_mtid_aggr_rx;
  400. uint8_t he_link_adaptation;
  401. uint8_t he_all_ack;
  402. uint8_t he_trigd_rsp_scheduling;
  403. uint8_t he_buffer_status_rpt;
  404. uint8_t he_bcast_twt;
  405. uint8_t he_ba_32bit;
  406. uint8_t he_mu_cascading;
  407. uint8_t he_multi_tid;
  408. uint8_t he_dl_mu_ba;
  409. uint8_t he_omi;
  410. uint8_t he_ofdma_ra;
  411. uint8_t he_max_ampdu_len;
  412. uint8_t he_amsdu_frag;
  413. uint8_t he_flex_twt_sched;
  414. uint8_t he_rx_ctrl;
  415. uint8_t he_bsrp_ampdu_aggr;
  416. uint8_t he_qtp;
  417. uint8_t he_a_bqr;
  418. uint8_t he_sr_responder;
  419. uint8_t he_ndp_feedback_supp;
  420. uint8_t he_ops_supp;
  421. uint8_t he_amsdu_in_ampdu;
  422. uint8_t he_chan_width;
  423. uint8_t he_mtid_aggr_tx;
  424. uint8_t he_sub_ch_sel_tx;
  425. uint8_t he_ul_2x996_ru;
  426. uint8_t he_om_ctrl_ul_mu_dis_rx;
  427. uint8_t he_rx_pream_punc;
  428. uint8_t he_class_of_device;
  429. uint8_t he_ldpc;
  430. uint8_t he_ltf_ppdu;
  431. uint8_t he_midamble_rx_nsts;
  432. uint8_t he_ltf_ndp;
  433. uint8_t he_tx_stbc_lt80;
  434. uint8_t he_rx_stbc_lt80;
  435. uint8_t he_doppler;
  436. uint8_t he_ul_mumimo;
  437. uint8_t he_dcm_tx;
  438. uint8_t he_dcm_rx;
  439. uint8_t he_mu_ppdu;
  440. uint8_t he_su_beamformer;
  441. uint8_t he_su_beamformee;
  442. uint8_t he_mu_beamformer;
  443. uint8_t he_bfee_sts_lt80;
  444. uint8_t he_bfee_sts_gt80;
  445. uint8_t he_num_sound_lt80;
  446. uint8_t he_num_sound_gt80;
  447. uint8_t he_su_feed_tone16;
  448. uint8_t he_mu_feed_tone16;
  449. uint8_t he_codebook_su;
  450. uint8_t he_codebook_mu;
  451. uint8_t he_bfrm_feed;
  452. uint8_t he_er_su_ppdu;
  453. uint8_t he_dl_part_bw;
  454. uint8_t he_ppet_present;
  455. uint8_t he_srp;
  456. uint8_t he_power_boost;
  457. uint8_t he_4x_ltf_gi;
  458. uint8_t he_max_nc;
  459. uint8_t he_rx_stbc_gt80;
  460. uint8_t he_tx_stbc_gt80;
  461. uint8_t he_er_4x_ltf_gi;
  462. uint8_t he_ppdu_20_in_40mhz_2g;
  463. uint8_t he_ppdu_20_in_160_80p80mhz;
  464. uint8_t he_ppdu_80_in_160_80p80mhz;
  465. uint8_t he_er_1x_he_ltf_gi;
  466. uint8_t he_midamble_rx_1x_he_ltf;
  467. uint8_t he_dcm_max_bw;
  468. uint8_t he_longer_16_sigb_ofdm_sym;
  469. uint8_t he_non_trig_cqi_feedback;
  470. uint8_t he_tx_1024_qam_lt_242_ru;
  471. uint8_t he_rx_1024_qam_lt_242_ru;
  472. uint8_t he_rx_full_bw_mu_cmpr_sigb;
  473. uint8_t he_rx_full_bw_mu_non_cmpr_sigb;
  474. uint32_t he_rx_mcs_map_lt_80;
  475. uint32_t he_tx_mcs_map_lt_80;
  476. uint32_t he_rx_mcs_map_160;
  477. uint32_t he_tx_mcs_map_160;
  478. uint32_t he_rx_mcs_map_80_80;
  479. uint32_t he_tx_mcs_map_80_80;
  480. uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
  481. uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
  482. uint32_t he_ops_basic_mcs_nss;
  483. uint8_t he_twt_dynamic_fragmentation;
  484. uint8_t enable_ul_mimo;
  485. uint8_t enable_ul_ofdm;
  486. uint32_t he_sta_obsspd;
  487. };
  488. /**
  489. * struct wlan_mlme_rates - RATES related config items
  490. * @cfpPeriod: cfp period info
  491. * @cfpMaxDuration: cfp Max duration info
  492. * @max_htmcs_txdata: max HT mcs info for Tx
  493. * @disable_abg_rate_txdata: disable abg rate info for tx data
  494. * @sap_max_mcs_txdata: sap max mcs info
  495. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  496. */
  497. struct wlan_mlme_rates {
  498. uint8_t cfp_period;
  499. uint16_t cfp_max_duration;
  500. uint16_t max_htmcs_txdata;
  501. bool disable_abg_rate_txdata;
  502. uint16_t sap_max_mcs_txdata;
  503. uint8_t disable_high_ht_mcs_2x2;
  504. };
  505. /* Flags for gLimProtectionControl that is updated in pe session*/
  506. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  507. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  508. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  509. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  510. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  511. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  512. /* protection_enabled bits*/
  513. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  514. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  515. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  516. #define MLME_PROTECTION_ENABLED_HT_20 3
  517. #define MLME_PROTECTION_ENABLED_NON_GF 4
  518. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  519. #define MLME_PROTECTION_ENABLED_RIFS 6
  520. #define MLME_PROTECTION_ENABLED_OBSS 7
  521. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  522. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  523. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  524. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  525. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  526. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  527. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  528. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  529. /**
  530. * struct wlan_mlme_feature_flag - feature related information
  531. * @accept_short_slot_assoc: enable short sloc feature
  532. * @enable_hcf: enable HCF feature
  533. * @enable_rsn: enable RSN for connection
  534. * @enable_short_preamble_11g: enable short preamble for 11g
  535. * @channel_bonding_mode: channel bonding mode
  536. * @enable_block_ack: enable block ack feature
  537. * @enable_ampdu: Enable AMPDU feature
  538. */
  539. struct wlan_mlme_feature_flag {
  540. bool accept_short_slot_assoc;
  541. bool enable_hcf;
  542. bool enable_rsn;
  543. bool enable_short_preamble_11g;
  544. bool enable_short_slot_time_11g;
  545. uint32_t channel_bonding_mode;
  546. uint32_t enable_block_ack;
  547. bool enable_ampdu;
  548. };
  549. /*
  550. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  551. *
  552. * @protection_enabled: Force enable protection. static via cfg
  553. * @protection_force_policy: Protection force policy. Static via cfg
  554. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  555. *
  556. */
  557. struct wlan_mlme_sap_protection {
  558. uint32_t protection_enabled;
  559. uint8_t protection_force_policy;
  560. bool ignore_peer_ht_opmode;
  561. };
  562. /*
  563. * struct wlan_mlme_chainmask - All chainmask related cfg items
  564. *
  565. * @txchainmask1x1: To set transmit chainmask
  566. * @rxchainmask1x1: To set rx chainmask
  567. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  568. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  569. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  570. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  571. * @tx_chain_mask_2g: Tx chain mask for 2g
  572. * @rx_chain_mask_2g: Tx chain mask for 2g
  573. * @tx_chain_mask_5g: Tx chain mask for 5g
  574. * @rx_chain_mask_5g: Rx chain mask for 5g
  575. */
  576. struct wlan_mlme_chainmask {
  577. uint8_t txchainmask1x1;
  578. uint8_t rxchainmask1x1;
  579. bool tx_chain_mask_cck;
  580. uint8_t tx_chain_mask_1ss;
  581. uint16_t num_11b_tx_chains;
  582. uint16_t num_11ag_tx_chains;
  583. uint8_t tx_chain_mask_2g;
  584. uint8_t rx_chain_mask_2g;
  585. uint8_t tx_chain_mask_5g;
  586. uint8_t rx_chain_mask_5g;
  587. };
  588. /* struct wlan_mlme_generic - Generic CFG config items
  589. *
  590. * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
  591. * @band: Current Band - Internal variable, initialized to INI and updated later
  592. * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
  593. * @sub_20_chan_width: Sub 20Mhz Channel Width
  594. * @ito_repeat_count: ITO Repeat Count
  595. * @pmf_sa_query_max_retries: PMF query max retries for SAP
  596. * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
  597. * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
  598. * @rtt3_enabled: RTT3 enable or disable info
  599. * @prevent_link_down: Enable/Disable prevention of link down
  600. * @memory_deep_sleep: Enable/Disable memory deep sleep
  601. * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
  602. * @crash_inject: Enable/Disable Crash Inject
  603. * @lpass_support: Enable/Disable LPASS Support
  604. * @self_recovery: Enable/Disable Self Recovery
  605. * @sap_dot11mc: Enable/Disable SAP 802.11mc support
  606. * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
  607. * @optimize_ca_event: Enable/Disable Optimization of CA events
  608. * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  609. * @debug_packet_log: Debug packet log flags
  610. */
  611. struct wlan_mlme_generic {
  612. enum band_info band_capability;
  613. enum band_info band;
  614. uint8_t select_5ghz_margin;
  615. uint8_t sub_20_chan_width;
  616. uint8_t ito_repeat_count;
  617. uint8_t pmf_sa_query_max_retries;
  618. uint16_t pmf_sa_query_retry_interval;
  619. uint16_t dropped_pkt_disconnect_thresh;
  620. bool rtt3_enabled;
  621. bool prevent_link_down;
  622. bool memory_deep_sleep;
  623. bool cck_tx_fir_override;
  624. bool crash_inject;
  625. bool lpass_support;
  626. bool self_recovery;
  627. bool sap_dot11mc;
  628. bool fatal_event_trigger;
  629. bool optimize_ca_event;
  630. bool fw_timeout_crash;
  631. uint8_t debug_packet_log;
  632. };
  633. /*
  634. * struct wlan_mlme_product_details_cfg - product details config items
  635. * @manufacturer_name: manufacture name
  636. * @model_number: model number
  637. * @model_name: model name
  638. * @manufacture_product_name: manufacture product name
  639. * @manufacture_product_version: manufacture product version
  640. */
  641. struct wlan_mlme_product_details_cfg {
  642. char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
  643. char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
  644. char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
  645. char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
  646. char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
  647. };
  648. /*
  649. * struct wlan_mlme_acs - All acs related cfg items
  650. * @is_acs_with_more_param - to enable acs with more param
  651. * @auto_channel_select_weight - to set acs channel weight
  652. * @is_vendor_acs_support - enable application based channel selection
  653. * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
  654. * @is_external_acs_policy - control external policy
  655. */
  656. struct wlan_mlme_acs {
  657. bool is_acs_with_more_param;
  658. uint32_t auto_channel_select_weight;
  659. bool is_vendor_acs_support;
  660. bool is_acs_support_for_dfs_ltecoex;
  661. bool is_external_acs_policy;
  662. };
  663. /**
  664. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  665. * @active_dwelltime: obss active dwelltime
  666. * @passive_dwelltime: obss passive dwelltime
  667. * @width_trigger_interval: obss trigger interval
  668. * @passive_per_channel: obss scan passive total duration per channel
  669. * @active_per_channel: obss scan active total duration per channel
  670. * @width_trans_delay: obss width transition delay
  671. * @scan_activity_threshold: obss scan activity threshold
  672. */
  673. struct wlan_mlme_obss_ht40 {
  674. uint32_t active_dwelltime;
  675. uint32_t passive_dwelltime;
  676. uint32_t width_trigger_interval;
  677. uint32_t passive_per_channel;
  678. uint32_t active_per_channel;
  679. uint32_t width_trans_delay;
  680. uint32_t scan_activity_threshold;
  681. };
  682. /**
  683. * enum dot11p_mode - The 802.11p mode of operation
  684. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  685. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  686. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  687. */
  688. enum dot11p_mode {
  689. CFG_11P_DISABLED = 0,
  690. CFG_11P_STANDALONE,
  691. CFG_11P_CONCURRENT,
  692. };
  693. /**
  694. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  695. * @sta_keep_alive_period: Sends NULL frame to AP period
  696. * @tgt_gtx_usr_cfg: Target gtx user config
  697. * @pmkid_modes: Enable PMKID modes
  698. * @wait_cnf_timeout: Wait assoc cnf timeout
  699. * @dot11p_mode: Set 802.11p mode
  700. * @fils_max_chan_guard_time: Set maximum channel guard time
  701. * @current_rssi: Current rssi
  702. * @ignore_peer_erp_info: Ignore peer infrormation
  703. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  704. * @enable_5g_ebt: Set default 5G early beacon termination
  705. * @deauth_before_connection: Send deauth before connection or not
  706. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  707. * @qcn_ie_support: QCN IE support
  708. * @force_rsne_override: Force rsnie override from user
  709. * @single_tid: Set replay counter for all TID
  710. */
  711. struct wlan_mlme_sta_cfg {
  712. uint32_t sta_keep_alive_period;
  713. uint32_t tgt_gtx_usr_cfg;
  714. uint32_t pmkid_modes;
  715. uint32_t wait_cnf_timeout;
  716. uint8_t dot11p_mode;
  717. uint8_t fils_max_chan_guard_time;
  718. uint8_t current_rssi;
  719. bool ignore_peer_erp_info;
  720. bool sta_prefer_80mhz_over_160mhz;
  721. bool enable_5g_ebt;
  722. bool deauth_before_connection;
  723. bool enable_go_cts2self_for_sta;
  724. bool qcn_ie_support;
  725. bool force_rsne_override;
  726. bool single_tid;
  727. };
  728. /*
  729. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  730. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  731. * @lfr3_roaming_offload: Enable/disable roam offload feature
  732. * @early_stop_scan_enable: Set early stop scan
  733. * @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
  734. * @enable_5g_band_pref: Enable preference for 5G from INI
  735. * @mawc_roam_traffic_threshold: Configure traffic threshold
  736. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  737. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  738. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  739. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  740. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  741. * @early_stop_scan_min_threshold: Set early stop scan min
  742. * @early_stop_scan_max_threshold: Set early stop scan max
  743. * @first_scan_bucket_threshold: Set first scan bucket
  744. * @roam_dense_traffic_threshold: Dense traffic threshold
  745. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  746. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  747. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  748. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  749. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  750. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  751. * @per_roam_enable: To enabled/disable PER based roaming in FW
  752. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  753. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  754. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  755. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  756. * @per_roam_monitor_time: Min time to be considered as valid scenario
  757. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  758. * @lfr3_disallow_duration: Disallow duration before roaming
  759. * @lfr3_rssi_channel_penalization: RSSI penalization
  760. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  761. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  762. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  763. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  764. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  765. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  766. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  767. * @max_num_pre_auth: Configure max number of pre-auth
  768. */
  769. struct wlan_mlme_lfr_cfg {
  770. bool mawc_roam_enabled;
  771. bool enable_fast_roam_in_concurrency;
  772. bool lfr3_roaming_offload;
  773. bool early_stop_scan_enable;
  774. bool lfr3_enable_subnet_detection;
  775. bool enable_5g_band_pref;
  776. uint32_t mawc_roam_traffic_threshold;
  777. uint32_t mawc_roam_ap_rssi_threshold;
  778. uint32_t mawc_roam_rssi_high_adjust;
  779. uint32_t mawc_roam_rssi_low_adjust;
  780. uint32_t roam_rssi_abs_threshold;
  781. uint8_t rssi_threshold_offset_5g;
  782. uint8_t early_stop_scan_min_threshold;
  783. uint8_t early_stop_scan_max_threshold;
  784. uint8_t first_scan_bucket_threshold;
  785. uint32_t roam_dense_traffic_threshold;
  786. uint32_t roam_dense_rssi_thre_offset;
  787. uint32_t roam_dense_min_aps;
  788. uint32_t roam_bg_scan_bad_rssi_threshold;
  789. uint32_t roam_bg_scan_client_bitmap;
  790. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  791. uint32_t adaptive_roamscan_dwell_mode;
  792. uint32_t per_roam_enable;
  793. uint32_t per_roam_config_high_rate_th;
  794. uint32_t per_roam_config_low_rate_th;
  795. uint32_t per_roam_config_rate_th_percent;
  796. uint32_t per_roam_rest_time;
  797. uint32_t per_roam_monitor_time;
  798. uint32_t per_roam_min_candidate_rssi;
  799. uint32_t lfr3_disallow_duration;
  800. uint32_t lfr3_rssi_channel_penalization;
  801. uint32_t lfr3_num_disallowed_aps;
  802. uint32_t rssi_boost_threshold_5g;
  803. uint32_t rssi_boost_factor_5g;
  804. uint32_t max_rssi_boost_5g;
  805. uint32_t rssi_penalize_threshold_5g;
  806. uint32_t rssi_penalize_factor_5g;
  807. uint32_t max_rssi_penalize_5g;
  808. uint32_t max_num_pre_auth;
  809. };
  810. /**
  811. * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
  812. * for AC_VO
  813. * @dir_ac_vo: TSPEC direction for VO
  814. * @nom_msdu_size_ac_vo: normal MSDU size for VO
  815. * @mean_data_rate_ac_vo: mean data rate for VO
  816. * @min_phy_rate_ac_vo: min PHY rate for VO
  817. * @sba_ac_vo: surplus bandwidth allowance for VO
  818. * @uapsd_vo_srv_intv: Uapsd service interval for voice
  819. * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
  820. */
  821. struct wlan_mlme_wmm_ac_vo {
  822. uint8_t dir_ac_vo;
  823. uint16_t nom_msdu_size_ac_vo;
  824. uint32_t mean_data_rate_ac_vo;
  825. uint32_t min_phy_rate_ac_vo;
  826. uint16_t sba_ac_vo;
  827. uint32_t uapsd_vo_srv_intv;
  828. uint32_t uapsd_vo_sus_intv;
  829. };
  830. /**
  831. * struct wlan_mlme_wmm_params - WMM CFG Items
  832. * @qos_enabled: AP is enabled with 11E
  833. * @wme_enabled: AP is enabled with WMM
  834. * @max_sp_length: Maximum SP Length
  835. * @wsm_enabled: AP is enabled with WSM
  836. * @ac_vo: Default TSPEC parameters for AC_VO
  837. */
  838. struct wlan_mlme_wmm_params {
  839. bool qos_enabled;
  840. bool wme_enabled;
  841. uint8_t max_sp_length;
  842. bool wsm_enabled;
  843. uint32_t edca_profile;
  844. struct wlan_mlme_wmm_ac_vo ac_vo;
  845. };
  846. /**
  847. * struct wlan_mlme_weight_config - weight params to
  848. * calculate best candidate
  849. *
  850. * @rssi_weightage: RSSI weightage
  851. * @ht_caps_weightage: HT caps weightage
  852. * @vht_caps_weightage: VHT caps weightage
  853. * @he_caps_weightage: HE caps weightage
  854. * @chan_width_weightage: Channel width weightage
  855. * @chan_band_weightage: Channel band weightage
  856. * @nss_weightage: NSS weightage
  857. * @beamforming_cap_weightage: Beamforming caps weightage
  858. * @pcl_weightage: PCL weightage
  859. * @channel_congestion_weightage: channel congestion weightage
  860. * @oce_wan_weightage: OCE WAN metrics weightage
  861. */
  862. struct wlan_mlme_weight_config {
  863. uint8_t rssi_weightage;
  864. uint8_t ht_caps_weightage;
  865. uint8_t vht_caps_weightage;
  866. uint8_t he_caps_weightage;
  867. uint8_t chan_width_weightage;
  868. uint8_t chan_band_weightage;
  869. uint8_t nss_weightage;
  870. uint8_t beamforming_cap_weightage;
  871. uint8_t pcl_weightage;
  872. uint8_t channel_congestion_weightage;
  873. uint8_t oce_wan_weightage;
  874. };
  875. /**
  876. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  877. * calculate best candidate
  878. *
  879. * @best_rssi_threshold: Best RSSI threshold
  880. * @good_rssi_threshold: Good RSSI threshold
  881. * @bad_rssi_threshold: Bad RSSI threshold
  882. * @good_rssi_pcnt: Good RSSI Percentage
  883. * @bad_rssi_pcnt: Bad RSSI Percentage
  884. * @good_rssi_bucket_size: Good RSSI Bucket Size
  885. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  886. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  887. */
  888. struct wlan_mlme_rssi_cfg_score {
  889. uint32_t best_rssi_threshold;
  890. uint32_t good_rssi_threshold;
  891. uint32_t bad_rssi_threshold;
  892. uint32_t good_rssi_pcnt;
  893. uint32_t bad_rssi_pcnt;
  894. uint32_t good_rssi_bucket_size;
  895. uint32_t bad_rssi_bucket_size;
  896. uint32_t rssi_pref_5g_rssi_thresh;
  897. };
  898. /**
  899. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  900. * for a scoring param.
  901. * num_slot: number of slots in which the param will be divided.
  902. * Max 15. index 0 is used for 'not_present. Num_slot will
  903. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  904. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  905. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  906. * BITS 0-7 :- the scoring pcnt when not present
  907. * BITS 8-15 :- SLOT_1
  908. * BITS 16-23 :- SLOT_2
  909. * BITS 24-31 :- SLOT_3
  910. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  911. * BITS 0-7 :- SLOT_4
  912. * BITS 8-15 :- SLOT_5
  913. * BITS 16-23 :- SLOT_6
  914. * BITS 24-31 :- SLOT_7
  915. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  916. * BITS 0-7 :- SLOT_8
  917. * BITS 8-15 :- SLOT_9
  918. * BITS 16-23 :- SLOT_10
  919. * BITS 24-31 :- SLOT_11
  920. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  921. * BITS 0-7 :- SLOT_12
  922. * BITS 8-15 :- SLOT_13
  923. * BITS 16-23 :- SLOT_14
  924. * BITS 24-31 :- SLOT_15
  925. */
  926. struct wlan_mlme_per_slot_scoring {
  927. uint32_t num_slot;
  928. uint32_t score_pcnt3_to_0;
  929. uint32_t score_pcnt7_to_4;
  930. uint32_t score_pcnt11_to_8;
  931. uint32_t score_pcnt15_to_12;
  932. };
  933. /*
  934. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  935. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  936. * @weight_cfg: Various Weight related Scoring Configs
  937. * @rssi_score: RSSI Scoring related thresholds/percentages config
  938. * @esp_qbss_scoring: ESP QBSS Scoring configs
  939. * @oce_wan_scoring: OCE WAN Scoring Configs
  940. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  941. * @nss_weight_per_index: NSS weight per index for scoring logic
  942. * @band_weight_per_index: Band weight per index for scoring logic
  943. */
  944. struct wlan_mlme_scoring_cfg {
  945. bool enable_scoring_for_roam;
  946. struct wlan_mlme_weight_config weight_cfg;
  947. struct wlan_mlme_rssi_cfg_score rssi_score;
  948. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  949. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  950. uint32_t bandwidth_weight_per_index;
  951. uint32_t nss_weight_per_index;
  952. uint32_t band_weight_per_index;
  953. };
  954. /* struct wlan_mlme_threshold - Threshold related config items
  955. * @rts_threshold: set rts threshold
  956. * @frag_threshold: set fragmentation threshold
  957. */
  958. struct wlan_mlme_threshold {
  959. uint32_t rts_threshold;
  960. uint32_t frag_threshold;
  961. };
  962. /*
  963. * struct wlan_mlme_timeout - mlme timeout related config items
  964. * @join_failure_timeout: join failure timeout
  965. * @auth_failure_timeout: authenticate failure timeout
  966. * @auth_rsp_timeout: authenticate response timeout
  967. * @assoc_failure_timeout: assoc failure timeout
  968. * @reassoc_failure_timeout: re-assoc failure timeout
  969. * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  970. * @olbc_detect_timeout: OLBC detect timeout
  971. * @addts_rsp_timeout: ADDTS rsp timeout value
  972. * @heart_beat_threshold: Heart beat threshold
  973. * @ap_keep_alive_timeout: AP keep alive timeout value
  974. * @ap_link_monitor_timeout: AP link monitor timeout value
  975. * @ps_data_inactivity_timeout: PS data inactivity timeout
  976. */
  977. struct wlan_mlme_timeout {
  978. uint32_t join_failure_timeout;
  979. uint32_t auth_failure_timeout;
  980. uint32_t auth_rsp_timeout;
  981. uint32_t assoc_failure_timeout;
  982. uint32_t reassoc_failure_timeout;
  983. uint32_t probe_after_hb_fail_timeout;
  984. uint32_t olbc_detect_timeout;
  985. uint32_t addts_rsp_timeout;
  986. uint32_t heart_beat_threshold;
  987. uint32_t ap_keep_alive_timeout;
  988. uint32_t ap_link_monitor_timeout;
  989. uint32_t ps_data_inactivity_timeout;
  990. };
  991. /**
  992. * struct wlan_mlme_oce - OCE related config items
  993. * @enable_bcast_probe_rsp: enable broadcast probe response
  994. * @oce_sta_enabled: enable/disable oce feature for sta
  995. * @oce_sap_enabled: enable/disable oce feature for sap
  996. * @fils_enabled: enable/disable fils support
  997. * @feature_bitmap: oce feature bitmap
  998. *
  999. */
  1000. struct wlan_mlme_oce {
  1001. bool enable_bcast_probe_rsp;
  1002. bool oce_sta_enabled;
  1003. bool oce_sap_enabled;
  1004. bool fils_enabled;
  1005. uint8_t feature_bitmap;
  1006. };
  1007. #define MLME_WEP_MAX_KEY_LEN (13)
  1008. /**
  1009. * enum wep_key_id - values passed to get/set wep default keys
  1010. * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
  1011. * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
  1012. * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
  1013. * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
  1014. */
  1015. enum wep_key_id {
  1016. MLME_WEP_DEFAULT_KEY_1 = 0,
  1017. MLME_WEP_DEFAULT_KEY_2,
  1018. MLME_WEP_DEFAULT_KEY_3,
  1019. MLME_WEP_DEFAULT_KEY_4
  1020. };
  1021. /**
  1022. * struct wlan_mlme_wep_cfg - WEP related configs
  1023. * @is_privacy_enabled: Flag to check if encryption is enabled
  1024. * @is_shared_key_auth: Flag to check if the auth type is shared key
  1025. * @is_auth_open_system: Flag to check if the auth type is open
  1026. * @auth_type: Authentication type value
  1027. * @wep_default_key_id: Default WEP key id
  1028. * @wep_default_key_1: WEP encryption key 1
  1029. * @wep_default_key_2: WEP encryption key 2
  1030. * @wep_default_key_3: WEP encryption key 3
  1031. * @wep_default_key_4: WEP encryption key 4
  1032. */
  1033. struct wlan_mlme_wep_cfg {
  1034. bool is_privacy_enabled;
  1035. bool is_shared_key_auth;
  1036. bool is_auth_open_system;
  1037. uint8_t auth_type;
  1038. uint8_t wep_default_key_id;
  1039. struct mlme_cfg_str wep_default_key_1;
  1040. struct mlme_cfg_str wep_default_key_2;
  1041. struct mlme_cfg_str wep_default_key_3;
  1042. struct mlme_cfg_str wep_default_key_4;
  1043. };
  1044. /**
  1045. * struct wlan_mlme_cfg - MLME config items
  1046. * @chainmask_cfg: VHT chainmask related cfg items
  1047. * @edca_params: edca related CFG items
  1048. * @gen: Generic CFG items
  1049. * @ht_caps: HT related CFG Items
  1050. * @he_caps: HE related cfg items
  1051. * @lfr: LFR related CFG Items
  1052. * @obss_ht40:obss ht40 CFG Items
  1053. * @mbo_cfg: Multiband Operation related CFG items
  1054. * @vht_caps: VHT related CFG Items
  1055. * @qos_mlme_params: QOS CFG Items
  1056. * @rates: Rates related cfg items
  1057. * @product_details: product details related CFG Items
  1058. * @dfs_cfg: DFS related CFG Items
  1059. * @sap_protection_cfg: SAP erp protection related CFG items
  1060. * @sap_cfg: sap CFG items
  1061. * @sta: sta CFG Items
  1062. * @scoring: BSS Scoring related CFG Items
  1063. * @oce: OCE related CFG items
  1064. * @threshold: threshold related cfg items
  1065. * @timeouts: mlme timeout related CFG items
  1066. * @acs: ACS related CFG items
  1067. * @feature_flags: Feature flag config items
  1068. * @wep_params: WEP related config items
  1069. * @wmm_params: WMM related CFG & INI Items
  1070. */
  1071. struct wlan_mlme_cfg {
  1072. struct wlan_mlme_chainmask chainmask_cfg;
  1073. struct wlan_mlme_edca_params edca_params;
  1074. struct wlan_mlme_generic gen;
  1075. struct wlan_mlme_ht_caps ht_caps;
  1076. struct wlan_mlme_he_caps he_caps;
  1077. struct wlan_mlme_lfr_cfg lfr;
  1078. struct wlan_mlme_obss_ht40 obss_ht40;
  1079. struct wlan_mlme_mbo mbo_cfg;
  1080. struct wlan_mlme_vht_caps vht_caps;
  1081. struct wlan_mlme_qos qos_mlme_params;
  1082. struct wlan_mlme_rates rates;
  1083. struct wlan_mlme_product_details_cfg product_details;
  1084. struct wlan_mlme_dfs_cfg dfs_cfg;
  1085. struct wlan_mlme_sap_protection sap_protection_cfg;
  1086. struct wlan_mlme_cfg_sap sap_cfg;
  1087. struct wlan_mlme_sta_cfg sta;
  1088. struct wlan_mlme_scoring_cfg scoring;
  1089. struct wlan_mlme_oce oce;
  1090. struct wlan_mlme_threshold threshold;
  1091. struct wlan_mlme_timeout timeouts;
  1092. struct wlan_mlme_acs acs;
  1093. struct wlan_mlme_feature_flag feature_flags;
  1094. struct wlan_mlme_wep_cfg wep_params;
  1095. struct wlan_mlme_wmm_params wmm_params;
  1096. };
  1097. #endif