wlan_mlme_public_struct.h 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532
  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. #include <wmi_unified_param.h>
  26. #include <sir_api.h>
  27. #define CFG_PMKID_MODES_OKC (0x1)
  28. #define CFG_PMKID_MODES_PMKSA_CACHING (0x2)
  29. #define CFG_VHT_BASIC_MCS_SET_STADEF 0xFFFE
  30. #define CFG_VHT_RX_MCS_MAP_STAMIN 0
  31. #define CFG_VHT_RX_MCS_MAP_STAMAX 0xFFFF
  32. #define CFG_VHT_RX_MCS_MAP_STADEF 0xFFFE
  33. #define CFG_VHT_TX_MCS_MAP_STAMIN 0
  34. #define CFG_VHT_TX_MCS_MAP_STAMAX 0xFFFF
  35. #define CFG_VHT_TX_MCS_MAP_STADEF 0xFFFE
  36. #define CFG_STR_DATA_LEN 17
  37. #define CFG_EDCA_DATA_LEN 17
  38. /**
  39. * struct mlme_cfg_str - generic structure for all mlme CFG string items
  40. *
  41. * @max_len: maximum data length allowed
  42. * @len: valid no. of elements of the data
  43. * @data: uint8_t array to store values
  44. */
  45. struct mlme_cfg_str {
  46. qdf_size_t max_len;
  47. qdf_size_t len;
  48. uint8_t data[CFG_STR_DATA_LEN];
  49. };
  50. /**
  51. * enum e_edca_type - to index edca params for edca profile
  52. * EDCA profile AC unicast/bcast
  53. * @edca_ani_acbe_local: ani BE unicast
  54. * @edca_ani_acbk_local: ani BK unicast
  55. * @edca_ani_acvi_local: ani VI unicast
  56. * @edca_ani_acvo_local: ani VO unicast
  57. * @edca_ani_acbe_bcast: ani BE bcast
  58. * @edca_ani_acbk_bcast: ani BK bcast
  59. * @edca_ani_acvi_bcast: ani VI bcast
  60. * @edca_ani_acvo_bcast: ani VO bcast
  61. * @edca_wme_acbe_local: wme BE unicast
  62. * @edca_wme_acbk_local: wme BK unicast
  63. * @edca_wme_acvi_local: wme VI unicast
  64. * @edca_wme_acvo_local: wme VO unicast
  65. * @edca_wme_acbe_bcast: wme BE bcast
  66. * @edca_wme_acbk_bcast: wme BK bcast
  67. * @edca_wme_acvi_bcast: wme VI bcast
  68. * @edca_wme_acvo_bcast: wme VO bcast
  69. * @edca_etsi_acbe_local: etsi BE unicast
  70. * @edca_etsi_acbk_local: etsi BK unicast
  71. * @edca_etsi_acvi_local: etsi VI unicast
  72. * @edca_etsi_acvo_local: etsi VO unicast
  73. * @edca_etsi_acbe_bcast: etsi BE bcast
  74. * @edca_etsi_acbk_bcast: etsi BK bcast
  75. * @edca_etsi_acvi_bcast: etsi VI bcast
  76. * @edca_etsi_acvo_bcast: etsi VO bcast
  77. */
  78. enum e_edca_type {
  79. edca_ani_acbe_local,
  80. edca_ani_acbk_local,
  81. edca_ani_acvi_local,
  82. edca_ani_acvo_local,
  83. edca_ani_acbe_bcast,
  84. edca_ani_acbk_bcast,
  85. edca_ani_acvi_bcast,
  86. edca_ani_acvo_bcast,
  87. edca_wme_acbe_local,
  88. edca_wme_acbk_local,
  89. edca_wme_acvi_local,
  90. edca_wme_acvo_local,
  91. edca_wme_acbe_bcast,
  92. edca_wme_acbk_bcast,
  93. edca_wme_acvi_bcast,
  94. edca_wme_acvo_bcast,
  95. edca_etsi_acbe_local,
  96. edca_etsi_acbk_local,
  97. edca_etsi_acvi_local,
  98. edca_etsi_acvo_local,
  99. edca_etsi_acbe_bcast,
  100. edca_etsi_acbk_bcast,
  101. edca_etsi_acvi_bcast,
  102. edca_etsi_acvo_bcast
  103. };
  104. #define CFG_EDCA_PROFILE_ACM_IDX 0
  105. #define CFG_EDCA_PROFILE_AIFSN_IDX 1
  106. #define CFG_EDCA_PROFILE_CWMINA_IDX 2
  107. #define CFG_EDCA_PROFILE_CWMAXA_IDX 4
  108. #define CFG_EDCA_PROFILE_TXOPA_IDX 6
  109. #define CFG_EDCA_PROFILE_CWMINB_IDX 7
  110. #define CFG_EDCA_PROFILE_CWMAXB_IDX 9
  111. #define CFG_EDCA_PROFILE_TXOPB_IDX 11
  112. #define CFG_EDCA_PROFILE_CWMING_IDX 12
  113. #define CFG_EDCA_PROFILE_CWMAXG_IDX 14
  114. #define CFG_EDCA_PROFILE_TXOPG_IDX 16
  115. /**
  116. * struct mlme_edca_ac_vo - cwmin, cwmax and aifs value for edca_ac_vo
  117. *
  118. * @vo_cwmin: cwmin value for voice
  119. * @vo_cwmax: cwmax value for voice
  120. * @vo_aifs: aifs value for voice
  121. */
  122. struct mlme_edca_ac_vo {
  123. uint32_t vo_cwmin;
  124. uint32_t vo_cwmax;
  125. uint32_t vo_aifs;
  126. };
  127. /**
  128. * struct mlme_edca_ac_vi - cwmin, cwmax and aifs value for edca_ac_vi
  129. *
  130. * @vi_cwmin: cwmin value for video
  131. * @vi_cwmax: cwmax value for video
  132. * @vi_aifs: aifs value for video
  133. */
  134. struct mlme_edca_ac_vi {
  135. uint32_t vi_cwmin;
  136. uint32_t vi_cwmax;
  137. uint32_t vi_aifs;
  138. };
  139. /**
  140. * struct mlme_edca_ac_bk - cwmin, cwmax and aifs value for edca_ac_bk
  141. *
  142. * @bk_cwmin: cwmin value for background
  143. * @bk_cwmax: cwmax value for background
  144. * @bk_aifs: aifs value for background
  145. */
  146. struct mlme_edca_ac_bk {
  147. uint32_t bk_cwmin;
  148. uint32_t bk_cwmax;
  149. uint32_t bk_aifs;
  150. };
  151. /**
  152. * struct mlme_edca_ac_be - cwmin, cwmax and aifs value for edca_ac_be
  153. *
  154. * @be_cwmin: cwmin value for best effort
  155. * @be_cwmax: cwmax value for best effort
  156. * @be_aifs: aifs value for best effort
  157. */
  158. struct mlme_edca_ac_be {
  159. uint32_t be_cwmin;
  160. uint32_t be_cwmax;
  161. uint32_t be_aifs;
  162. };
  163. /**
  164. * enum mlme_ts_info_ack_policy - TS Info Ack Policy
  165. * @TS_INFO_ACK_POLICY_NORMAL_ACK:normal ack
  166. * @TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK: HT immediate block ack
  167. */
  168. enum mlme_ts_info_ack_policy {
  169. TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
  170. TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
  171. };
  172. /**
  173. * struct mlme_edca_params - EDCA pramaters related config items
  174. *
  175. * @ani_acbk_l: EDCA parameters for ANI local access category background
  176. * @ani_acbe_l: EDCA parameters for ANI local access category best effort
  177. * @ani_acvi_l: EDCA parameters for ANI local access category video
  178. * @ani_acvo_l: EDCA parameters for ANI local access category voice
  179. * @ani_acbk_b: EDCA parameters for ANI bcast access category background
  180. * @ani_acbe_b: EDCA parameters for ANI bcast access category best effort
  181. * @ani_acvi_b: EDCA parameters for ANI bcast access category video
  182. * @ani_acvo_b: EDCA parameters for ANI bcast access category voice
  183. * @wme_acbk_l: EDCA parameters for WME local access category background
  184. * @wme_acbe_l: EDCA parameters for WME local access category best effort
  185. * @wme_acvi_l: EDCA parameters for WME local access category video
  186. * @wme_acvo_l: EDCA parameters for WME local access category voice
  187. * @wme_acbk_b: EDCA parameters for WME bcast access category background
  188. * @wme_acbe_b: EDCA parameters for WME bcast access category best effort
  189. * @wme_acvi_b: EDCA parameters for WME bcast access category video
  190. * @wme_acvo_b: EDCA parameters for WME bcast access category voice
  191. * @etsi_acbk_l: EDCA parameters for ETSI local access category background
  192. * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
  193. * @etsi_acvi_l: EDCA parameters for ETSI local access category video
  194. * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
  195. * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
  196. * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
  197. * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
  198. * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
  199. * @enable_edca_params: Enable edca parameter
  200. * @mlme_edca_ac_vo: value for edca_ac_vo
  201. * @mlme_edca_ac_vi: value for edca_ac_vi
  202. * @mlme_edca_ac_bk: value for edca_ac_bk
  203. * @mlme_edca_ac_be: value for edca_ac_be
  204. */
  205. struct wlan_mlme_edca_params {
  206. struct mlme_cfg_str ani_acbk_l;
  207. struct mlme_cfg_str ani_acbe_l;
  208. struct mlme_cfg_str ani_acvi_l;
  209. struct mlme_cfg_str ani_acvo_l;
  210. struct mlme_cfg_str ani_acbk_b;
  211. struct mlme_cfg_str ani_acbe_b;
  212. struct mlme_cfg_str ani_acvi_b;
  213. struct mlme_cfg_str ani_acvo_b;
  214. struct mlme_cfg_str wme_acbk_l;
  215. struct mlme_cfg_str wme_acbe_l;
  216. struct mlme_cfg_str wme_acvi_l;
  217. struct mlme_cfg_str wme_acvo_l;
  218. struct mlme_cfg_str wme_acbk_b;
  219. struct mlme_cfg_str wme_acbe_b;
  220. struct mlme_cfg_str wme_acvi_b;
  221. struct mlme_cfg_str wme_acvo_b;
  222. struct mlme_cfg_str etsi_acbk_l;
  223. struct mlme_cfg_str etsi_acbe_l;
  224. struct mlme_cfg_str etsi_acvi_l;
  225. struct mlme_cfg_str etsi_acvo_l;
  226. struct mlme_cfg_str etsi_acbk_b;
  227. struct mlme_cfg_str etsi_acbe_b;
  228. struct mlme_cfg_str etsi_acvi_b;
  229. struct mlme_cfg_str etsi_acvo_b;
  230. bool enable_edca_params;
  231. struct mlme_edca_ac_vo edca_ac_vo;
  232. struct mlme_edca_ac_vi edca_ac_vi;
  233. struct mlme_edca_ac_bk edca_ac_bk;
  234. struct mlme_edca_ac_be edca_ac_be;
  235. };
  236. #define WLAN_CFG_MFR_NAME_LEN (63)
  237. #define WLAN_CFG_MODEL_NUMBER_LEN (31)
  238. #define WLAN_CFG_MODEL_NAME_LEN (31)
  239. #define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
  240. #define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
  241. /**
  242. * struct mlme_ht_capabilities_info - HT Capabilities Info
  243. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  244. * @stbc_control_frame: STBC Control frame support
  245. * @psmp: PSMP Support
  246. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  247. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  248. * @delayed_ba: Support of Delayed Block Ack
  249. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  250. * @tx_stbc: Tx STBC Support
  251. * @short_gi_40_mhz: Short GI Support for HT40
  252. * @short_gi_20_mhz: Short GI support for HT20
  253. * @green_field: Support for HT Greenfield PPDUs
  254. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  255. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  256. * @adv_coding_cap: Rx LDPC support
  257. */
  258. #ifndef ANI_LITTLE_BIT_ENDIAN
  259. struct mlme_ht_capabilities_info {
  260. uint16_t l_sig_tx_op_protection:1;
  261. uint16_t stbc_control_frame:1;
  262. uint16_t psmp:1;
  263. uint16_t dsss_cck_mode_40_mhz:1;
  264. uint16_t maximal_amsdu_size:1;
  265. uint16_t delayed_ba:1;
  266. uint16_t rx_stbc:2;
  267. uint16_t tx_stbc:1;
  268. uint16_t short_gi_40_mhz:1;
  269. uint16_t short_gi_20_mhz:1;
  270. uint16_t green_field:1;
  271. uint16_t mimo_power_save:2;
  272. uint16_t supported_channel_width_set:1;
  273. uint16_t adv_coding_cap:1;
  274. } qdf_packed;
  275. #else
  276. struct mlme_ht_capabilities_info {
  277. uint16_t adv_coding_cap:1;
  278. uint16_t supported_channel_width_set:1;
  279. uint16_t mimo_power_save:2;
  280. uint16_t green_field:1;
  281. uint16_t short_gi_20_mhz:1;
  282. uint16_t short_gi_40_mhz:1;
  283. uint16_t tx_stbc:1;
  284. uint16_t rx_stbc:2;
  285. uint16_t delayed_ba:1;
  286. uint16_t maximal_amsdu_size:1;
  287. uint16_t dsss_cck_mode_40_mhz:1;
  288. uint16_t psmp:1;
  289. uint16_t stbc_control_frame:1;
  290. uint16_t l_sig_tx_op_protection:1;
  291. } qdf_packed;
  292. #endif
  293. /**
  294. * struct mlme_ht_param_info - HT AMPDU Parameters Info
  295. * @reserved: reserved bits
  296. * @mpdu_density: MPDU Density
  297. * @max_rx_ampdu_factor: Max Rx AMPDU Factor
  298. */
  299. #ifndef ANI_LITTLE_BIT_ENDIAN
  300. struct mlme_ht_param_info {
  301. uint8_t reserved:3;
  302. uint8_t mpdu_density:3;
  303. uint8_t max_rx_ampdu_factor:2;
  304. } qdf_packed;
  305. #else
  306. struct mlme_ht_param_info {
  307. uint8_t max_rx_ampdu_factor:2;
  308. uint8_t mpdu_density:3;
  309. uint8_t reserved:3;
  310. #endif
  311. } qdf_packed;
  312. /**
  313. * struct mlme_ht_ext_cap_info - Extended HT Capabilities Info
  314. * reserved_2: Reserved Bits
  315. * mcs_feedback: MCS Feedback Capability
  316. * reserved_1: Reserved Bits
  317. * transition_time: Time needed for transition between 20Mhz and 40 Mhz
  318. * pco: PCO (Phased Coexistence Operation) Support
  319. */
  320. #ifndef ANI_LITTLE_BIT_ENDIAN
  321. struct mlme_ht_ext_cap_info {
  322. uint16_t reserved_2:6;
  323. uint16_t mcs_feedback:2;
  324. uint16_t reserved_1:5;
  325. uint16_t transition_time:2;
  326. uint16_t pco:1;
  327. } qdf_packed;
  328. #else
  329. struct mlme_ht_ext_cap_info {
  330. uint16_t pco:1;
  331. uint16_t transition_time:2;
  332. uint16_t reserved1:5;
  333. uint16_t mcs_feedback:2;
  334. uint16_t reserved2:6;
  335. } qdf_packed;
  336. #endif
  337. /**
  338. * struct mlme_ht_info_field_1 - Additional HT IE Field1
  339. * @service_interval_granularity: Shortest Service Interval
  340. * @controlled_access_only: Access Control for assoc requests
  341. * @rifs_mode: Reduced Interframe Spacing mode
  342. * @recommended_tx_width_set: Recommended Tx Channel Width
  343. * @secondary_channel_offset: Secondary Channel Offset
  344. */
  345. #ifndef ANI_LITTLE_BIT_ENDIAN
  346. struct mlme_ht_info_field_1 {
  347. uint8_t service_interval_granularity:3;
  348. uint8_t controlled_access_only:1;
  349. uint8_t rifs_mode:1;
  350. uint8_t recommended_tx_width_set:1;
  351. uint8_t secondary_channel_offset:2;
  352. } qdf_packed;
  353. #else
  354. struct mlme_ht_info_field_1 {
  355. uint8_t secondary_channel_offset:2;
  356. uint8_t recommended_tx_width_set:1;
  357. uint8_t rifs_mode:1;
  358. uint8_t controlled_access_only:1;
  359. uint8_t service_interval_granularity:3;
  360. } qdf_packed;
  361. #endif
  362. /* struct mlme_ht_info_field_2 - Additional HT IE Field2
  363. * @reserved: reserved bits
  364. * @obss_non_ht_sta_present: Protection for non-HT STAs by Overlapping BSS
  365. * @transmit_burst_limit: Transmit Burst Limit
  366. * @non_gf_devices_present: Non Greenfield devices present
  367. * @op_mode: Operation Mode
  368. */
  369. #ifndef ANI_LITTLE_BIT_ENDIAN
  370. struct mlme_ht_info_field_2 {
  371. uint16_t reserved:11;
  372. uint16_t obss_non_ht_sta_present:1;
  373. uint16_t transmit_burst_limit:1;
  374. uint16_t non_gf_devices_present:1;
  375. uint16_t op_mode:2;
  376. } qdf_packed;
  377. #else
  378. struct mlme_ht_info_field_2 {
  379. uint16_t op_mode:2;
  380. uint16_t nonGFDevicesPresent:1;
  381. uint16_t transmit_burst_limit:1;
  382. uint16_t obss_non_ht_sta_present:1;
  383. uint16_t reserved:11;
  384. } qdf_packed;
  385. #endif
  386. /**
  387. * struct mlme_ht_info_field_3 - Additional HT IE Field3
  388. * @reserved: reserved bits
  389. * @pco_phase: PCO Phase
  390. * @pco_active: PCO state
  391. * @lsig_txop_protection_full_support: L-Sig TXOP Protection Full Support
  392. * @secondary_beacon: Beacon ID
  393. * @dual_cts_protection: Dual CTS protection Required
  394. * @basic_stbc_mcs: Basic STBC MCS
  395. */
  396. #ifndef ANI_LITTLE_BIT_ENDIAN
  397. struct mlme_ht_info_field_3 {
  398. uint16_t reserved:4;
  399. uint16_t pco_phase:1;
  400. uint16_t pco_active:1;
  401. uint16_t lsig_txop_protection_full_support:1;
  402. uint16_t secondary_beacon:1;
  403. uint16_t dual_cts_protection:1;
  404. uint16_t basic_stbc_mcs:7;
  405. } qdf_packed;
  406. #else
  407. struct mlme_ht_info_field_3 {
  408. uint16_t basic_stbc_mcs:7;
  409. uint16_t dual_cts_protection:1;
  410. uint16_t secondary_beacon:1;
  411. uint16_t lsig_txop_protection_full_support:1;
  412. uint16_t pco_active:1;
  413. uint16_t pco_phase:1;
  414. uint16_t reserved:4;
  415. } qdf_packed;
  416. #endif
  417. /**
  418. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  419. * @ht_cap_info: HT capabilities Info Structure
  420. * @ampdu_params: AMPDU parameters
  421. * @ext_cap_info: HT EXT capabilities info
  422. * @info_field_1: HT Information Subset 1
  423. * @info_field_2: HT Information Subset 2
  424. * @info_field_3: HT Information Subset 3
  425. * @short_preamble: Short Preamble support
  426. * @enable_ampdu_ps: Enable AMPDU Power Save
  427. * @enable_smps: Enabled SM Power Save
  428. * @smps : SM Power Save mode
  429. * @max_num_amsdu: Max number of AMSDU
  430. */
  431. struct wlan_mlme_ht_caps {
  432. struct mlme_ht_capabilities_info ht_cap_info;
  433. struct mlme_ht_param_info ampdu_params;
  434. struct mlme_ht_ext_cap_info ext_cap_info;
  435. struct mlme_ht_info_field_1 info_field_1;
  436. struct mlme_ht_info_field_2 info_field_2;
  437. struct mlme_ht_info_field_3 info_field_3;
  438. bool short_preamble;
  439. bool enable_ampdu_ps;
  440. bool enable_smps;
  441. uint8_t smps;
  442. uint8_t max_num_amsdu;
  443. };
  444. /*
  445. * struct wlan_mlme_wps_params - All wps based related cfg items
  446. *
  447. * @enable_wps - to enable wps
  448. * @wps_state - current wps state
  449. * @wps_version - wps version
  450. * @wps_cfg_method - wps config method
  451. * @wps_primary_device_category - wps primary device category
  452. * @wps_primary_device_oui - primary device OUI
  453. * @wps_device_sub_category - device sub category
  454. * @wps_device_password_id - password id of device
  455. */
  456. struct wlan_mlme_wps_params {
  457. uint8_t enable_wps;
  458. uint8_t wps_state;
  459. uint8_t wps_version;
  460. uint32_t wps_cfg_method;
  461. uint32_t wps_primary_device_category;
  462. uint32_t wps_primary_device_oui;
  463. uint16_t wps_device_sub_category;
  464. uint32_t wps_device_password_id;
  465. };
  466. #define MLME_CFG_LISTEN_INTERVAL 1
  467. #define MLME_CFG_BEACON_INTERVAL_DEF 100
  468. #define MLME_CFG_TX_MGMT_RATE_DEF 0xFF
  469. #define MLME_CFG_TX_MGMT_2G_RATE_DEF 0xFF
  470. #define MLME_CFG_TX_MGMT_5G_RATE_DEF 0xFF
  471. #define MLME_CFG_SSID_LEN 32
  472. /**
  473. * struct wlan_mlme_cfg_sap - SAP related config items
  474. * @cfg_ssid: SSID to be configured
  475. * @beacon_interval: beacon interval
  476. * @dtim_interval: dtim interval
  477. * @listen_interval: listen interval
  478. * @sap_11g_policy: Check if 11g support is enabled
  479. * @assoc_sta_limit: Limit on number of STA associated to SAP
  480. * @enable_lte_coex: Flag for LTE coexistence
  481. * @rmc_action_period_freq: rmc action period frequency
  482. * @rate_tx_mgmt: mgmt frame tx rate
  483. * @rate_tx_mgmt_2g: mgmt frame tx rate for 2G band
  484. * @rate_tx_mgmt_5g: mgmt frame tx rate for 5G band
  485. * @tele_bcn_wakeup_en: beacon wakeup enable/disable
  486. * @tele_bcn_max_li: max listen interval
  487. * @sap_get_peer_info: get peer info
  488. * @sap_allow_all_chan_param_name: allow all channels
  489. * @sap_max_no_peers: Maximum number of peers
  490. * @sap_max_offload_peers: Maximum number of peer offloads
  491. * @sap_max_offload_reorder_buffs: Maximum offload reorder buffs
  492. * @sap_ch_switch_beacon_cnt: Number of beacons to be sent out during CSA
  493. * @sap_internal_restart: flag to check if sap restart is in progress
  494. * @sap_ch_switch_mode: Channel switch test mode enable/disable
  495. * @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
  496. * @reduced_beacon_interval: reduced beacon interval value
  497. * @max_li_modulated_dtim_time: Max modulated DTIM time.
  498. * @country_code_priority: Country code priority.
  499. * @sap_pref_chan_location: SAP Preferred channel location.
  500. */
  501. struct wlan_mlme_cfg_sap {
  502. uint8_t cfg_ssid[MLME_CFG_SSID_LEN];
  503. uint8_t cfg_ssid_len;
  504. uint16_t beacon_interval;
  505. uint16_t dtim_interval;
  506. uint16_t listen_interval;
  507. bool sap_11g_policy;
  508. uint8_t assoc_sta_limit;
  509. bool enable_lte_coex;
  510. uint16_t rmc_action_period_freq;
  511. uint8_t rate_tx_mgmt;
  512. uint8_t rate_tx_mgmt_2g;
  513. uint8_t rate_tx_mgmt_5g;
  514. bool tele_bcn_wakeup_en;
  515. uint8_t tele_bcn_max_li;
  516. bool sap_get_peer_info;
  517. bool sap_allow_all_chan_param_name;
  518. uint8_t sap_max_no_peers;
  519. uint8_t sap_max_offload_peers;
  520. uint8_t sap_max_offload_reorder_buffs;
  521. uint8_t sap_ch_switch_beacon_cnt;
  522. bool sap_internal_restart;
  523. bool sap_ch_switch_mode;
  524. bool chan_switch_hostapd_rate_enabled_name;
  525. uint8_t reduced_beacon_interval;
  526. uint8_t max_li_modulated_dtim_time;
  527. bool country_code_priority;
  528. uint8_t sap_pref_chan_location;
  529. bool sap_force_11n_for_11ac;
  530. bool go_force_11n_for_11ac;
  531. };
  532. /**
  533. * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
  534. * @dfs_master_capable: Is DFS master mode support enabled
  535. */
  536. struct wlan_mlme_dfs_cfg {
  537. bool dfs_master_capable;
  538. };
  539. /**
  540. * struct wlan_mlme_mbo - Multiband Operation related ini configs
  541. * @mbo_candidate_rssi_thres:
  542. * @mbo_current_rssi_thres:
  543. * @mbo_current_rssi_mcc_thres:
  544. * @mbo_candidate_rssi_btc_thres:
  545. */
  546. struct wlan_mlme_mbo {
  547. int8_t mbo_candidate_rssi_thres;
  548. int8_t mbo_current_rssi_thres;
  549. int8_t mbo_current_rssi_mcc_thres;
  550. int8_t mbo_candidate_rssi_btc_thres;
  551. };
  552. /**
  553. * struct wlan_mlme_vht_caps - MLME VHT config items
  554. * @supp_chan_width: Supported Channel Width
  555. * @ldpc_coding_cap: LDPC Coding Capability
  556. * @short_gi_80mhz: 80MHz Short Guard Interval
  557. * @short_gi_160mhz: 160MHz Short Guard Interval
  558. * @tx_stbc: Tx STBC cap
  559. * @rx_stbc: Rx STBC cap
  560. * @su_bformer: SU Beamformer cap
  561. * @su_bformee: SU Beamformee cap
  562. * @tx_bfee_ant_supp: Tx beamformee anti supp
  563. * @num_soundingdim: Number of sounding dimensions
  564. * @mu_bformer: MU Beamformer cap
  565. * @txop_ps: Tx OPs in power save
  566. * @htc_vhtc: htc_vht capability
  567. * @link_adap_cap: Link adaptation capability
  568. * @rx_antpattern: Rx Antenna Pattern cap
  569. * @tx_antpattern: Tx Antenna Pattern cap
  570. * @rx_mcs_map: Rx MCS Map
  571. * @tx_mcs_map: Tx MCS Map
  572. * @rx_supp_data_rate: Rx highest supported data rate
  573. * @tx_supp_data_rate: Tx highest supported data rate
  574. * @basic_mcs_set: Basic MCS set
  575. * @enable_txbf_20mhz: enable tx bf for 20mhz
  576. * @channel_width: Channel width capability for 11ac
  577. * @rx_mcs: VHT Rx MCS capability for 1x1 mode
  578. * @tx_mcs: VHT Tx MCS capability for 1x1 mode
  579. * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
  580. * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
  581. * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
  582. * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
  583. * @enable_mu_bformee: Enables/disables multi-user (MU)
  584. * beam formee capability
  585. * @enable_paid: Enables/disables paid
  586. * @enable_gid: Enables/disables gid
  587. * @b24ghz_band: To control VHT support in 2.4 GHz band
  588. * @vendor_24ghz_band: to control VHT support based on vendor
  589. * ie in 2.4 GHz band
  590. * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
  591. * @ampdu_len: To handle maximum receive AMPDU ampdu len
  592. * @tx_bfee_sap: enable tx bfee SAp
  593. * @subfee_vendor_vhtie: enable subfee vendor vht ie
  594. */
  595. struct mlme_vht_capabilities_info {
  596. uint8_t supp_chan_width;
  597. bool ldpc_coding_cap;
  598. bool short_gi_80mhz;
  599. bool short_gi_160mhz;
  600. bool tx_stbc;
  601. bool rx_stbc;
  602. bool su_bformer;
  603. bool su_bformee;
  604. uint8_t tx_bfee_ant_supp;
  605. uint8_t num_soundingdim;
  606. bool mu_bformer;
  607. bool txop_ps;
  608. bool htc_vhtc;
  609. uint8_t link_adap_cap;
  610. bool rx_antpattern;
  611. bool tx_antpattern;
  612. uint32_t rx_mcs_map;
  613. uint32_t tx_mcs_map;
  614. uint32_t rx_supp_data_rate;
  615. uint32_t tx_supp_data_rate;
  616. uint32_t basic_mcs_set;
  617. bool enable_txbf_20mhz;
  618. uint8_t channel_width;
  619. uint32_t rx_mcs;
  620. uint32_t tx_mcs;
  621. uint8_t rx_mcs2x2;
  622. uint8_t tx_mcs2x2;
  623. bool enable_vht20_mcs9;
  624. bool enable2x2;
  625. bool enable_mu_bformee;
  626. bool enable_paid;
  627. bool enable_gid;
  628. bool b24ghz_band;
  629. bool vendor_24ghz_band;
  630. uint8_t ampdu_len_exponent;
  631. uint8_t ampdu_len;
  632. bool tx_bfee_sap;
  633. bool vendor_vhtie;
  634. };
  635. /**
  636. * struct wlan_mlme_vht_caps - VHT Capabilities related config items
  637. * @vht_cap_info: VHT capabilities Info Structure
  638. */
  639. struct wlan_mlme_vht_caps {
  640. struct mlme_vht_capabilities_info vht_cap_info;
  641. };
  642. /**
  643. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  644. * @tx_aggregation_size: TX aggr size in number of MPDUs
  645. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  646. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  647. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  648. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  649. * @rx_aggregation_size: No. of MPDUs for RX aggr
  650. * @tx_aggr_sw_retry_threshold_be: aggr sw retry threshold for BE
  651. * @tx_aggr_sw_retry_threshold_bk: aggr sw retry threshold for BK
  652. * @tx_aggr_sw_retry_threshold_vi: aggr sw retry threshold for VI
  653. * @tx_aggr_sw_retry_threshold_vo: aggr sw retry threshold for VO
  654. * @tx_non_aggr_sw_retry_threshold_be: non aggr sw retry threshold for BE
  655. * @tx_non_aggr_sw_retry_threshold_bk: non aggr sw retry threshold for BK
  656. * @tx_non_aggr_sw_retry_threshold_vi: non aggr sw retry threshold for VI
  657. * @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
  658. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  659. * hostapd.conf
  660. */
  661. struct wlan_mlme_qos {
  662. uint32_t tx_aggregation_size;
  663. uint32_t tx_aggregation_size_be;
  664. uint32_t tx_aggregation_size_bk;
  665. uint32_t tx_aggregation_size_vi;
  666. uint32_t tx_aggregation_size_vo;
  667. uint32_t rx_aggregation_size;
  668. uint32_t tx_aggr_sw_retry_threshold_be;
  669. uint32_t tx_aggr_sw_retry_threshold_bk;
  670. uint32_t tx_aggr_sw_retry_threshold_vi;
  671. uint32_t tx_aggr_sw_retry_threshold_vo;
  672. uint32_t tx_non_aggr_sw_retry_threshold_be;
  673. uint32_t tx_non_aggr_sw_retry_threshold_bk;
  674. uint32_t tx_non_aggr_sw_retry_threshold_vi;
  675. uint32_t tx_non_aggr_sw_retry_threshold_vo;
  676. bool sap_max_inactivity_override;
  677. };
  678. #ifdef WLAN_FEATURE_11AX
  679. #define MLME_HE_PPET_LEN 25
  680. #define WNI_CFG_HE_OPS_BSS_COLOR_MAX 0x3F
  681. /**
  682. * struct wlan_mlme_he_caps - HE Capabilities related config items
  683. */
  684. struct wlan_mlme_he_caps {
  685. tDot11fIEhe_cap dot11_he_cap;
  686. uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
  687. uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
  688. uint32_t he_ops_basic_mcs_nss;
  689. uint8_t he_dynamic_fragmentation;
  690. uint8_t enable_ul_mimo;
  691. uint8_t enable_ul_ofdm;
  692. uint32_t he_sta_obsspd;
  693. };
  694. #endif
  695. /**
  696. * struct wlan_mlme_rates - RATES related config items
  697. * @cfpPeriod: cfp period info
  698. * @cfpMaxDuration: cfp Max duration info
  699. * @max_htmcs_txdata: max HT mcs info for Tx
  700. * @disable_abg_rate_txdata: disable abg rate info for tx data
  701. * @sap_max_mcs_txdata: sap max mcs info
  702. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  703. * @supported_11b: supported 11B rates
  704. * @supported_11a: supported 11A rates
  705. * @opr_rate_set: operational rates set
  706. * @ext_opr_rate_set: extended operational rates set
  707. * @supported_mcs_set: supported MCS set
  708. * @basic_mcs_set: basic MCS set
  709. * @current_mcs_set: current MCS set
  710. */
  711. struct wlan_mlme_rates {
  712. uint8_t cfp_period;
  713. uint16_t cfp_max_duration;
  714. uint16_t max_htmcs_txdata;
  715. bool disable_abg_rate_txdata;
  716. uint16_t sap_max_mcs_txdata;
  717. uint8_t disable_high_ht_mcs_2x2;
  718. struct mlme_cfg_str supported_11b;
  719. struct mlme_cfg_str supported_11a;
  720. struct mlme_cfg_str opr_rate_set;
  721. struct mlme_cfg_str ext_opr_rate_set;
  722. struct mlme_cfg_str supported_mcs_set;
  723. struct mlme_cfg_str basic_mcs_set;
  724. struct mlme_cfg_str current_mcs_set;
  725. };
  726. /* Flags for gLimProtectionControl that is updated in pe session*/
  727. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  728. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  729. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  730. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  731. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  732. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  733. /* protection_enabled bits*/
  734. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  735. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  736. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  737. #define MLME_PROTECTION_ENABLED_HT_20 3
  738. #define MLME_PROTECTION_ENABLED_NON_GF 4
  739. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  740. #define MLME_PROTECTION_ENABLED_RIFS 6
  741. #define MLME_PROTECTION_ENABLED_OBSS 7
  742. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  743. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  744. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  745. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  746. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  747. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  748. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  749. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  750. /**
  751. * struct wlan_mlme_feature_flag - feature related information
  752. * @accept_short_slot_assoc: enable short sloc feature
  753. * @enable_hcf: enable HCF feature
  754. * @enable_rsn: enable RSN for connection
  755. * @enable_short_preamble_11g: enable short preamble for 11g
  756. * @channel_bonding_mode: channel bonding mode
  757. * @enable_block_ack: enable block ack feature
  758. * @enable_ampdu: Enable AMPDU feature
  759. */
  760. struct wlan_mlme_feature_flag {
  761. bool accept_short_slot_assoc;
  762. bool enable_hcf;
  763. bool enable_rsn;
  764. bool enable_short_preamble_11g;
  765. bool enable_short_slot_time_11g;
  766. uint32_t channel_bonding_mode;
  767. uint32_t enable_block_ack;
  768. bool enable_ampdu;
  769. };
  770. /*
  771. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  772. *
  773. * @protection_enabled: Force enable protection. static via cfg
  774. * @protection_force_policy: Protection force policy. Static via cfg
  775. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  776. *
  777. */
  778. struct wlan_mlme_sap_protection {
  779. uint32_t protection_enabled;
  780. uint8_t protection_force_policy;
  781. bool ignore_peer_ht_opmode;
  782. };
  783. /*
  784. * struct wlan_mlme_chainmask - All chainmask related cfg items
  785. *
  786. * @txchainmask1x1: To set transmit chainmask
  787. * @rxchainmask1x1: To set rx chainmask
  788. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  789. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  790. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  791. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  792. * @tx_chain_mask_2g: Tx chain mask for 2g
  793. * @rx_chain_mask_2g: Tx chain mask for 2g
  794. * @tx_chain_mask_5g: Tx chain mask for 5g
  795. * @rx_chain_mask_5g: Rx chain mask for 5g
  796. */
  797. struct wlan_mlme_chainmask {
  798. uint8_t txchainmask1x1;
  799. uint8_t rxchainmask1x1;
  800. bool tx_chain_mask_cck;
  801. uint8_t tx_chain_mask_1ss;
  802. uint16_t num_11b_tx_chains;
  803. uint16_t num_11ag_tx_chains;
  804. uint8_t tx_chain_mask_2g;
  805. uint8_t rx_chain_mask_2g;
  806. uint8_t tx_chain_mask_5g;
  807. uint8_t rx_chain_mask_5g;
  808. };
  809. /* struct wlan_mlme_generic - Generic CFG config items
  810. *
  811. * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
  812. * @band: Current Band - Internal variable, initialized to INI and updated later
  813. * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
  814. * @sub_20_chan_width: Sub 20Mhz Channel Width
  815. * @ito_repeat_count: ITO Repeat Count
  816. * @pmf_sa_query_max_retries: PMF query max retries for SAP
  817. * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
  818. * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
  819. * @rtt_mac_randomization: Enable/Disable RTT MAC randomization
  820. * @rtt3_enabled: RTT3 enable or disable info
  821. * @prevent_link_down: Enable/Disable prevention of link down
  822. * @memory_deep_sleep: Enable/Disable memory deep sleep
  823. * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
  824. * @crash_inject: Enable/Disable Crash Inject
  825. * @lpass_support: Enable/Disable LPASS Support
  826. * @self_recovery: Enable/Disable Self Recovery
  827. * @sap_dot11mc: Enable/Disable SAP 802.11mc support
  828. * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
  829. * @optimize_ca_event: Enable/Disable Optimization of CA events
  830. * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  831. * @debug_packet_log: Debug packet log flags
  832. */
  833. struct wlan_mlme_generic {
  834. enum band_info band_capability;
  835. enum band_info band;
  836. uint8_t select_5ghz_margin;
  837. uint8_t sub_20_chan_width;
  838. uint8_t ito_repeat_count;
  839. uint8_t pmf_sa_query_max_retries;
  840. uint16_t pmf_sa_query_retry_interval;
  841. uint16_t dropped_pkt_disconnect_thresh;
  842. bool rtt_mac_randomization;
  843. bool rtt3_enabled;
  844. bool prevent_link_down;
  845. bool memory_deep_sleep;
  846. bool cck_tx_fir_override;
  847. bool crash_inject;
  848. bool lpass_support;
  849. bool self_recovery;
  850. bool sap_dot11mc;
  851. bool fatal_event_trigger;
  852. bool optimize_ca_event;
  853. bool fw_timeout_crash;
  854. uint8_t debug_packet_log;
  855. };
  856. /*
  857. * struct wlan_mlme_product_details_cfg - product details config items
  858. * @manufacturer_name: manufacture name
  859. * @model_number: model number
  860. * @model_name: model name
  861. * @manufacture_product_name: manufacture product name
  862. * @manufacture_product_version: manufacture product version
  863. */
  864. struct wlan_mlme_product_details_cfg {
  865. char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
  866. char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
  867. char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
  868. char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
  869. char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
  870. };
  871. /*
  872. * struct wlan_mlme_acs - All acs related cfg items
  873. * @is_acs_with_more_param - to enable acs with more param
  874. * @auto_channel_select_weight - to set acs channel weight
  875. * @is_vendor_acs_support - enable application based channel selection
  876. * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
  877. * @is_external_acs_policy - control external policy
  878. */
  879. struct wlan_mlme_acs {
  880. bool is_acs_with_more_param;
  881. uint32_t auto_channel_select_weight;
  882. bool is_vendor_acs_support;
  883. bool is_acs_support_for_dfs_ltecoex;
  884. bool is_external_acs_policy;
  885. };
  886. /**
  887. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  888. * @active_dwelltime: obss active dwelltime
  889. * @passive_dwelltime: obss passive dwelltime
  890. * @width_trigger_interval: obss trigger interval
  891. * @passive_per_channel: obss scan passive total duration per channel
  892. * @active_per_channel: obss scan active total duration per channel
  893. * @width_trans_delay: obss width transition delay
  894. * @scan_activity_threshold: obss scan activity threshold
  895. */
  896. struct wlan_mlme_obss_ht40 {
  897. uint32_t active_dwelltime;
  898. uint32_t passive_dwelltime;
  899. uint32_t width_trigger_interval;
  900. uint32_t passive_per_channel;
  901. uint32_t active_per_channel;
  902. uint32_t width_trans_delay;
  903. uint32_t scan_activity_threshold;
  904. };
  905. /**
  906. * enum dot11p_mode - The 802.11p mode of operation
  907. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  908. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  909. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  910. */
  911. enum dot11p_mode {
  912. CFG_11P_DISABLED = 0,
  913. CFG_11P_STANDALONE,
  914. CFG_11P_CONCURRENT,
  915. };
  916. #define MAX_VDEV_NSS 2
  917. #define MAX_VDEV_CHAINS 2
  918. /**
  919. * struct wlan_mlme_nss_chains - MLME vdev config of nss, and chains
  920. * @num_tx_chains: tx chains of vdev config
  921. * @num_rx_chains: rx chains of vdev config
  922. * @tx_nss: tx nss of vdev config
  923. * @rx_nss: rx nss of vdev config
  924. * @num_tx_chains_11b: number of tx chains in 11b mode
  925. * @num_tx_chains_11g: number of tx chains in 11g mode
  926. * @num_tx_chains_11a: number of tx chains in 11a mode
  927. * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode
  928. * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode
  929. */
  930. struct wlan_mlme_nss_chains {
  931. uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
  932. uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
  933. uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
  934. uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
  935. uint32_t num_tx_chains_11b;
  936. uint32_t num_tx_chains_11g;
  937. uint32_t num_tx_chains_11a;
  938. bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
  939. bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
  940. };
  941. /**
  942. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  943. * @sta_keep_alive_period: Sends NULL frame to AP period
  944. * @tgt_gtx_usr_cfg: Target gtx user config
  945. * @pmkid_modes: Enable PMKID modes
  946. * @wait_cnf_timeout: Wait assoc cnf timeout
  947. * @dot11p_mode: Set 802.11p mode
  948. * @fils_max_chan_guard_time: Set maximum channel guard time
  949. * @current_rssi: Current rssi
  950. * @ignore_peer_erp_info: Ignore peer infrormation
  951. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  952. * @enable_5g_ebt: Set default 5G early beacon termination
  953. * @deauth_before_connection: Send deauth before connection or not
  954. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  955. * @qcn_ie_support: QCN IE support
  956. * @force_rsne_override: Force rsnie override from user
  957. * @single_tid: Set replay counter for all TID
  958. */
  959. struct wlan_mlme_sta_cfg {
  960. uint32_t sta_keep_alive_period;
  961. uint32_t tgt_gtx_usr_cfg;
  962. uint32_t pmkid_modes;
  963. uint32_t wait_cnf_timeout;
  964. enum dot11p_mode dot11p_mode;
  965. uint8_t fils_max_chan_guard_time;
  966. uint8_t current_rssi;
  967. bool ignore_peer_erp_info;
  968. bool sta_prefer_80mhz_over_160mhz;
  969. bool enable_5g_ebt;
  970. bool deauth_before_connection;
  971. bool enable_go_cts2self_for_sta;
  972. bool qcn_ie_support;
  973. bool force_rsne_override;
  974. bool single_tid;
  975. };
  976. /*
  977. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  978. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  979. * @lfr3_roaming_offload: Enable/disable roam offload feature
  980. * @early_stop_scan_enable: Set early stop scan
  981. * @lfr3_enable_subnet_detection: Enable LFR3 subnet detection
  982. * @enable_5g_band_pref: Enable preference for 5G from INI
  983. * @mawc_roam_traffic_threshold: Configure traffic threshold
  984. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  985. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  986. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  987. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  988. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  989. * @early_stop_scan_min_threshold: Set early stop scan min
  990. * @early_stop_scan_max_threshold: Set early stop scan max
  991. * @first_scan_bucket_threshold: Set first scan bucket
  992. * @roam_dense_traffic_threshold: Dense traffic threshold
  993. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  994. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  995. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  996. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  997. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  998. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  999. * @per_roam_enable: To enabled/disable PER based roaming in FW
  1000. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  1001. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  1002. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  1003. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  1004. * @per_roam_monitor_time: Min time to be considered as valid scenario
  1005. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  1006. * @lfr3_disallow_duration: Disallow duration before roaming
  1007. * @lfr3_rssi_channel_penalization: RSSI penalization
  1008. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  1009. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  1010. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  1011. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  1012. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  1013. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  1014. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  1015. * @max_num_pre_auth: Configure max number of pre-auth
  1016. * @roam_preauth_retry_count: Configure the max number of preauth retry
  1017. * @roam_preauth_no_ack_timeout: Configure the no ack timeout period
  1018. */
  1019. struct wlan_mlme_lfr_cfg {
  1020. bool mawc_roam_enabled;
  1021. bool enable_fast_roam_in_concurrency;
  1022. bool lfr3_roaming_offload;
  1023. bool early_stop_scan_enable;
  1024. bool lfr3_enable_subnet_detection;
  1025. bool enable_5g_band_pref;
  1026. uint32_t mawc_roam_traffic_threshold;
  1027. uint32_t mawc_roam_ap_rssi_threshold;
  1028. uint32_t mawc_roam_rssi_high_adjust;
  1029. uint32_t mawc_roam_rssi_low_adjust;
  1030. uint32_t roam_rssi_abs_threshold;
  1031. uint8_t rssi_threshold_offset_5g;
  1032. uint8_t early_stop_scan_min_threshold;
  1033. uint8_t early_stop_scan_max_threshold;
  1034. uint8_t first_scan_bucket_threshold;
  1035. uint32_t roam_dense_traffic_threshold;
  1036. uint32_t roam_dense_rssi_thre_offset;
  1037. uint32_t roam_dense_min_aps;
  1038. uint32_t roam_bg_scan_bad_rssi_threshold;
  1039. uint32_t roam_bg_scan_client_bitmap;
  1040. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  1041. uint32_t adaptive_roamscan_dwell_mode;
  1042. uint32_t per_roam_enable;
  1043. uint32_t per_roam_config_high_rate_th;
  1044. uint32_t per_roam_config_low_rate_th;
  1045. uint32_t per_roam_config_rate_th_percent;
  1046. uint32_t per_roam_rest_time;
  1047. uint32_t per_roam_monitor_time;
  1048. uint32_t per_roam_min_candidate_rssi;
  1049. uint32_t lfr3_disallow_duration;
  1050. uint32_t lfr3_rssi_channel_penalization;
  1051. uint32_t lfr3_num_disallowed_aps;
  1052. uint32_t rssi_boost_threshold_5g;
  1053. uint32_t rssi_boost_factor_5g;
  1054. uint32_t max_rssi_boost_5g;
  1055. uint32_t rssi_penalize_threshold_5g;
  1056. uint32_t rssi_penalize_factor_5g;
  1057. uint32_t max_rssi_penalize_5g;
  1058. uint32_t max_num_pre_auth;
  1059. uint32_t roam_preauth_retry_count;
  1060. uint32_t roam_preauth_no_ack_timeout;
  1061. };
  1062. /**
  1063. * struct wlan_mlme_wmm_config - WMM configuration
  1064. * @wmm_mode: Enable WMM feature
  1065. * @b80211e_is_enabled: Enable 802.11e feature
  1066. * @uapsd_mask: what ACs to setup U-APSD for at assoc
  1067. * @bimplicit_qos_enabled: Enable implicit QOS
  1068. */
  1069. struct wlan_mlme_wmm_config {
  1070. uint8_t wmm_mode;
  1071. bool b80211e_is_enabled;
  1072. uint8_t uapsd_mask;
  1073. bool bimplicit_qos_enabled;
  1074. };
  1075. /**
  1076. * struct wlan_mlme_wmm_tspec_element - Default TSPEC parameters
  1077. * from the wmm spec
  1078. * @inactivity_interval: inactivity_interval as per wmm spec
  1079. * @burst_size_def: TS burst size
  1080. * @ts_ack_policy: TS Info ACK policy
  1081. * @ts_acm_is_off: ACM is off for AC
  1082. */
  1083. struct wlan_mlme_wmm_tspec_element {
  1084. #ifdef FEATURE_WLAN_ESE
  1085. uint32_t inactivity_intv;
  1086. #endif
  1087. bool burst_size_def;
  1088. enum mlme_ts_info_ack_policy ts_ack_policy;
  1089. bool ts_acm_is_off;
  1090. };
  1091. /**
  1092. * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
  1093. * for AC_VO
  1094. * @dir_ac_vo: TSPEC direction for VO
  1095. * @nom_msdu_size_ac_vo: normal MSDU size for VO
  1096. * @mean_data_rate_ac_vo: mean data rate for VO
  1097. * @min_phy_rate_ac_vo: min PHY rate for VO
  1098. * @sba_ac_vo: surplus bandwidth allowance for VO
  1099. * @uapsd_vo_srv_intv: Uapsd service interval for voice
  1100. * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
  1101. */
  1102. struct wlan_mlme_wmm_ac_vo {
  1103. uint8_t dir_ac_vo;
  1104. uint16_t nom_msdu_size_ac_vo;
  1105. uint32_t mean_data_rate_ac_vo;
  1106. uint32_t min_phy_rate_ac_vo;
  1107. uint16_t sba_ac_vo;
  1108. uint32_t uapsd_vo_srv_intv;
  1109. uint32_t uapsd_vo_sus_intv;
  1110. };
  1111. /**
  1112. * struct wlan_mlme_wmm_ac_vi - Default TSPEC parameters
  1113. * for AC_VI
  1114. * @dir_ac_vi: TSPEC direction for VI
  1115. * @nom_msdu_size_ac_vi: normal MSDU size for VI
  1116. * @mean_data_rate_ac_vi: mean data rate for VI
  1117. * @min_phy_rate_ac_vi: min PHY rate for VI
  1118. * @sba_ac_vi: surplus bandwidth allowance for VI
  1119. * @uapsd_vo_srv_intv: Uapsd service interval for VI
  1120. * @uapsd_vo_sus_intv: Uapsd suspension interval for VI
  1121. */
  1122. struct wlan_mlme_wmm_ac_vi {
  1123. uint8_t dir_ac_vi;
  1124. uint16_t nom_msdu_size_ac_vi;
  1125. uint32_t mean_data_rate_ac_vi;
  1126. uint32_t min_phy_rate_ac_vi;
  1127. uint16_t sba_ac_vi;
  1128. uint32_t uapsd_vi_srv_intv;
  1129. uint32_t uapsd_vi_sus_intv;
  1130. };
  1131. /**
  1132. * struct wlan_mlme_wmm_ac_be - Default TSPEC parameters
  1133. * for AC_BE
  1134. * @dir_ac_be: TSPEC direction for BE
  1135. * @nom_msdu_size_ac_be: normal MSDU size for BE
  1136. * @mean_data_rate_ac_be: mean data rate for BE
  1137. * @min_phy_rate_ac_be: min PHY rate for BE
  1138. * @sba_ac_be: surplus bandwidth allowance for BE
  1139. * @uapsd_be_srv_intv: Uapsd service interval for BE
  1140. * @uapsd_be_sus_intv: Uapsd suspension interval for BE
  1141. */
  1142. struct wlan_mlme_wmm_ac_be {
  1143. uint8_t dir_ac_be;
  1144. uint16_t nom_msdu_size_ac_be;
  1145. uint32_t mean_data_rate_ac_be;
  1146. uint32_t min_phy_rate_ac_be;
  1147. uint16_t sba_ac_be;
  1148. uint32_t uapsd_be_srv_intv;
  1149. uint32_t uapsd_be_sus_intv;
  1150. };
  1151. /**
  1152. * struct wlan_mlme_wmm_ac_bk - Default TSPEC parameters
  1153. * for AC_BK
  1154. * @dir_ac_bk: TSPEC direction for BK
  1155. * @nom_msdu_size_ac_bk: normal MSDU size for BK
  1156. * @mean_data_rate_ac_bk: mean data rate for BK
  1157. * @min_phy_rate_ac_bk: min PHY rate for BK
  1158. * @sba_ac_bk: surplus bandwidth allowance for BK
  1159. * @uapsd_bk_srv_intv: Uapsd service interval for BK
  1160. * @uapsd_bk_sus_intv: Uapsd suspension interval for BK
  1161. */
  1162. struct wlan_mlme_wmm_ac_bk {
  1163. uint8_t dir_ac_bk;
  1164. uint16_t nom_msdu_size_ac_bk;
  1165. uint32_t mean_data_rate_ac_bk;
  1166. uint32_t min_phy_rate_ac_bk;
  1167. uint16_t sba_ac_bk;
  1168. uint32_t uapsd_bk_srv_intv;
  1169. uint32_t uapsd_bk_sus_intv;
  1170. };
  1171. /**
  1172. * struct wlan_mlme_wmm_params - WMM CFG Items
  1173. * @qos_enabled: AP is enabled with 11E
  1174. * @wme_enabled: AP is enabled with WMM
  1175. * @max_sp_length: Maximum SP Length
  1176. * @wsm_enabled: AP is enabled with WSM
  1177. * @edca_profile: WMM Edca profile
  1178. * @wmm_config: WMM configuration
  1179. * @wmm_tspec_element: Default TSPEC parameters
  1180. * @ac_vo: Default TSPEC parameters for AC_VO
  1181. * @ac_vi: Default TSPEC parameters for AC_VI
  1182. * @ac_be: Default TSPEC parameters for AC_BE
  1183. * @ac_bk: Default TSPEC parameters for AC_BK
  1184. */
  1185. struct wlan_mlme_wmm_params {
  1186. bool qos_enabled;
  1187. bool wme_enabled;
  1188. uint8_t max_sp_length;
  1189. bool wsm_enabled;
  1190. uint32_t edca_profile;
  1191. struct wlan_mlme_wmm_config wmm_config;
  1192. struct wlan_mlme_wmm_tspec_element wmm_tspec_element;
  1193. struct wlan_mlme_wmm_ac_vo ac_vo;
  1194. struct wlan_mlme_wmm_ac_vi ac_vi;
  1195. struct wlan_mlme_wmm_ac_be ac_be;
  1196. struct wlan_mlme_wmm_ac_bk ac_bk;
  1197. };
  1198. /**
  1199. * struct wlan_mlme_weight_config - weight params to
  1200. * calculate best candidate
  1201. *
  1202. * @rssi_weightage: RSSI weightage
  1203. * @ht_caps_weightage: HT caps weightage
  1204. * @vht_caps_weightage: VHT caps weightage
  1205. * @he_caps_weightage: HE caps weightage
  1206. * @chan_width_weightage: Channel width weightage
  1207. * @chan_band_weightage: Channel band weightage
  1208. * @nss_weightage: NSS weightage
  1209. * @beamforming_cap_weightage: Beamforming caps weightage
  1210. * @pcl_weightage: PCL weightage
  1211. * @channel_congestion_weightage: channel congestion weightage
  1212. * @oce_wan_weightage: OCE WAN metrics weightage
  1213. */
  1214. struct wlan_mlme_weight_config {
  1215. uint8_t rssi_weightage;
  1216. uint8_t ht_caps_weightage;
  1217. uint8_t vht_caps_weightage;
  1218. uint8_t he_caps_weightage;
  1219. uint8_t chan_width_weightage;
  1220. uint8_t chan_band_weightage;
  1221. uint8_t nss_weightage;
  1222. uint8_t beamforming_cap_weightage;
  1223. uint8_t pcl_weightage;
  1224. uint8_t channel_congestion_weightage;
  1225. uint8_t oce_wan_weightage;
  1226. };
  1227. /**
  1228. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  1229. * calculate best candidate
  1230. *
  1231. * @best_rssi_threshold: Best RSSI threshold
  1232. * @good_rssi_threshold: Good RSSI threshold
  1233. * @bad_rssi_threshold: Bad RSSI threshold
  1234. * @good_rssi_pcnt: Good RSSI Percentage
  1235. * @bad_rssi_pcnt: Bad RSSI Percentage
  1236. * @good_rssi_bucket_size: Good RSSI Bucket Size
  1237. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  1238. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  1239. */
  1240. struct wlan_mlme_rssi_cfg_score {
  1241. uint32_t best_rssi_threshold;
  1242. uint32_t good_rssi_threshold;
  1243. uint32_t bad_rssi_threshold;
  1244. uint32_t good_rssi_pcnt;
  1245. uint32_t bad_rssi_pcnt;
  1246. uint32_t good_rssi_bucket_size;
  1247. uint32_t bad_rssi_bucket_size;
  1248. uint32_t rssi_pref_5g_rssi_thresh;
  1249. };
  1250. /**
  1251. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  1252. * for a scoring param.
  1253. * num_slot: number of slots in which the param will be divided.
  1254. * Max 15. index 0 is used for 'not_present. Num_slot will
  1255. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  1256. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  1257. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  1258. * BITS 0-7 :- the scoring pcnt when not present
  1259. * BITS 8-15 :- SLOT_1
  1260. * BITS 16-23 :- SLOT_2
  1261. * BITS 24-31 :- SLOT_3
  1262. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  1263. * BITS 0-7 :- SLOT_4
  1264. * BITS 8-15 :- SLOT_5
  1265. * BITS 16-23 :- SLOT_6
  1266. * BITS 24-31 :- SLOT_7
  1267. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  1268. * BITS 0-7 :- SLOT_8
  1269. * BITS 8-15 :- SLOT_9
  1270. * BITS 16-23 :- SLOT_10
  1271. * BITS 24-31 :- SLOT_11
  1272. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  1273. * BITS 0-7 :- SLOT_12
  1274. * BITS 8-15 :- SLOT_13
  1275. * BITS 16-23 :- SLOT_14
  1276. * BITS 24-31 :- SLOT_15
  1277. */
  1278. struct wlan_mlme_per_slot_scoring {
  1279. uint32_t num_slot;
  1280. uint32_t score_pcnt3_to_0;
  1281. uint32_t score_pcnt7_to_4;
  1282. uint32_t score_pcnt11_to_8;
  1283. uint32_t score_pcnt15_to_12;
  1284. };
  1285. /*
  1286. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  1287. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  1288. * @weight_cfg: Various Weight related Scoring Configs
  1289. * @rssi_score: RSSI Scoring related thresholds/percentages config
  1290. * @esp_qbss_scoring: ESP QBSS Scoring configs
  1291. * @oce_wan_scoring: OCE WAN Scoring Configs
  1292. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  1293. * @nss_weight_per_index: NSS weight per index for scoring logic
  1294. * @band_weight_per_index: Band weight per index for scoring logic
  1295. */
  1296. struct wlan_mlme_scoring_cfg {
  1297. bool enable_scoring_for_roam;
  1298. struct wlan_mlme_weight_config weight_cfg;
  1299. struct wlan_mlme_rssi_cfg_score rssi_score;
  1300. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  1301. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  1302. uint32_t bandwidth_weight_per_index;
  1303. uint32_t nss_weight_per_index;
  1304. uint32_t band_weight_per_index;
  1305. };
  1306. /* struct wlan_mlme_threshold - Threshold related config items
  1307. * @rts_threshold: set rts threshold
  1308. * @frag_threshold: set fragmentation threshold
  1309. */
  1310. struct wlan_mlme_threshold {
  1311. uint32_t rts_threshold;
  1312. uint32_t frag_threshold;
  1313. };
  1314. /*
  1315. * struct wlan_mlme_timeout - mlme timeout related config items
  1316. * @join_failure_timeout: join failure timeout
  1317. * @auth_failure_timeout: authenticate failure timeout
  1318. * @auth_rsp_timeout: authenticate response timeout
  1319. * @assoc_failure_timeout: assoc failure timeout
  1320. * @reassoc_failure_timeout: re-assoc failure timeout
  1321. * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  1322. * @olbc_detect_timeout: OLBC detect timeout
  1323. * @addts_rsp_timeout: ADDTS rsp timeout value
  1324. * @heart_beat_threshold: Heart beat threshold
  1325. * @ap_keep_alive_timeout: AP keep alive timeout value
  1326. * @ap_link_monitor_timeout: AP link monitor timeout value
  1327. * @ps_data_inactivity_timeout: PS data inactivity timeout
  1328. */
  1329. struct wlan_mlme_timeout {
  1330. uint32_t join_failure_timeout;
  1331. uint32_t auth_failure_timeout;
  1332. uint32_t auth_rsp_timeout;
  1333. uint32_t assoc_failure_timeout;
  1334. uint32_t reassoc_failure_timeout;
  1335. uint32_t probe_after_hb_fail_timeout;
  1336. uint32_t olbc_detect_timeout;
  1337. uint32_t addts_rsp_timeout;
  1338. uint32_t heart_beat_threshold;
  1339. uint32_t ap_keep_alive_timeout;
  1340. uint32_t ap_link_monitor_timeout;
  1341. uint32_t ps_data_inactivity_timeout;
  1342. };
  1343. /**
  1344. * struct wlan_mlme_oce - OCE related config items
  1345. * @enable_bcast_probe_rsp: enable broadcast probe response
  1346. * @oce_sta_enabled: enable/disable oce feature for sta
  1347. * @oce_sap_enabled: enable/disable oce feature for sap
  1348. * @fils_enabled: enable/disable fils support
  1349. * @feature_bitmap: oce feature bitmap
  1350. *
  1351. */
  1352. struct wlan_mlme_oce {
  1353. bool enable_bcast_probe_rsp;
  1354. bool oce_sta_enabled;
  1355. bool oce_sap_enabled;
  1356. bool fils_enabled;
  1357. uint8_t feature_bitmap;
  1358. };
  1359. #define MLME_WEP_KEY_LEN_13 (13)
  1360. #define MLME_WEP_KEY_LENGTH_5 (5)
  1361. /**
  1362. * enum wep_key_id - values passed to get/set wep default keys
  1363. * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
  1364. * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
  1365. * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
  1366. * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
  1367. */
  1368. enum wep_key_id {
  1369. MLME_WEP_DEFAULT_KEY_1 = 0,
  1370. MLME_WEP_DEFAULT_KEY_2,
  1371. MLME_WEP_DEFAULT_KEY_3,
  1372. MLME_WEP_DEFAULT_KEY_4
  1373. };
  1374. /**
  1375. * struct wlan_mlme_wep_cfg - WEP related configs
  1376. * @is_privacy_enabled: Flag to check if encryption is enabled
  1377. * @is_shared_key_auth: Flag to check if the auth type is shared key
  1378. * @is_auth_open_system: Flag to check if the auth type is open
  1379. * @auth_type: Authentication type value
  1380. * @wep_default_key_id: Default WEP key id
  1381. * @wep_default_key_1: WEP encryption key 1
  1382. * @wep_default_key_2: WEP encryption key 2
  1383. * @wep_default_key_3: WEP encryption key 3
  1384. * @wep_default_key_4: WEP encryption key 4
  1385. */
  1386. struct wlan_mlme_wep_cfg {
  1387. bool is_privacy_enabled;
  1388. bool is_shared_key_auth;
  1389. bool is_auth_open_system;
  1390. uint8_t auth_type;
  1391. uint8_t wep_default_key_id;
  1392. struct mlme_cfg_str wep_default_key_1;
  1393. struct mlme_cfg_str wep_default_key_2;
  1394. struct mlme_cfg_str wep_default_key_3;
  1395. struct mlme_cfg_str wep_default_key_4;
  1396. };
  1397. /**
  1398. * struct wlan_mlme_cfg - MLME config items
  1399. * @chainmask_cfg: VHT chainmask related cfg items
  1400. * @edca_params: edca related CFG items
  1401. * @gen: Generic CFG items
  1402. * @ht_caps: HT related CFG Items
  1403. * @he_caps: HE related cfg items
  1404. * @lfr: LFR related CFG Items
  1405. * @obss_ht40:obss ht40 CFG Items
  1406. * @mbo_cfg: Multiband Operation related CFG items
  1407. * @vht_caps: VHT related CFG Items
  1408. * @qos_mlme_params: QOS CFG Items
  1409. * @rates: Rates related cfg items
  1410. * @product_details: product details related CFG Items
  1411. * @dfs_cfg: DFS related CFG Items
  1412. * @sap_protection_cfg: SAP erp protection related CFG items
  1413. * @sap_cfg: sap CFG items
  1414. * @nss_chains_ini_cfg: Per vdev nss, chains related CFG items
  1415. * @sta: sta CFG Items
  1416. * @scoring: BSS Scoring related CFG Items
  1417. * @oce: OCE related CFG items
  1418. * @threshold: threshold related cfg items
  1419. * @timeouts: mlme timeout related CFG items
  1420. * @acs: ACS related CFG items
  1421. * @feature_flags: Feature flag config items
  1422. * @wep_params: WEP related config items
  1423. * @wmm_params: WMM related CFG & INI Items
  1424. * @wps_params: WPS related CFG itmes
  1425. */
  1426. struct wlan_mlme_cfg {
  1427. struct wlan_mlme_chainmask chainmask_cfg;
  1428. struct wlan_mlme_edca_params edca_params;
  1429. struct wlan_mlme_generic gen;
  1430. struct wlan_mlme_ht_caps ht_caps;
  1431. #ifdef WLAN_FEATURE_11AX
  1432. struct wlan_mlme_he_caps he_caps;
  1433. #endif
  1434. struct wlan_mlme_lfr_cfg lfr;
  1435. struct wlan_mlme_obss_ht40 obss_ht40;
  1436. struct wlan_mlme_mbo mbo_cfg;
  1437. struct wlan_mlme_vht_caps vht_caps;
  1438. struct wlan_mlme_qos qos_mlme_params;
  1439. struct wlan_mlme_rates rates;
  1440. struct wlan_mlme_product_details_cfg product_details;
  1441. struct wlan_mlme_dfs_cfg dfs_cfg;
  1442. struct wlan_mlme_sap_protection sap_protection_cfg;
  1443. struct wlan_mlme_cfg_sap sap_cfg;
  1444. struct wlan_mlme_nss_chains nss_chains_ini_cfg;
  1445. struct wlan_mlme_sta_cfg sta;
  1446. struct wlan_mlme_scoring_cfg scoring;
  1447. struct wlan_mlme_oce oce;
  1448. struct wlan_mlme_threshold threshold;
  1449. struct wlan_mlme_timeout timeouts;
  1450. struct wlan_mlme_acs acs;
  1451. struct wlan_mlme_feature_flag feature_flags;
  1452. struct wlan_mlme_wep_cfg wep_params;
  1453. struct wlan_mlme_wmm_params wmm_params;
  1454. struct wlan_mlme_wps_params wps_params;
  1455. };
  1456. #endif