wlan_mlme_public_struct.h 51 KB

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