wlan_mlme_public_struct.h 41 KB

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