wlan_mlme_public_struct.h 53 KB

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