wlan_mlme_public_struct.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095
  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_mbo - Multiband Operation related ini configs
  255. * @mbo_candidate_rssi_thres:
  256. * @mbo_current_rssi_thres:
  257. * @mbo_current_rssi_mcc_thres:
  258. * @mbo_candidate_rssi_btc_thres:
  259. */
  260. struct wlan_mlme_mbo {
  261. int8_t mbo_candidate_rssi_thres;
  262. int8_t mbo_current_rssi_thres;
  263. int8_t mbo_current_rssi_mcc_thres;
  264. int8_t mbo_candidate_rssi_btc_thres;
  265. };
  266. /**
  267. * struct wlan_mlme_vht_caps - MLME VHT config items
  268. * @supp_chan_width: Supported Channel Width
  269. * @ldpc_coding_cap: LDPC Coding Capability
  270. * @short_gi_80mhz: 80MHz Short Guard Interval
  271. * @short_gi_160mhz: 160MHz Short Guard Interval
  272. * @tx_stbc: Tx STBC cap
  273. * @rx_stbc: Rx STBC cap
  274. * @su_bformer: SU Beamformer cap
  275. * @su_bformee: SU Beamformee cap
  276. * @tx_bfee_ant_supp: Tx beamformee anti supp
  277. * @num_soundingdim: Number of sounding dimensions
  278. * @mu_bformer: MU Beamformer cap
  279. * @txop_ps: Tx OPs in power save
  280. * @htc_vhtc: htc_vht capability
  281. * @link_adap_cap: Link adaptation capability
  282. * @rx_antpattern: Rx Antenna Pattern cap
  283. * @tx_antpattern: Tx Antenna Pattern cap
  284. * @rx_mcs_map: Rx MCS Map
  285. * @tx_mcs_map: Tx MCS Map
  286. * @rx_supp_data_rate: Rx highest supported data rate
  287. * @tx_supp_data_rate: Tx highest supported data rate
  288. * @basic_mcs_set: Basic MCS set
  289. * @enable_txbf_20mhz: enable tx bf for 20mhz
  290. * @channel_width: Channel width capability for 11ac
  291. * @rx_mcs: VHT Rx MCS capability for 1x1 mode
  292. * @tx_mcs: VHT Tx MCS capability for 1x1 mode
  293. * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
  294. * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
  295. * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
  296. * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
  297. * @enable_mu_bformee: Enables/disables multi-user (MU)
  298. * beam formee capability
  299. * @enable_paid: Enables/disables paid
  300. * @enable_gid: Enables/disables gid
  301. * @b24ghz_band: To control VHT support in 2.4 GHz band
  302. * @vendor_24ghz_band: to control VHT support based on vendor
  303. * ie in 2.4 GHz band
  304. * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
  305. * @ampdu_len: To handle maximum receive AMPDU ampdu len
  306. */
  307. struct mlme_vht_capabilities_info {
  308. uint8_t supp_chan_width;
  309. bool ldpc_coding_cap;
  310. bool short_gi_80mhz;
  311. bool short_gi_160mhz;
  312. bool tx_stbc;
  313. bool rx_stbc;
  314. bool su_bformer;
  315. bool su_bformee;
  316. uint8_t tx_bfee_ant_supp;
  317. uint8_t num_soundingdim;
  318. bool mu_bformer;
  319. bool txop_ps;
  320. bool htc_vhtc;
  321. uint8_t link_adap_cap;
  322. bool rx_antpattern;
  323. bool tx_antpattern;
  324. uint32_t rx_mcs_map;
  325. uint32_t tx_mcs_map;
  326. uint32_t rx_supp_data_rate;
  327. uint32_t tx_supp_data_rate;
  328. uint32_t basic_mcs_set;
  329. bool enable_txbf_20mhz;
  330. uint8_t channel_width;
  331. uint8_t rx_mcs;
  332. uint8_t tx_mcs;
  333. uint8_t rx_mcs2x2;
  334. uint8_t tx_mcs2x2;
  335. bool enable_vht20_mcs9;
  336. bool enable2x2;
  337. bool enable_mu_bformee;
  338. bool enable_paid;
  339. bool enable_gid;
  340. bool b24ghz_band;
  341. bool vendor_24ghz_band;
  342. uint8_t ampdu_len_exponent;
  343. uint8_t ampdu_len;
  344. };
  345. /**
  346. * struct wlan_mlme_vht_caps - VHT Capabilities related config items
  347. * @vht_cap_info: VHT capabilities Info Structure
  348. */
  349. struct wlan_mlme_vht_caps {
  350. struct mlme_vht_capabilities_info vht_cap_info;
  351. };
  352. /**
  353. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  354. * @tx_aggregation_size: TX aggr size in number of MPDUs
  355. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  356. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  357. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  358. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  359. * @rx_aggregation_size: No. of MPDUs for RX aggr
  360. * @tx_aggr_sw_retry_threshold_be: Tx aggregation sw retry for BE
  361. * @tx_aggr_sw_retry_threshold_bk: Tx aggregation sw retry for BK
  362. * @tx_aggr_sw_retry_threshold_vi: Tx aggregation sw retry for VI
  363. * @tx_aggr_sw_retry_threshold_vo: Tx aggregation sw retry for VO
  364. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  365. * hostapd.conf
  366. */
  367. struct wlan_mlme_qos {
  368. uint32_t tx_aggregation_size;
  369. uint32_t tx_aggregation_size_be;
  370. uint32_t tx_aggregation_size_bk;
  371. uint32_t tx_aggregation_size_vi;
  372. uint32_t tx_aggregation_size_vo;
  373. uint32_t rx_aggregation_size;
  374. uint32_t tx_aggr_sw_retry_threshold_be;
  375. uint32_t tx_aggr_sw_retry_threshold_bk;
  376. uint32_t tx_aggr_sw_retry_threshold_vi;
  377. uint32_t tx_aggr_sw_retry_threshold_vo;
  378. bool sap_max_inactivity_override;
  379. };
  380. #define MLME_HE_PPET_LEN 25
  381. /**
  382. * struct wlan_mlme_he_caps - HE Capabilities related config items
  383. */
  384. struct wlan_mlme_he_caps {
  385. uint8_t he_control;
  386. uint8_t he_twt_requestor;
  387. uint8_t he_twt_responder;
  388. uint8_t he_twt_fragmentation;
  389. uint8_t he_max_frag_msdu;
  390. uint8_t he_min_frag_size;
  391. uint8_t he_trig_pad;
  392. uint8_t he_mtid_aggr_rx;
  393. uint8_t he_link_adaptation;
  394. uint8_t he_all_ack;
  395. uint8_t he_trigd_rsp_scheduling;
  396. uint8_t he_buffer_status_rpt;
  397. uint8_t he_bcast_twt;
  398. uint8_t he_ba_32bit;
  399. uint8_t he_mu_cascading;
  400. uint8_t he_multi_tid;
  401. uint8_t he_dl_mu_ba;
  402. uint8_t he_omi;
  403. uint8_t he_ofdma_ra;
  404. uint8_t he_max_ampdu_len;
  405. uint8_t he_amsdu_frag;
  406. uint8_t he_flex_twt_sched;
  407. uint8_t he_rx_ctrl;
  408. uint8_t he_bsrp_ampdu_aggr;
  409. uint8_t he_qtp;
  410. uint8_t he_a_bqr;
  411. uint8_t he_sr_responder;
  412. uint8_t he_ndp_feedback_supp;
  413. uint8_t he_ops_supp;
  414. uint8_t he_amsdu_in_ampdu;
  415. uint8_t he_chan_width;
  416. uint8_t he_mtid_aggr_tx;
  417. uint8_t he_sub_ch_sel_tx;
  418. uint8_t he_ul_2x996_ru;
  419. uint8_t he_om_ctrl_ul_mu_dis_rx;
  420. uint8_t he_rx_pream_punc;
  421. uint8_t he_class_of_device;
  422. uint8_t he_ldpc;
  423. uint8_t he_ltf_ppdu;
  424. uint8_t he_midamble_rx_nsts;
  425. uint8_t he_ltf_ndp;
  426. uint8_t he_tx_stbc_lt80;
  427. uint8_t he_rx_stbc_lt80;
  428. uint8_t he_doppler;
  429. uint8_t he_ul_mumimo;
  430. uint8_t he_dcm_tx;
  431. uint8_t he_dcm_rx;
  432. uint8_t he_mu_ppdu;
  433. uint8_t he_su_beamformer;
  434. uint8_t he_su_beamformee;
  435. uint8_t he_mu_beamformer;
  436. uint8_t he_bfee_sts_lt80;
  437. uint8_t he_bfee_sts_gt80;
  438. uint8_t he_num_sound_lt80;
  439. uint8_t he_num_sound_gt80;
  440. uint8_t he_su_feed_tone16;
  441. uint8_t he_mu_feed_tone16;
  442. uint8_t he_codebook_su;
  443. uint8_t he_codebook_mu;
  444. uint8_t he_bfrm_feed;
  445. uint8_t he_er_su_ppdu;
  446. uint8_t he_dl_part_bw;
  447. uint8_t he_ppet_present;
  448. uint8_t he_srp;
  449. uint8_t he_power_boost;
  450. uint8_t he_4x_ltf_gi;
  451. uint8_t he_max_nc;
  452. uint8_t he_rx_stbc_gt80;
  453. uint8_t he_tx_stbc_gt80;
  454. uint8_t he_er_4x_ltf_gi;
  455. uint8_t he_ppdu_20_in_40mhz_2g;
  456. uint8_t he_ppdu_20_in_160_80p80mhz;
  457. uint8_t he_ppdu_80_in_160_80p80mhz;
  458. uint8_t he_er_1x_he_ltf_gi;
  459. uint8_t he_midamble_rx_1x_he_ltf;
  460. uint8_t he_dcm_max_bw;
  461. uint8_t he_longer_16_sigb_ofdm_sym;
  462. uint8_t he_non_trig_cqi_feedback;
  463. uint8_t he_tx_1024_qam_lt_242_ru;
  464. uint8_t he_rx_1024_qam_lt_242_ru;
  465. uint8_t he_rx_full_bw_mu_cmpr_sigb;
  466. uint8_t he_rx_full_bw_mu_non_cmpr_sigb;
  467. uint32_t he_rx_mcs_map_lt_80;
  468. uint32_t he_tx_mcs_map_lt_80;
  469. uint32_t he_rx_mcs_map_160;
  470. uint32_t he_tx_mcs_map_160;
  471. uint32_t he_rx_mcs_map_80_80;
  472. uint32_t he_tx_mcs_map_80_80;
  473. uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
  474. uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
  475. uint32_t he_ops_basic_mcs_nss;
  476. uint8_t he_twt_dynamic_fragmentation;
  477. uint8_t enable_ul_mimo;
  478. uint8_t enable_ul_ofdm;
  479. uint32_t he_sta_obsspd;
  480. };
  481. /**
  482. * struct wlan_mlme_rates - RATES related config items
  483. * @cfpPeriod: cfp period info
  484. * @cfpMaxDuration: cfp Max duration info
  485. * @max_htmcs_txdata: max HT mcs info for Tx
  486. * @disable_abg_rate_txdata: disable abg rate info for tx data
  487. * @sap_max_mcs_txdata: sap max mcs info
  488. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  489. */
  490. struct wlan_mlme_rates {
  491. uint8_t cfp_period;
  492. uint16_t cfp_max_duration;
  493. uint16_t max_htmcs_txdata;
  494. bool disable_abg_rate_txdata;
  495. uint16_t sap_max_mcs_txdata;
  496. uint8_t disable_high_ht_mcs_2x2;
  497. };
  498. /* Flags for gLimProtectionControl that is updated in pe session*/
  499. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  500. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  501. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  502. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  503. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  504. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  505. /* protection_enabled bits*/
  506. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  507. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  508. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  509. #define MLME_PROTECTION_ENABLED_HT_20 3
  510. #define MLME_PROTECTION_ENABLED_NON_GF 4
  511. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  512. #define MLME_PROTECTION_ENABLED_RIFS 6
  513. #define MLME_PROTECTION_ENABLED_OBSS 7
  514. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  515. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  516. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  517. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  518. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  519. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  520. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  521. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  522. /**
  523. * struct wlan_mlme_feature_flag - feature related information
  524. * @accept_short_slot_assoc: enable short sloc feature
  525. * @enable_hcf: enable HCF feature
  526. * @enable_rsn: enable RSN for connection
  527. * @enable_short_preamble_11g: enable short preamble for 11g
  528. * @channel_bonding_mode: channel bonding mode
  529. * @enable_block_ack: enable block ack feature
  530. * @enable_ampdu: Enable AMPDU feature
  531. */
  532. struct wlan_mlme_feature_flag {
  533. bool accept_short_slot_assoc;
  534. bool enable_hcf;
  535. bool enable_rsn;
  536. bool enable_short_preamble_11g;
  537. bool enable_short_slot_time_11g;
  538. uint32_t channel_bonding_mode;
  539. uint32_t enable_block_ack;
  540. bool enable_ampdu;
  541. };
  542. /*
  543. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  544. *
  545. * @protection_enabled: Force enable protection. static via cfg
  546. * @protection_force_policy: Protection force policy. Static via cfg
  547. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  548. *
  549. */
  550. struct wlan_mlme_sap_protection {
  551. uint32_t protection_enabled;
  552. uint8_t protection_force_policy;
  553. bool ignore_peer_ht_opmode;
  554. };
  555. /*
  556. * struct wlan_mlme_chainmask - All chainmask related cfg items
  557. *
  558. * @txchainmask1x1: To set transmit chainmask
  559. * @rxchainmask1x1: To set rx chainmask
  560. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  561. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  562. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  563. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  564. * @tx_chain_mask_2g: Tx chain mask for 2g
  565. * @rx_chain_mask_2g: Tx chain mask for 2g
  566. * @tx_chain_mask_5g: Tx chain mask for 5g
  567. * @rx_chain_mask_5g: Rx chain mask for 5g
  568. */
  569. struct wlan_mlme_chainmask {
  570. uint8_t txchainmask1x1;
  571. uint8_t rxchainmask1x1;
  572. bool tx_chain_mask_cck;
  573. uint8_t tx_chain_mask_1ss;
  574. uint16_t num_11b_tx_chains;
  575. uint16_t num_11ag_tx_chains;
  576. uint8_t tx_chain_mask_2g;
  577. uint8_t rx_chain_mask_2g;
  578. uint8_t tx_chain_mask_5g;
  579. uint8_t rx_chain_mask_5g;
  580. };
  581. /* struct wlan_mlme_generic - Generic CFG config items
  582. *
  583. * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
  584. * @band: Current Band - Internal variable, initialized to INI and updated later
  585. * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
  586. * @sub_20_chan_width: Sub 20Mhz Channel Width
  587. * @ito_repeat_count: ITO Repeat Count
  588. * @pmf_sa_query_max_retries: PMF query max retries for SAP
  589. * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
  590. * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
  591. * @rtt3_enabled: RTT3 enable or disable info
  592. * @prevent_link_down: Enable/Disable prevention of link down
  593. * @memory_deep_sleep: Enable/Disable memory deep sleep
  594. * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
  595. * @crash_inject: Enable/Disable Crash Inject
  596. * @lpass_support: Enable/Disable LPASS Support
  597. * @self_recovery: Enable/Disable Self Recovery
  598. * @sap_dot11mc: Enable/Disable SAP 802.11mc support
  599. * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
  600. * @optimize_ca_event: Enable/Disable Optimization of CA events
  601. * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  602. */
  603. struct wlan_mlme_generic {
  604. enum band_info band_capability;
  605. enum band_info band;
  606. uint8_t select_5ghz_margin;
  607. uint8_t sub_20_chan_width;
  608. uint8_t ito_repeat_count;
  609. uint8_t pmf_sa_query_max_retries;
  610. uint16_t pmf_sa_query_retry_interval;
  611. uint16_t dropped_pkt_disconnect_thresh;
  612. bool rtt3_enabled;
  613. bool prevent_link_down;
  614. bool memory_deep_sleep;
  615. bool cck_tx_fir_override;
  616. bool crash_inject;
  617. bool lpass_support;
  618. bool self_recovery;
  619. bool sap_dot11mc;
  620. bool fatal_event_trigger;
  621. bool optimize_ca_event;
  622. bool fw_timeout_crash;
  623. };
  624. /*
  625. * struct wlan_mlme_product_details_cfg - product details config items
  626. * @manufacturer_name: manufacture name
  627. * @model_number: model number
  628. * @model_name: model name
  629. * @manufacture_product_name: manufacture product name
  630. * @manufacture_product_version: manufacture product version
  631. */
  632. struct wlan_mlme_product_details_cfg {
  633. char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
  634. char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
  635. char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
  636. char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
  637. char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
  638. };
  639. /*
  640. * struct wlan_mlme_acs - All acs related cfg items
  641. * @is_acs_with_more_param - to enable acs with more param
  642. * @auto_channel_select_weight - to set acs channel weight
  643. * @is_vendor_acs_support - enable application based channel selection
  644. * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
  645. * @is_external_acs_policy - control external policy
  646. */
  647. struct wlan_mlme_acs {
  648. bool is_acs_with_more_param;
  649. uint32_t auto_channel_select_weight;
  650. bool is_vendor_acs_support;
  651. bool is_acs_support_for_dfs_ltecoex;
  652. bool is_external_acs_policy;
  653. };
  654. /**
  655. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  656. * @active_dwelltime: obss active dwelltime
  657. * @passive_dwelltime: obss passive dwelltime
  658. * @width_trigger_interval: obss trigger interval
  659. * @passive_per_channel: obss scan passive total duration per channel
  660. * @active_per_channel: obss scan active total duration per channel
  661. * @width_trans_delay: obss width transition delay
  662. * @scan_activity_threshold: obss scan activity threshold
  663. */
  664. struct wlan_mlme_obss_ht40 {
  665. uint32_t active_dwelltime;
  666. uint32_t passive_dwelltime;
  667. uint32_t width_trigger_interval;
  668. uint32_t passive_per_channel;
  669. uint32_t active_per_channel;
  670. uint32_t width_trans_delay;
  671. uint32_t scan_activity_threshold;
  672. };
  673. /**
  674. * enum dot11p_mode - The 802.11p mode of operation
  675. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  676. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  677. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  678. */
  679. enum dot11p_mode {
  680. CFG_11P_DISABLED = 0,
  681. CFG_11P_STANDALONE,
  682. CFG_11P_CONCURRENT,
  683. };
  684. /**
  685. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  686. * @sta_keep_alive_period: Sends NULL frame to AP period
  687. * @tgt_gtx_usr_cfg: Target gtx user config
  688. * @pmkid_modes: Enable PMKID modes
  689. * @wait_cnf_timeout: Wait assoc cnf timeout
  690. * @dot11p_mode: Set 802.11p mode
  691. * @fils_max_chan_guard_time: Set maximum channel guard time
  692. * @current_rssi: Current rssi
  693. * @ignore_peer_erp_info: Ignore peer infrormation
  694. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  695. * @enable_5g_ebt: Set default 5G early beacon termination
  696. * @deauth_before_connection: Send deauth before connection or not
  697. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  698. * @qcn_ie_support: QCN IE support
  699. * @force_rsne_override: Force rsnie override from user
  700. * @single_tid: Set replay counter for all TID
  701. */
  702. struct wlan_mlme_sta_cfg {
  703. uint32_t sta_keep_alive_period;
  704. uint32_t tgt_gtx_usr_cfg;
  705. uint32_t pmkid_modes;
  706. uint32_t wait_cnf_timeout;
  707. uint8_t dot11p_mode;
  708. uint8_t fils_max_chan_guard_time;
  709. uint8_t current_rssi;
  710. bool ignore_peer_erp_info;
  711. bool sta_prefer_80mhz_over_160mhz;
  712. bool enable_5g_ebt;
  713. bool deauth_before_connection;
  714. bool enable_go_cts2self_for_sta;
  715. bool qcn_ie_support;
  716. bool force_rsne_override;
  717. bool single_tid;
  718. };
  719. /*
  720. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  721. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  722. * @lfr3_roaming_offload: Enable/disable roam offload feature
  723. * @early_stop_scan_enable: Set early stop scan
  724. * @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
  725. * @enable_5g_band_pref: Enable preference for 5G from INI
  726. * @mawc_roam_traffic_threshold: Configure traffic threshold
  727. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  728. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  729. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  730. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  731. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  732. * @early_stop_scan_min_threshold: Set early stop scan min
  733. * @early_stop_scan_max_threshold: Set early stop scan max
  734. * @first_scan_bucket_threshold: Set first scan bucket
  735. * @roam_dense_traffic_threshold: Dense traffic threshold
  736. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  737. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  738. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  739. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  740. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  741. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  742. * @per_roam_enable: To enabled/disable PER based roaming in FW
  743. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  744. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  745. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  746. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  747. * @per_roam_monitor_time: Min time to be considered as valid scenario
  748. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  749. * @lfr3_disallow_duration: Disallow duration before roaming
  750. * @lfr3_rssi_channel_penalization: RSSI penalization
  751. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  752. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  753. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  754. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  755. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  756. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  757. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  758. * @max_num_pre_auth: Configure max number of pre-auth
  759. */
  760. struct wlan_mlme_lfr_cfg {
  761. bool mawc_roam_enabled;
  762. bool enable_fast_roam_in_concurrency;
  763. bool lfr3_roaming_offload;
  764. bool early_stop_scan_enable;
  765. bool lfr3_enable_subnet_detection;
  766. bool enable_5g_band_pref;
  767. uint32_t mawc_roam_traffic_threshold;
  768. uint32_t mawc_roam_ap_rssi_threshold;
  769. uint32_t mawc_roam_rssi_high_adjust;
  770. uint32_t mawc_roam_rssi_low_adjust;
  771. uint32_t roam_rssi_abs_threshold;
  772. uint8_t rssi_threshold_offset_5g;
  773. uint8_t early_stop_scan_min_threshold;
  774. uint8_t early_stop_scan_max_threshold;
  775. uint8_t first_scan_bucket_threshold;
  776. uint32_t roam_dense_traffic_threshold;
  777. uint32_t roam_dense_rssi_thre_offset;
  778. uint32_t roam_dense_min_aps;
  779. uint32_t roam_bg_scan_bad_rssi_threshold;
  780. uint32_t roam_bg_scan_client_bitmap;
  781. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  782. uint32_t adaptive_roamscan_dwell_mode;
  783. uint32_t per_roam_enable;
  784. uint32_t per_roam_config_high_rate_th;
  785. uint32_t per_roam_config_low_rate_th;
  786. uint32_t per_roam_config_rate_th_percent;
  787. uint32_t per_roam_rest_time;
  788. uint32_t per_roam_monitor_time;
  789. uint32_t per_roam_min_candidate_rssi;
  790. uint32_t lfr3_disallow_duration;
  791. uint32_t lfr3_rssi_channel_penalization;
  792. uint32_t lfr3_num_disallowed_aps;
  793. uint32_t rssi_boost_threshold_5g;
  794. uint32_t rssi_boost_factor_5g;
  795. uint32_t max_rssi_boost_5g;
  796. uint32_t rssi_penalize_threshold_5g;
  797. uint32_t rssi_penalize_factor_5g;
  798. uint32_t max_rssi_penalize_5g;
  799. uint32_t max_num_pre_auth;
  800. };
  801. /**
  802. * struct wlan_mlme_weight_config - weight params to
  803. * calculate best candidate
  804. *
  805. * @rssi_weightage: RSSI weightage
  806. * @ht_caps_weightage: HT caps weightage
  807. * @vht_caps_weightage: VHT caps weightage
  808. * @he_caps_weightage: HE caps weightage
  809. * @chan_width_weightage: Channel width weightage
  810. * @chan_band_weightage: Channel band weightage
  811. * @nss_weightage: NSS weightage
  812. * @beamforming_cap_weightage: Beamforming caps weightage
  813. * @pcl_weightage: PCL weightage
  814. * @channel_congestion_weightage: channel congestion weightage
  815. * @oce_wan_weightage: OCE WAN metrics weightage
  816. */
  817. struct wlan_mlme_weight_config {
  818. uint8_t rssi_weightage;
  819. uint8_t ht_caps_weightage;
  820. uint8_t vht_caps_weightage;
  821. uint8_t he_caps_weightage;
  822. uint8_t chan_width_weightage;
  823. uint8_t chan_band_weightage;
  824. uint8_t nss_weightage;
  825. uint8_t beamforming_cap_weightage;
  826. uint8_t pcl_weightage;
  827. uint8_t channel_congestion_weightage;
  828. uint8_t oce_wan_weightage;
  829. };
  830. /**
  831. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  832. * calculate best candidate
  833. *
  834. * @best_rssi_threshold: Best RSSI threshold
  835. * @good_rssi_threshold: Good RSSI threshold
  836. * @bad_rssi_threshold: Bad RSSI threshold
  837. * @good_rssi_pcnt: Good RSSI Percentage
  838. * @bad_rssi_pcnt: Bad RSSI Percentage
  839. * @good_rssi_bucket_size: Good RSSI Bucket Size
  840. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  841. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  842. */
  843. struct wlan_mlme_rssi_cfg_score {
  844. uint32_t best_rssi_threshold;
  845. uint32_t good_rssi_threshold;
  846. uint32_t bad_rssi_threshold;
  847. uint32_t good_rssi_pcnt;
  848. uint32_t bad_rssi_pcnt;
  849. uint32_t good_rssi_bucket_size;
  850. uint32_t bad_rssi_bucket_size;
  851. uint32_t rssi_pref_5g_rssi_thresh;
  852. };
  853. /**
  854. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  855. * for a scoring param.
  856. * num_slot: number of slots in which the param will be divided.
  857. * Max 15. index 0 is used for 'not_present. Num_slot will
  858. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  859. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  860. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  861. * BITS 0-7 :- the scoring pcnt when not present
  862. * BITS 8-15 :- SLOT_1
  863. * BITS 16-23 :- SLOT_2
  864. * BITS 24-31 :- SLOT_3
  865. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  866. * BITS 0-7 :- SLOT_4
  867. * BITS 8-15 :- SLOT_5
  868. * BITS 16-23 :- SLOT_6
  869. * BITS 24-31 :- SLOT_7
  870. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  871. * BITS 0-7 :- SLOT_8
  872. * BITS 8-15 :- SLOT_9
  873. * BITS 16-23 :- SLOT_10
  874. * BITS 24-31 :- SLOT_11
  875. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  876. * BITS 0-7 :- SLOT_12
  877. * BITS 8-15 :- SLOT_13
  878. * BITS 16-23 :- SLOT_14
  879. * BITS 24-31 :- SLOT_15
  880. */
  881. struct wlan_mlme_per_slot_scoring {
  882. uint32_t num_slot;
  883. uint32_t score_pcnt3_to_0;
  884. uint32_t score_pcnt7_to_4;
  885. uint32_t score_pcnt11_to_8;
  886. uint32_t score_pcnt15_to_12;
  887. };
  888. /*
  889. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  890. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  891. * @weight_cfg: Various Weight related Scoring Configs
  892. * @rssi_score: RSSI Scoring related thresholds/percentages config
  893. * @esp_qbss_scoring: ESP QBSS Scoring configs
  894. * @oce_wan_scoring: OCE WAN Scoring Configs
  895. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  896. * @nss_weight_per_index: NSS weight per index for scoring logic
  897. * @band_weight_per_index: Band weight per index for scoring logic
  898. */
  899. struct wlan_mlme_scoring_cfg {
  900. bool enable_scoring_for_roam;
  901. struct wlan_mlme_weight_config weight_cfg;
  902. struct wlan_mlme_rssi_cfg_score rssi_score;
  903. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  904. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  905. uint32_t bandwidth_weight_per_index;
  906. uint32_t nss_weight_per_index;
  907. uint32_t band_weight_per_index;
  908. };
  909. /* struct wlan_mlme_threshold - Threshold related config items
  910. * @rts_threshold: set rts threshold
  911. * @frag_threshold: set fragmentation threshold
  912. */
  913. struct wlan_mlme_threshold {
  914. uint32_t rts_threshold;
  915. uint32_t frag_threshold;
  916. };
  917. /*
  918. * struct wlan_mlme_timeout - mlme timeout related config items
  919. * @join_failure_timeout: join failure timeout
  920. * @auth_failure_timeout: authenticate failure timeout
  921. * @auth_rsp_timeout: authenticate response timeout
  922. * @assoc_failure_timeout: assoc failure timeout
  923. * @reassoc_failure_timeout: re-assoc failure timeout
  924. * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  925. * @olbc_detect_timeout: OLBC detect timeout
  926. * @addts_rsp_timeout: ADDTS rsp timeout value
  927. * @heart_beat_threshold: Heart beat threshold
  928. * @ap_keep_alive_timeout: AP keep alive timeout value
  929. * @ap_link_monitor_timeout: AP link monitor timeout value
  930. * @ps_data_inactivity_timeout: PS data inactivity timeout
  931. */
  932. struct wlan_mlme_timeout {
  933. uint32_t join_failure_timeout;
  934. uint32_t auth_failure_timeout;
  935. uint32_t auth_rsp_timeout;
  936. uint32_t assoc_failure_timeout;
  937. uint32_t reassoc_failure_timeout;
  938. uint32_t probe_after_hb_fail_timeout;
  939. uint32_t olbc_detect_timeout;
  940. uint32_t addts_rsp_timeout;
  941. uint32_t heart_beat_threshold;
  942. uint32_t ap_keep_alive_timeout;
  943. uint32_t ap_link_monitor_timeout;
  944. uint32_t ps_data_inactivity_timeout;
  945. };
  946. /**
  947. * struct wlan_mlme_oce - OCE related config items
  948. * @enable_bcast_probe_rsp: enable broadcast probe response
  949. * @oce_sta_enabled: enable/disable oce feature for sta
  950. * @oce_sap_enabled: enable/disable oce feature for sap
  951. * @fils_enabled: enable/disable fils support
  952. * @feature_bitmap: oce feature bitmap
  953. *
  954. */
  955. struct wlan_mlme_oce {
  956. bool enable_bcast_probe_rsp;
  957. bool oce_sta_enabled;
  958. bool oce_sap_enabled;
  959. bool fils_enabled;
  960. uint8_t feature_bitmap;
  961. };
  962. #define MLME_WEP_MAX_KEY_LEN (13)
  963. /**
  964. * enum wep_key_id - values passed to get/set wep default keys
  965. * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
  966. * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
  967. * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
  968. * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
  969. */
  970. enum wep_key_id {
  971. MLME_WEP_DEFAULT_KEY_1 = 0,
  972. MLME_WEP_DEFAULT_KEY_2,
  973. MLME_WEP_DEFAULT_KEY_3,
  974. MLME_WEP_DEFAULT_KEY_4
  975. };
  976. /**
  977. * struct wlan_mlme_wep_cfg - WEP related configs
  978. * @is_privacy_enabled: Flag to check if encryption is enabled
  979. * @is_shared_key_auth: Flag to check if the auth type is shared key
  980. * @is_auth_open_system: Flag to check if the auth type is open
  981. * @auth_type: Authentication type value
  982. * @wep_default_key_id: Default WEP key id
  983. * @wep_default_key_1: WEP encryption key 1
  984. * @wep_default_key_2: WEP encryption key 2
  985. * @wep_default_key_3: WEP encryption key 3
  986. * @wep_default_key_4: WEP encryption key 4
  987. */
  988. struct wlan_mlme_wep_cfg {
  989. bool is_privacy_enabled;
  990. bool is_shared_key_auth;
  991. bool is_auth_open_system;
  992. uint8_t auth_type;
  993. uint8_t wep_default_key_id;
  994. struct mlme_cfg_str wep_default_key_1;
  995. struct mlme_cfg_str wep_default_key_2;
  996. struct mlme_cfg_str wep_default_key_3;
  997. struct mlme_cfg_str wep_default_key_4;
  998. };
  999. /**
  1000. * struct wlan_mlme_cfg - MLME config items
  1001. * @chainmask_cfg: VHT chainmask related cfg items
  1002. * @edca_params: edca related CFG items
  1003. * @gen: Generic CFG items
  1004. * @ht_caps: HT related CFG Items
  1005. * @he_caps: HE related cfg items
  1006. * @lfr: LFR related CFG Items
  1007. * @obss_ht40:obss ht40 CFG Items
  1008. * @mbo_cfg: Multiband Operation related CFG items
  1009. * @vht_caps: VHT related CFG Items
  1010. * @qos_mlme_params: QOS CFG Items
  1011. * @rates: Rates related cfg items
  1012. * @product_details: product details related CFG Items
  1013. * @sap_protection_cfg: SAP erp protection related CFG items
  1014. * @sap_cfg: sap CFG items
  1015. * @sta: sta CFG Items
  1016. * @scoring: BSS Scoring related CFG Items
  1017. * @oce: OCE related CFG items
  1018. * @threshold: threshold related cfg items
  1019. * @timeouts: mlme timeout related CFG items
  1020. * @acs: ACS related CFG items
  1021. * @feature_flags: Feature flag config items
  1022. * @wep_params: WEP related config items
  1023. */
  1024. struct wlan_mlme_cfg {
  1025. struct wlan_mlme_chainmask chainmask_cfg;
  1026. struct wlan_mlme_edca_params edca_params;
  1027. struct wlan_mlme_generic gen;
  1028. struct wlan_mlme_ht_caps ht_caps;
  1029. struct wlan_mlme_he_caps he_caps;
  1030. struct wlan_mlme_lfr_cfg lfr;
  1031. struct wlan_mlme_obss_ht40 obss_ht40;
  1032. struct wlan_mlme_mbo mbo_cfg;
  1033. struct wlan_mlme_vht_caps vht_caps;
  1034. struct wlan_mlme_qos qos_mlme_params;
  1035. struct wlan_mlme_rates rates;
  1036. struct wlan_mlme_product_details_cfg product_details;
  1037. struct wlan_mlme_sap_protection sap_protection_cfg;
  1038. struct wlan_mlme_cfg_sap sap_cfg;
  1039. struct wlan_mlme_sta_cfg sta;
  1040. struct wlan_mlme_scoring_cfg scoring;
  1041. struct wlan_mlme_oce oce;
  1042. struct wlan_mlme_threshold threshold;
  1043. struct wlan_mlme_timeout timeouts;
  1044. struct wlan_mlme_acs acs;
  1045. struct wlan_mlme_feature_flag feature_flags;
  1046. struct wlan_mlme_wep_cfg wep_params;
  1047. };
  1048. #endif