wlan_mlme_public_struct.h 60 KB

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