wlan_mlme_public_struct.h 53 KB

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