wlan_mlme_public_struct.h 42 KB

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