wlan_mlme_public_struct.h 53 KB

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