wlan_mlme_public_struct.h 43 KB

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