wlan_mlme_public_struct.h 74 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128
  1. /*
  2. * Copyright (c) 2018-2019 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_STRING_LEN (CFG_VALID_CHANNEL_LIST_LEN * 4)
  42. /**
  43. * struct mlme_cfg_str - generic structure for all mlme CFG string items
  44. *
  45. * @max_len: maximum data length allowed
  46. * @len: valid no. of elements of the data
  47. * @data: uint8_t array to store values
  48. */
  49. struct mlme_cfg_str {
  50. qdf_size_t max_len;
  51. qdf_size_t len;
  52. uint8_t data[CFG_STR_DATA_LEN];
  53. };
  54. /**
  55. * enum e_edca_type - to index edca params for edca profile
  56. * EDCA profile AC unicast/bcast
  57. * @edca_ani_acbe_local: ani BE unicast
  58. * @edca_ani_acbk_local: ani BK unicast
  59. * @edca_ani_acvi_local: ani VI unicast
  60. * @edca_ani_acvo_local: ani VO unicast
  61. * @edca_ani_acbe_bcast: ani BE bcast
  62. * @edca_ani_acbk_bcast: ani BK bcast
  63. * @edca_ani_acvi_bcast: ani VI bcast
  64. * @edca_ani_acvo_bcast: ani VO bcast
  65. * @edca_wme_acbe_local: wme BE unicast
  66. * @edca_wme_acbk_local: wme BK unicast
  67. * @edca_wme_acvi_local: wme VI unicast
  68. * @edca_wme_acvo_local: wme VO unicast
  69. * @edca_wme_acbe_bcast: wme BE bcast
  70. * @edca_wme_acbk_bcast: wme BK bcast
  71. * @edca_wme_acvi_bcast: wme VI bcast
  72. * @edca_wme_acvo_bcast: wme VO bcast
  73. * @edca_etsi_acbe_local: etsi BE unicast
  74. * @edca_etsi_acbk_local: etsi BK unicast
  75. * @edca_etsi_acvi_local: etsi VI unicast
  76. * @edca_etsi_acvo_local: etsi VO unicast
  77. * @edca_etsi_acbe_bcast: etsi BE bcast
  78. * @edca_etsi_acbk_bcast: etsi BK bcast
  79. * @edca_etsi_acvi_bcast: etsi VI bcast
  80. * @edca_etsi_acvo_bcast: etsi VO bcast
  81. */
  82. enum e_edca_type {
  83. edca_ani_acbe_local,
  84. edca_ani_acbk_local,
  85. edca_ani_acvi_local,
  86. edca_ani_acvo_local,
  87. edca_ani_acbe_bcast,
  88. edca_ani_acbk_bcast,
  89. edca_ani_acvi_bcast,
  90. edca_ani_acvo_bcast,
  91. edca_wme_acbe_local,
  92. edca_wme_acbk_local,
  93. edca_wme_acvi_local,
  94. edca_wme_acvo_local,
  95. edca_wme_acbe_bcast,
  96. edca_wme_acbk_bcast,
  97. edca_wme_acvi_bcast,
  98. edca_wme_acvo_bcast,
  99. edca_etsi_acbe_local,
  100. edca_etsi_acbk_local,
  101. edca_etsi_acvi_local,
  102. edca_etsi_acvo_local,
  103. edca_etsi_acbe_bcast,
  104. edca_etsi_acbk_bcast,
  105. edca_etsi_acvi_bcast,
  106. edca_etsi_acvo_bcast
  107. };
  108. #define CFG_EDCA_PROFILE_ACM_IDX 0
  109. #define CFG_EDCA_PROFILE_AIFSN_IDX 1
  110. #define CFG_EDCA_PROFILE_CWMINA_IDX 2
  111. #define CFG_EDCA_PROFILE_CWMAXA_IDX 4
  112. #define CFG_EDCA_PROFILE_TXOPA_IDX 6
  113. #define CFG_EDCA_PROFILE_CWMINB_IDX 7
  114. #define CFG_EDCA_PROFILE_CWMAXB_IDX 9
  115. #define CFG_EDCA_PROFILE_TXOPB_IDX 11
  116. #define CFG_EDCA_PROFILE_CWMING_IDX 12
  117. #define CFG_EDCA_PROFILE_CWMAXG_IDX 14
  118. #define CFG_EDCA_PROFILE_TXOPG_IDX 16
  119. /**
  120. * struct mlme_edca_ac_vo - cwmin, cwmax and aifs value for edca_ac_vo
  121. *
  122. * @vo_cwmin: cwmin value for voice
  123. * @vo_cwmax: cwmax value for voice
  124. * @vo_aifs: aifs value for voice
  125. */
  126. struct mlme_edca_ac_vo {
  127. uint32_t vo_cwmin;
  128. uint32_t vo_cwmax;
  129. uint32_t vo_aifs;
  130. };
  131. /**
  132. * enum dot11_mode - Dot11 mode of the vdev
  133. * MLME_DOT11_MODE_ALL: vdev supports all dot11 modes
  134. * MLME_DOT11_MODE_11A: vdev just supports 11A mode
  135. * MLME_DOT11_MODE_11B: vdev supports 11B mode, and modes above it
  136. * MLME_DOT11_MODE_11G: vdev supports 11G mode, and modes above it
  137. * MLME_DOT11_MODE_11N: vdev supports 11N mode, and modes above it
  138. * MLME_DOT11_MODE_11G_ONLY: vdev just supports 11G mode
  139. * MLME_DOT11_MODE_1N_ONLYA: vdev just supports 11N mode
  140. * MLME_DOT11_MODE_11AC: vdev supports 11AC mode, and modes above it
  141. * MLME_DOT11_MODE_11AC_ONLY: vdev just supports 11AC mode
  142. * MLME_DOT11_MODE_11AX: vdev supports 11AX mode, and modes above it
  143. * MLME_DOT11_MODE_11AX_ONLY: vdev just supports 11AX mode
  144. */
  145. enum mlme_dot11_mode {
  146. MLME_DOT11_MODE_ALL,
  147. MLME_DOT11_MODE_11A,
  148. MLME_DOT11_MODE_11B,
  149. MLME_DOT11_MODE_11G,
  150. MLME_DOT11_MODE_11N,
  151. MLME_DOT11_MODE_11G_ONLY,
  152. MLME_DOT11_MODE_11N_ONLY,
  153. MLME_DOT11_MODE_11AC,
  154. MLME_DOT11_MODE_11AC_ONLY,
  155. MLME_DOT11_MODE_11AX,
  156. MLME_DOT11_MODE_11AX_ONLY
  157. };
  158. /**
  159. * struct wlan_mlme_dot11_mode - dot11 mode
  160. *
  161. * @dot11_mode: dot11 mode supported
  162. */
  163. struct wlan_mlme_dot11_mode {
  164. enum mlme_dot11_mode dot11_mode;
  165. };
  166. /**
  167. * struct mlme_edca_ac_vi - cwmin, cwmax and aifs value for edca_ac_vi
  168. *
  169. * @vi_cwmin: cwmin value for video
  170. * @vi_cwmax: cwmax value for video
  171. * @vi_aifs: aifs value for video
  172. */
  173. struct mlme_edca_ac_vi {
  174. uint32_t vi_cwmin;
  175. uint32_t vi_cwmax;
  176. uint32_t vi_aifs;
  177. };
  178. /**
  179. * struct mlme_edca_ac_bk - cwmin, cwmax and aifs value for edca_ac_bk
  180. *
  181. * @bk_cwmin: cwmin value for background
  182. * @bk_cwmax: cwmax value for background
  183. * @bk_aifs: aifs value for background
  184. */
  185. struct mlme_edca_ac_bk {
  186. uint32_t bk_cwmin;
  187. uint32_t bk_cwmax;
  188. uint32_t bk_aifs;
  189. };
  190. /**
  191. * struct mlme_edca_ac_be - cwmin, cwmax and aifs value for edca_ac_be
  192. *
  193. * @be_cwmin: cwmin value for best effort
  194. * @be_cwmax: cwmax value for best effort
  195. * @be_aifs: aifs value for best effort
  196. */
  197. struct mlme_edca_ac_be {
  198. uint32_t be_cwmin;
  199. uint32_t be_cwmax;
  200. uint32_t be_aifs;
  201. };
  202. /**
  203. * enum mlme_ts_info_ack_policy - TS Info Ack Policy
  204. * @TS_INFO_ACK_POLICY_NORMAL_ACK:normal ack
  205. * @TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK: HT immediate block ack
  206. */
  207. enum mlme_ts_info_ack_policy {
  208. TS_INFO_ACK_POLICY_NORMAL_ACK = 0,
  209. TS_INFO_ACK_POLICY_HT_IMMEDIATE_BLOCK_ACK = 1,
  210. };
  211. /**
  212. * struct mlme_edca_params - EDCA pramaters related config items
  213. *
  214. * @ani_acbk_l: EDCA parameters for ANI local access category background
  215. * @ani_acbe_l: EDCA parameters for ANI local access category best effort
  216. * @ani_acvi_l: EDCA parameters for ANI local access category video
  217. * @ani_acvo_l: EDCA parameters for ANI local access category voice
  218. * @ani_acbk_b: EDCA parameters for ANI bcast access category background
  219. * @ani_acbe_b: EDCA parameters for ANI bcast access category best effort
  220. * @ani_acvi_b: EDCA parameters for ANI bcast access category video
  221. * @ani_acvo_b: EDCA parameters for ANI bcast access category voice
  222. * @wme_acbk_l: EDCA parameters for WME local access category background
  223. * @wme_acbe_l: EDCA parameters for WME local access category best effort
  224. * @wme_acvi_l: EDCA parameters for WME local access category video
  225. * @wme_acvo_l: EDCA parameters for WME local access category voice
  226. * @wme_acbk_b: EDCA parameters for WME bcast access category background
  227. * @wme_acbe_b: EDCA parameters for WME bcast access category best effort
  228. * @wme_acvi_b: EDCA parameters for WME bcast access category video
  229. * @wme_acvo_b: EDCA parameters for WME bcast access category voice
  230. * @etsi_acbk_l: EDCA parameters for ETSI local access category background
  231. * @etsi_acbe_l: EDCA parameters for ETSI local access category best effort
  232. * @etsi_acvi_l: EDCA parameters for ETSI local access category video
  233. * @etsi_acvo_l: EDCA parameters for ETSI local access category voice
  234. * @etsi_acbk_b: EDCA parameters for ETSI bcast access category background
  235. * @etsi_acbe_b: EDCA parameters for ETSI bcast access category best effort
  236. * @etsi_acvi_b: EDCA parameters for ETSI bcast access category video
  237. * @etsi_acvo_b: EDCA parameters for ETSI bcast access category voice
  238. * @enable_edca_params: Enable edca parameter
  239. * @mlme_edca_ac_vo: value for edca_ac_vo
  240. * @mlme_edca_ac_vi: value for edca_ac_vi
  241. * @mlme_edca_ac_bk: value for edca_ac_bk
  242. * @mlme_edca_ac_be: value for edca_ac_be
  243. */
  244. struct wlan_mlme_edca_params {
  245. struct mlme_cfg_str ani_acbk_l;
  246. struct mlme_cfg_str ani_acbe_l;
  247. struct mlme_cfg_str ani_acvi_l;
  248. struct mlme_cfg_str ani_acvo_l;
  249. struct mlme_cfg_str ani_acbk_b;
  250. struct mlme_cfg_str ani_acbe_b;
  251. struct mlme_cfg_str ani_acvi_b;
  252. struct mlme_cfg_str ani_acvo_b;
  253. struct mlme_cfg_str wme_acbk_l;
  254. struct mlme_cfg_str wme_acbe_l;
  255. struct mlme_cfg_str wme_acvi_l;
  256. struct mlme_cfg_str wme_acvo_l;
  257. struct mlme_cfg_str wme_acbk_b;
  258. struct mlme_cfg_str wme_acbe_b;
  259. struct mlme_cfg_str wme_acvi_b;
  260. struct mlme_cfg_str wme_acvo_b;
  261. struct mlme_cfg_str etsi_acbk_l;
  262. struct mlme_cfg_str etsi_acbe_l;
  263. struct mlme_cfg_str etsi_acvi_l;
  264. struct mlme_cfg_str etsi_acvo_l;
  265. struct mlme_cfg_str etsi_acbk_b;
  266. struct mlme_cfg_str etsi_acbe_b;
  267. struct mlme_cfg_str etsi_acvi_b;
  268. struct mlme_cfg_str etsi_acvo_b;
  269. bool enable_edca_params;
  270. struct mlme_edca_ac_vo edca_ac_vo;
  271. struct mlme_edca_ac_vi edca_ac_vi;
  272. struct mlme_edca_ac_bk edca_ac_bk;
  273. struct mlme_edca_ac_be edca_ac_be;
  274. };
  275. #define WLAN_CFG_MFR_NAME_LEN (63)
  276. #define WLAN_CFG_MODEL_NUMBER_LEN (31)
  277. #define WLAN_CFG_MODEL_NAME_LEN (31)
  278. #define WLAN_CFG_MFR_PRODUCT_NAME_LEN (31)
  279. #define WLAN_CFG_MFR_PRODUCT_VERSION_LEN (31)
  280. #define MLME_NUM_WLM_LATENCY_LEVEL 4
  281. #define MLME_RMENABLEDCAP_MAX_LEN 5
  282. /**
  283. * struct mlme_ht_capabilities_info - HT Capabilities Info
  284. * @l_sig_tx_op_protection: L-SIG TXOP Protection Mechanism support
  285. * @stbc_control_frame: STBC Control frame support
  286. * @psmp: PSMP Support
  287. * @dsss_cck_mode_40_mhz: To indicate use of DSSS/CCK in 40Mhz
  288. * @maximal_amsdu_size: Maximum AMSDU Size - 0:3839 octes, 1:7935 octets
  289. * @delayed_ba: Support of Delayed Block Ack
  290. * @rx_stbc: Rx STBC Support - 0:Not Supported, 1: 1SS, 2: 1,2SS, 3: 1,2,3SS
  291. * @tx_stbc: Tx STBC Support
  292. * @short_gi_40_mhz: Short GI Support for HT40
  293. * @short_gi_20_mhz: Short GI support for HT20
  294. * @green_field: Support for HT Greenfield PPDUs
  295. * @mimo_power_save: SM Power Save Mode - 0:Static, 1:Dynamic, 3:Disabled, 2:Res
  296. * @supported_channel_width_set: Supported Chan Width - 0:20Mhz, 1:20Mhz & 40Mhz
  297. * @adv_coding_cap: Rx LDPC support
  298. */
  299. #ifndef ANI_LITTLE_BIT_ENDIAN
  300. struct mlme_ht_capabilities_info {
  301. uint16_t l_sig_tx_op_protection:1;
  302. uint16_t stbc_control_frame:1;
  303. uint16_t psmp:1;
  304. uint16_t dsss_cck_mode_40_mhz:1;
  305. uint16_t maximal_amsdu_size:1;
  306. uint16_t delayed_ba:1;
  307. uint16_t rx_stbc:2;
  308. uint16_t tx_stbc:1;
  309. uint16_t short_gi_40_mhz:1;
  310. uint16_t short_gi_20_mhz:1;
  311. uint16_t green_field:1;
  312. uint16_t mimo_power_save:2;
  313. uint16_t supported_channel_width_set:1;
  314. uint16_t adv_coding_cap:1;
  315. } qdf_packed;
  316. #else
  317. struct mlme_ht_capabilities_info {
  318. uint16_t adv_coding_cap:1;
  319. uint16_t supported_channel_width_set:1;
  320. uint16_t mimo_power_save:2;
  321. uint16_t green_field:1;
  322. uint16_t short_gi_20_mhz:1;
  323. uint16_t short_gi_40_mhz:1;
  324. uint16_t tx_stbc:1;
  325. uint16_t rx_stbc:2;
  326. uint16_t delayed_ba:1;
  327. uint16_t maximal_amsdu_size:1;
  328. uint16_t dsss_cck_mode_40_mhz:1;
  329. uint16_t psmp:1;
  330. uint16_t stbc_control_frame:1;
  331. uint16_t l_sig_tx_op_protection:1;
  332. } qdf_packed;
  333. #endif
  334. /**
  335. * struct mlme_ht_param_info - HT AMPDU Parameters Info
  336. * @reserved: reserved bits
  337. * @mpdu_density: MPDU Density
  338. * @max_rx_ampdu_factor: Max Rx AMPDU Factor
  339. */
  340. #ifndef ANI_LITTLE_BIT_ENDIAN
  341. struct mlme_ht_param_info {
  342. uint8_t reserved:3;
  343. uint8_t mpdu_density:3;
  344. uint8_t max_rx_ampdu_factor:2;
  345. } qdf_packed;
  346. #else
  347. struct mlme_ht_param_info {
  348. uint8_t max_rx_ampdu_factor:2;
  349. uint8_t mpdu_density:3;
  350. uint8_t reserved:3;
  351. #endif
  352. } qdf_packed;
  353. /**
  354. * struct mlme_ht_ext_cap_info - Extended HT Capabilities Info
  355. * reserved_2: Reserved Bits
  356. * mcs_feedback: MCS Feedback Capability
  357. * reserved_1: Reserved Bits
  358. * transition_time: Time needed for transition between 20Mhz and 40 Mhz
  359. * pco: PCO (Phased Coexistence Operation) Support
  360. */
  361. #ifndef ANI_LITTLE_BIT_ENDIAN
  362. struct mlme_ht_ext_cap_info {
  363. uint16_t reserved_2:6;
  364. uint16_t mcs_feedback:2;
  365. uint16_t reserved_1:5;
  366. uint16_t transition_time:2;
  367. uint16_t pco:1;
  368. } qdf_packed;
  369. #else
  370. struct mlme_ht_ext_cap_info {
  371. uint16_t pco:1;
  372. uint16_t transition_time:2;
  373. uint16_t reserved1:5;
  374. uint16_t mcs_feedback:2;
  375. uint16_t reserved2:6;
  376. } qdf_packed;
  377. #endif
  378. /**
  379. * struct mlme_ht_info_field_1 - Additional HT IE Field1
  380. * @service_interval_granularity: Shortest Service Interval
  381. * @controlled_access_only: Access Control for assoc requests
  382. * @rifs_mode: Reduced Interframe Spacing mode
  383. * @recommended_tx_width_set: Recommended Tx Channel Width
  384. * @secondary_channel_offset: Secondary Channel Offset
  385. */
  386. #ifndef ANI_LITTLE_BIT_ENDIAN
  387. struct mlme_ht_info_field_1 {
  388. uint8_t service_interval_granularity:3;
  389. uint8_t controlled_access_only:1;
  390. uint8_t rifs_mode:1;
  391. uint8_t recommended_tx_width_set:1;
  392. uint8_t secondary_channel_offset:2;
  393. } qdf_packed;
  394. #else
  395. struct mlme_ht_info_field_1 {
  396. uint8_t secondary_channel_offset:2;
  397. uint8_t recommended_tx_width_set:1;
  398. uint8_t rifs_mode:1;
  399. uint8_t controlled_access_only:1;
  400. uint8_t service_interval_granularity:3;
  401. } qdf_packed;
  402. #endif
  403. /* struct mlme_ht_info_field_2 - Additional HT IE Field2
  404. * @reserved: reserved bits
  405. * @obss_non_ht_sta_present: Protection for non-HT STAs by Overlapping BSS
  406. * @transmit_burst_limit: Transmit Burst Limit
  407. * @non_gf_devices_present: Non Greenfield devices present
  408. * @op_mode: Operation Mode
  409. */
  410. #ifndef ANI_LITTLE_BIT_ENDIAN
  411. struct mlme_ht_info_field_2 {
  412. uint16_t reserved:11;
  413. uint16_t obss_non_ht_sta_present:1;
  414. uint16_t transmit_burst_limit:1;
  415. uint16_t non_gf_devices_present:1;
  416. uint16_t op_mode:2;
  417. } qdf_packed;
  418. #else
  419. struct mlme_ht_info_field_2 {
  420. uint16_t op_mode:2;
  421. uint16_t non_gf_devices_present:1;
  422. uint16_t transmit_burst_limit:1;
  423. uint16_t obss_non_ht_sta_present:1;
  424. uint16_t reserved:11;
  425. } qdf_packed;
  426. #endif
  427. /**
  428. * struct mlme_ht_info_field_3 - Additional HT IE Field3
  429. * @reserved: reserved bits
  430. * @pco_phase: PCO Phase
  431. * @pco_active: PCO state
  432. * @lsig_txop_protection_full_support: L-Sig TXOP Protection Full Support
  433. * @secondary_beacon: Beacon ID
  434. * @dual_cts_protection: Dual CTS protection Required
  435. * @basic_stbc_mcs: Basic STBC MCS
  436. */
  437. #ifndef ANI_LITTLE_BIT_ENDIAN
  438. struct mlme_ht_info_field_3 {
  439. uint16_t reserved:4;
  440. uint16_t pco_phase:1;
  441. uint16_t pco_active:1;
  442. uint16_t lsig_txop_protection_full_support:1;
  443. uint16_t secondary_beacon:1;
  444. uint16_t dual_cts_protection:1;
  445. uint16_t basic_stbc_mcs:7;
  446. } qdf_packed;
  447. #else
  448. struct mlme_ht_info_field_3 {
  449. uint16_t basic_stbc_mcs:7;
  450. uint16_t dual_cts_protection:1;
  451. uint16_t secondary_beacon:1;
  452. uint16_t lsig_txop_protection_full_support:1;
  453. uint16_t pco_active:1;
  454. uint16_t pco_phase:1;
  455. uint16_t reserved:4;
  456. } qdf_packed;
  457. #endif
  458. /**
  459. * struct wlan_mlme_ht_caps - HT Capabilities related config items
  460. * @ht_cap_info: HT capabilities Info Structure
  461. * @ampdu_params: AMPDU parameters
  462. * @ext_cap_info: HT EXT capabilities info
  463. * @info_field_1: HT Information Subset 1
  464. * @info_field_2: HT Information Subset 2
  465. * @info_field_3: HT Information Subset 3
  466. * @short_preamble: Short Preamble support
  467. * @enable_ampdu_ps: Enable AMPDU Power Save
  468. * @enable_smps: Enabled SM Power Save
  469. * @smps : SM Power Save mode
  470. * @max_num_amsdu: Max number of AMSDU
  471. * @tx_ldpc_enable: Enable Tx LDPC
  472. * @short_slot_time_enabled: Enabled/disable short slot time
  473. */
  474. struct wlan_mlme_ht_caps {
  475. struct mlme_ht_capabilities_info ht_cap_info;
  476. struct mlme_ht_param_info ampdu_params;
  477. struct mlme_ht_ext_cap_info ext_cap_info;
  478. struct mlme_ht_info_field_1 info_field_1;
  479. struct mlme_ht_info_field_2 info_field_2;
  480. struct mlme_ht_info_field_3 info_field_3;
  481. bool short_preamble;
  482. bool enable_ampdu_ps;
  483. bool enable_smps;
  484. uint8_t smps;
  485. uint8_t max_num_amsdu;
  486. uint8_t tx_ldpc_enable;
  487. bool short_slot_time_enabled;
  488. };
  489. #define MLME_CFG_WPS_UUID_MAX_LEN 16
  490. /*
  491. * struct wlan_mlme_wps_params - All wps based related cfg items
  492. *
  493. * @enable_wps - to enable wps
  494. * @wps_state - current wps state
  495. * @wps_version - wps version
  496. * @wps_cfg_method - wps config method
  497. * @wps_primary_device_category - wps primary device category
  498. * @wps_primary_device_oui - primary device OUI
  499. * @wps_device_sub_category - device sub category
  500. * @wps_device_password_id - password id of device
  501. * @wps_uuid - wps uuid to be sent in probe
  502. */
  503. struct wlan_mlme_wps_params {
  504. uint8_t enable_wps;
  505. uint8_t wps_state;
  506. uint8_t wps_version;
  507. uint32_t wps_cfg_method;
  508. uint32_t wps_primary_device_category;
  509. uint32_t wps_primary_device_oui;
  510. uint16_t wps_device_sub_category;
  511. uint32_t wps_device_password_id;
  512. struct mlme_cfg_str wps_uuid;
  513. };
  514. #define MLME_CFG_LISTEN_INTERVAL 1
  515. #define MLME_CFG_BEACON_INTERVAL_DEF 100
  516. #define MLME_CFG_TX_MGMT_RATE_DEF 0xFF
  517. #define MLME_CFG_TX_MGMT_2G_RATE_DEF 0xFF
  518. #define MLME_CFG_TX_MGMT_5G_RATE_DEF 0xFF
  519. /**
  520. * struct wlan_mlme_cfg_sap - SAP related config items
  521. * @cfg_ssid: SSID to be configured
  522. * @beacon_interval: beacon interval
  523. * @dtim_interval: dtim interval
  524. * @listen_interval: listen interval
  525. * @sap_11g_policy: Check if 11g support is enabled
  526. * @assoc_sta_limit: Limit on number of STA associated to SAP
  527. * @enable_lte_coex: Flag for LTE coexistence
  528. * @rmc_action_period_freq: rmc action period frequency
  529. * @rate_tx_mgmt: mgmt frame tx rate
  530. * @rate_tx_mgmt_2g: mgmt frame tx rate for 2G band
  531. * @rate_tx_mgmt_5g: mgmt frame tx rate for 5G band
  532. * @tele_bcn_wakeup_en: beacon wakeup enable/disable
  533. * @tele_bcn_max_li: max listen interval
  534. * @sap_get_peer_info: get peer info
  535. * @sap_allow_all_chan_param_name: allow all channels
  536. * @sap_max_no_peers: Maximum number of peers
  537. * @sap_max_offload_peers: Maximum number of peer offloads
  538. * @sap_max_offload_reorder_buffs: Maximum offload reorder buffs
  539. * @sap_ch_switch_beacon_cnt: Number of beacons to be sent out during CSA
  540. * @sap_internal_restart: flag to check if sap restart is in progress
  541. * @sap_ch_switch_mode: Channel switch test mode enable/disable
  542. * @chan_switch_hostapd_rate_enabled_name: enable/disable skip hostapd rate
  543. * @reduced_beacon_interval: reduced beacon interval value
  544. * @max_li_modulated_dtim_time: Max modulated DTIM time.
  545. * @country_code_priority: Country code priority.
  546. * @sap_pref_chan_location: SAP Preferred channel location.
  547. * @sap_mcc_chnl_avoid: SAP MCC channel avoidance flag
  548. * @sap_11ac_override: Overrirde SAP bandwidth to 11ac
  549. * @go_11ac_override: Override GO bandwidth to 11ac
  550. * @sap_sae_enabled: enable sae in sap mode
  551. * @is_sap_bcast_deauth_enabled: enable bcast deauth for sap
  552. */
  553. struct wlan_mlme_cfg_sap {
  554. uint8_t cfg_ssid[WLAN_SSID_MAX_LEN];
  555. uint8_t cfg_ssid_len;
  556. uint16_t beacon_interval;
  557. uint16_t dtim_interval;
  558. uint16_t listen_interval;
  559. bool sap_11g_policy;
  560. uint8_t assoc_sta_limit;
  561. bool enable_lte_coex;
  562. uint16_t rmc_action_period_freq;
  563. uint8_t rate_tx_mgmt;
  564. uint8_t rate_tx_mgmt_2g;
  565. uint8_t rate_tx_mgmt_5g;
  566. bool tele_bcn_wakeup_en;
  567. uint8_t tele_bcn_max_li;
  568. bool sap_get_peer_info;
  569. bool sap_allow_all_chan_param_name;
  570. uint8_t sap_max_no_peers;
  571. uint8_t sap_max_offload_peers;
  572. uint8_t sap_max_offload_reorder_buffs;
  573. uint8_t sap_ch_switch_beacon_cnt;
  574. bool sap_internal_restart;
  575. bool sap_ch_switch_mode;
  576. bool chan_switch_hostapd_rate_enabled_name;
  577. uint8_t reduced_beacon_interval;
  578. uint8_t max_li_modulated_dtim_time;
  579. bool country_code_priority;
  580. uint8_t sap_pref_chan_location;
  581. bool sap_force_11n_for_11ac;
  582. bool go_force_11n_for_11ac;
  583. bool ap_random_bssid_enable;
  584. uint8_t sap_mcc_chnl_avoid;
  585. bool sap_11ac_override;
  586. bool go_11ac_override;
  587. bool sap_sae_enabled;
  588. bool is_sap_bcast_deauth_enabled;
  589. };
  590. /**
  591. * struct wlan_mlme_dfs_cfg - DFS Capabilities related config items
  592. * @dfs_master_capable: Is DFS master mode support enabled
  593. * @dfs_disable_channel_switch: disable channel switch on radar detection
  594. * @dfs_ignore_cac: Disable cac
  595. * @dfs_filter_offload: dfs filter offloaad
  596. * @dfs_beacon_tx_enhanced: enhance dfs beacon tx
  597. * @dfs_prefer_non_dfs: perefer non dfs channel after radar
  598. * @dfs_disable_japan_w53: Disable W53 channels
  599. * @sap_tx_leakage_threshold: sap tx leakage threshold
  600. */
  601. struct wlan_mlme_dfs_cfg {
  602. bool dfs_master_capable;
  603. bool dfs_disable_channel_switch;
  604. bool dfs_ignore_cac;
  605. bool dfs_filter_offload;
  606. bool dfs_beacon_tx_enhanced;
  607. bool dfs_prefer_non_dfs;
  608. bool dfs_disable_japan_w53;
  609. uint32_t sap_tx_leakage_threshold;
  610. };
  611. /**
  612. * struct wlan_mlme_mbo - Multiband Operation related ini configs
  613. * @mbo_candidate_rssi_thres: candidate AP's min rssi to accept it
  614. * @mbo_current_rssi_thres: Connected AP's rssi threshold below which
  615. * transition is considered
  616. * @mbo_current_rssi_mcc_thres: connected AP's RSSI threshold value to prefer
  617. * against MCC
  618. * @mbo_candidate_rssi_btc_thres: Candidate AP's minimum RSSI threshold to
  619. * prefer it even in BT coex.
  620. */
  621. struct wlan_mlme_mbo {
  622. int8_t mbo_candidate_rssi_thres;
  623. int8_t mbo_current_rssi_thres;
  624. int8_t mbo_current_rssi_mcc_thres;
  625. int8_t mbo_candidate_rssi_btc_thres;
  626. };
  627. /**
  628. * struct wlan_mlme_powersave - Powersave related ini configs
  629. * @is_imps_enabled: flag to enable/disable IMPS
  630. * @is_bmps_enabled: flag to enable/disable BMPS
  631. * @auto_bmps_timer: auto BMPS timer value
  632. * @bmps_min_listen_interval: BMPS listen inteval minimum value
  633. * @bmps_max_listen_interval: BMPS listen interval maximum value
  634. * @dtim_selection_diversity: dtim selection diversity value to be sent to fw
  635. */
  636. struct wlan_mlme_powersave {
  637. bool is_imps_enabled;
  638. bool is_bmps_enabled;
  639. uint32_t auto_bmps_timer_val;
  640. uint32_t bmps_min_listen_interval;
  641. uint32_t bmps_max_listen_interval;
  642. uint32_t dtim_selection_diversity;
  643. };
  644. /**
  645. * struct wlan_mlme_vht_caps - MLME VHT config items
  646. * @supp_chan_width: Supported Channel Width
  647. * @ldpc_coding_cap: LDPC Coding Capability
  648. * @short_gi_80mhz: 80MHz Short Guard Interval
  649. * @short_gi_160mhz: 160MHz Short Guard Interval
  650. * @tx_stbc: Tx STBC cap
  651. * @rx_stbc: Rx STBC cap
  652. * @su_bformer: SU Beamformer cap
  653. * @su_bformee: SU Beamformee cap
  654. * @tx_bfee_ant_supp: Tx beamformee anti supp
  655. * @num_soundingdim: Number of sounding dimensions
  656. * @mu_bformer: MU Beamformer cap
  657. * @txop_ps: Tx OPs in power save
  658. * @htc_vhtc: htc_vht capability
  659. * @link_adap_cap: Link adaptation capability
  660. * @rx_antpattern: Rx Antenna Pattern cap
  661. * @tx_antpattern: Tx Antenna Pattern cap
  662. * @rx_mcs_map: Rx MCS Map
  663. * @tx_mcs_map: Tx MCS Map
  664. * @rx_supp_data_rate: Rx highest supported data rate
  665. * @tx_supp_data_rate: Tx highest supported data rate
  666. * @basic_mcs_set: Basic MCS set
  667. * @enable_txbf_20mhz: enable tx bf for 20mhz
  668. * @channel_width: Channel width capability for 11ac
  669. * @rx_mcs: VHT Rx MCS capability for 1x1 mode
  670. * @tx_mcs: VHT Tx MCS capability for 1x1 mode
  671. * @rx_mcs2x2: VHT Rx MCS capability for 2x2 mode
  672. * @tx_mcs2x2: VHT Tx MCS capability for 2x2 mode
  673. * @enable_vht20_mcs9: Enables VHT MCS9 in 20M BW operation
  674. * @enable2x2: Enables/disables VHT Tx/Rx MCS values for 2x2
  675. * @enable_mu_bformee: Enables/disables multi-user (MU)
  676. * beam formee capability
  677. * @enable_paid: Enables/disables paid
  678. * @enable_gid: Enables/disables gid
  679. * @b24ghz_band: To control VHT support in 2.4 GHz band
  680. * @vendor_24ghz_band: to control VHT support based on vendor
  681. * ie in 2.4 GHz band
  682. * @ampdu_len_exponent: To handle maximum receive AMPDU ampdu len exponent
  683. * @ampdu_len: To handle maximum receive AMPDU ampdu len
  684. * @tx_bfee_sap: enable tx bfee SAp
  685. * @subfee_vendor_vhtie: enable subfee vendor vht ie
  686. * @tx_bf_cap: Transmit bf capability
  687. * @as_cap: Antenna sharing capability info
  688. * @disable_ldpc_with_txbf_ap: Disable ldpc capability
  689. */
  690. struct mlme_vht_capabilities_info {
  691. uint8_t supp_chan_width;
  692. bool ldpc_coding_cap;
  693. bool short_gi_80mhz;
  694. bool short_gi_160mhz;
  695. bool tx_stbc;
  696. bool rx_stbc;
  697. bool su_bformer;
  698. bool su_bformee;
  699. uint8_t tx_bfee_ant_supp;
  700. uint8_t num_soundingdim;
  701. bool mu_bformer;
  702. bool txop_ps;
  703. bool htc_vhtc;
  704. uint8_t link_adap_cap;
  705. bool rx_antpattern;
  706. bool tx_antpattern;
  707. uint32_t rx_mcs_map;
  708. uint32_t tx_mcs_map;
  709. uint32_t rx_supp_data_rate;
  710. uint32_t tx_supp_data_rate;
  711. uint32_t basic_mcs_set;
  712. bool enable_txbf_20mhz;
  713. uint8_t channel_width;
  714. uint32_t rx_mcs;
  715. uint32_t tx_mcs;
  716. uint8_t rx_mcs2x2;
  717. uint8_t tx_mcs2x2;
  718. bool enable_vht20_mcs9;
  719. bool enable2x2;
  720. bool enable_mu_bformee;
  721. bool enable_paid;
  722. bool enable_gid;
  723. bool b24ghz_band;
  724. bool vendor_24ghz_band;
  725. uint8_t ampdu_len_exponent;
  726. uint8_t ampdu_len;
  727. bool tx_bfee_sap;
  728. bool vendor_vhtie;
  729. uint8_t tx_bf_cap;
  730. uint8_t as_cap;
  731. bool disable_ldpc_with_txbf_ap;
  732. };
  733. /**
  734. * struct wlan_mlme_vht_caps - VHT Capabilities related config items
  735. * @vht_cap_info: VHT capabilities Info Structure
  736. */
  737. struct wlan_mlme_vht_caps {
  738. struct mlme_vht_capabilities_info vht_cap_info;
  739. };
  740. /**
  741. * struct wlan_mlme_qos - QOS TX/RX aggregation related CFG items
  742. * @tx_aggregation_size: TX aggr size in number of MPDUs
  743. * @tx_aggregation_size_be: No. of MPDUs for BE queue for TX aggr
  744. * @tx_aggregation_size_bk: No. of MPDUs for BK queue for TX aggr
  745. * @tx_aggregation_size_vi: No. of MPDUs for VI queue for TX aggr
  746. * @tx_aggregation_size_vo: No. of MPDUs for VO queue for TX aggr
  747. * @rx_aggregation_size: No. of MPDUs for RX aggr
  748. * @tx_aggr_sw_retry_threshold_be: aggr sw retry threshold for BE
  749. * @tx_aggr_sw_retry_threshold_bk: aggr sw retry threshold for BK
  750. * @tx_aggr_sw_retry_threshold_vi: aggr sw retry threshold for VI
  751. * @tx_aggr_sw_retry_threshold_vo: aggr sw retry threshold for VO
  752. * @tx_aggr_sw_retry_threshold: aggr sw retry threshold
  753. * @tx_non_aggr_sw_retry_threshold_be: non aggr sw retry threshold for BE
  754. * @tx_non_aggr_sw_retry_threshold_bk: non aggr sw retry threshold for BK
  755. * @tx_non_aggr_sw_retry_threshold_vi: non aggr sw retry threshold for VI
  756. * @tx_non_aggr_sw_retry_threshold_vo: non aggr sw retry threshold for VO
  757. * @tx_non_aggr_sw_retry_threshold: non aggr sw retry threshold
  758. * @sap_max_inactivity_override: Override updating ap_sta_inactivity from
  759. * hostapd.conf
  760. * @sap_uapsd_enabled: Flag to enable/disable UAPSD for SAP
  761. */
  762. struct wlan_mlme_qos {
  763. uint32_t tx_aggregation_size;
  764. uint32_t tx_aggregation_size_be;
  765. uint32_t tx_aggregation_size_bk;
  766. uint32_t tx_aggregation_size_vi;
  767. uint32_t tx_aggregation_size_vo;
  768. uint32_t rx_aggregation_size;
  769. uint32_t tx_aggr_sw_retry_threshold_be;
  770. uint32_t tx_aggr_sw_retry_threshold_bk;
  771. uint32_t tx_aggr_sw_retry_threshold_vi;
  772. uint32_t tx_aggr_sw_retry_threshold_vo;
  773. uint32_t tx_aggr_sw_retry_threshold;
  774. uint32_t tx_non_aggr_sw_retry_threshold_be;
  775. uint32_t tx_non_aggr_sw_retry_threshold_bk;
  776. uint32_t tx_non_aggr_sw_retry_threshold_vi;
  777. uint32_t tx_non_aggr_sw_retry_threshold_vo;
  778. uint32_t tx_non_aggr_sw_retry_threshold;
  779. bool sap_max_inactivity_override;
  780. bool sap_uapsd_enabled;
  781. };
  782. #ifdef WLAN_FEATURE_11AX
  783. #define MLME_HE_PPET_LEN 25
  784. #define WNI_CFG_HE_OPS_BSS_COLOR_MAX 0x3F
  785. /**
  786. * struct wlan_mlme_he_caps - HE Capabilities related config items
  787. */
  788. struct wlan_mlme_he_caps {
  789. tDot11fIEhe_cap dot11_he_cap;
  790. tDot11fIEhe_cap he_cap_orig;
  791. uint8_t he_ppet_2g[MLME_HE_PPET_LEN];
  792. uint8_t he_ppet_5g[MLME_HE_PPET_LEN];
  793. uint32_t he_ops_basic_mcs_nss;
  794. uint8_t he_dynamic_fragmentation;
  795. uint8_t enable_ul_mimo;
  796. uint8_t enable_ul_ofdm;
  797. uint32_t he_sta_obsspd;
  798. };
  799. #endif
  800. /**
  801. * struct wlan_mlme_chain_cfg - Chain info related structure
  802. * @max_tx_chains_2g: max tx chains supported in 2.4ghz band
  803. * @max_rx_chains_2g: max rx chains supported in 2.4ghz band
  804. * @max_tx_chains_5g: max tx chains supported in 5ghz band
  805. * @max_rx_chains_5g: max rx chains supported in 5ghz band
  806. */
  807. struct wlan_mlme_chain_cfg {
  808. uint8_t max_tx_chains_2g;
  809. uint8_t max_rx_chains_2g;
  810. uint8_t max_tx_chains_5g;
  811. uint8_t max_rx_chains_5g;
  812. };
  813. /**
  814. * struct wlan_mlme_rates - RATES related config items
  815. * @cfpPeriod: cfp period info
  816. * @cfpMaxDuration: cfp Max duration info
  817. * @max_htmcs_txdata: max HT mcs info for Tx
  818. * @disable_abg_rate_txdata: disable abg rate info for tx data
  819. * @sap_max_mcs_txdata: sap max mcs info
  820. * @disable_high_ht_mcs_2x2: disable high mcs for 2x2 info
  821. * @supported_11b: supported 11B rates
  822. * @supported_11a: supported 11A rates
  823. * @opr_rate_set: operational rates set
  824. * @ext_opr_rate_set: extended operational rates set
  825. * @supported_mcs_set: supported MCS set
  826. * @basic_mcs_set: basic MCS set
  827. * @current_mcs_set: current MCS set
  828. */
  829. struct wlan_mlme_rates {
  830. uint8_t cfp_period;
  831. uint16_t cfp_max_duration;
  832. uint16_t max_htmcs_txdata;
  833. bool disable_abg_rate_txdata;
  834. uint16_t sap_max_mcs_txdata;
  835. uint8_t disable_high_ht_mcs_2x2;
  836. struct mlme_cfg_str supported_11b;
  837. struct mlme_cfg_str supported_11a;
  838. struct mlme_cfg_str opr_rate_set;
  839. struct mlme_cfg_str ext_opr_rate_set;
  840. struct mlme_cfg_str supported_mcs_set;
  841. struct mlme_cfg_str basic_mcs_set;
  842. struct mlme_cfg_str current_mcs_set;
  843. };
  844. /* Flags for gLimProtectionControl that is updated in pe session*/
  845. #define MLME_FORCE_POLICY_PROTECTION_DISABLE 0
  846. #define MLME_FORCE_POLICY_PROTECTION_CTS 1
  847. #define MLME_FORCE_POLICY_PROTECTION_RTS 2
  848. #define MLME_FORCE_POLICY_PROTECTION_DUAL_CTS 3
  849. #define MLME_FORCE_POLICY_PROTECTION_RTS_ALWAYS 4
  850. #define MLME_FORCE_POLICY_PROTECTION_AUTO 5
  851. /* protection_enabled bits*/
  852. #define MLME_PROTECTION_ENABLED_FROM_llA 0
  853. #define MLME_PROTECTION_ENABLED_FROM_llB 1
  854. #define MLME_PROTECTION_ENABLED_FROM_llG 2
  855. #define MLME_PROTECTION_ENABLED_HT_20 3
  856. #define MLME_PROTECTION_ENABLED_NON_GF 4
  857. #define MLME_PROTECTION_ENABLED_LSIG_TXOP 5
  858. #define MLME_PROTECTION_ENABLED_RIFS 6
  859. #define MLME_PROTECTION_ENABLED_OBSS 7
  860. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llA 8
  861. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llB 9
  862. #define MLME_PROTECTION_ENABLED_OLBC_FROM_llG 10
  863. #define MLME_PROTECTION_ENABLED_OLBC_HT20 11
  864. #define MLME_PROTECTION_ENABLED_OLBC_NON_GF 12
  865. #define MLME_PROTECTION_ENABLED_OLBC_LSIG_TXOP 13
  866. #define MLME_PROTECTION_ENABLED_OLBC_RIFS 14
  867. #define MLME_PROTECTION_ENABLED_OLBC_OBSS 15
  868. /**
  869. * struct wlan_mlme_feature_flag - feature related information
  870. * @accept_short_slot_assoc: enable short sloc feature
  871. * @enable_hcf: enable HCF feature
  872. * @enable_rsn: enable RSN for connection
  873. * @enable_short_preamble_11g: enable short preamble for 11g
  874. * @enable_short_slot_time_11g
  875. * @enable_ampdu: enable AMPDU feature
  876. * @enable_mcc: enable MCC feature
  877. * @mcc_rts_cts_prot: RTS-CTS protection in MCC
  878. * @mcc_bcast_prob_rsp: broadcast Probe Response in MCC
  879. * @channel_bonding_mode: channel bonding mode
  880. * @enable_block_ack: enable block ack feature
  881. * @channel_bonding_mode_24ghz: configures Channel Bonding in 24 GHz
  882. * @channel_bonding_mode_5ghz: configures Channel Bonding in 5 GHz
  883. */
  884. struct wlan_mlme_feature_flag {
  885. bool accept_short_slot_assoc;
  886. bool enable_hcf;
  887. bool enable_rsn;
  888. bool enable_short_preamble_11g;
  889. bool enable_short_slot_time_11g;
  890. bool enable_ampdu;
  891. bool enable_mcc;
  892. uint8_t mcc_rts_cts_prot;
  893. uint8_t mcc_bcast_prob_rsp;
  894. uint32_t channel_bonding_mode;
  895. uint32_t enable_block_ack;
  896. uint32_t channel_bonding_mode_24ghz;
  897. uint32_t channel_bonding_mode_5ghz;
  898. };
  899. /*
  900. * struct wlan_mlme_sap_protection_cfg - SAP erp protection config items
  901. * @ignore_peer_ht_opmode: Ignore the ht opmode of the peer. Dynamic via INI
  902. * @enable_ap_obss_protection: enable/disable AP OBSS protection
  903. * @protection_force_policy: Protection force policy. Static via cfg
  904. * @is_ap_prot_enabled: Enable/disable SAP protection
  905. * @ap_protection_mode: AP protection bitmap
  906. * @protection_enabled: Force enable protection. static via cfg
  907. */
  908. struct wlan_mlme_sap_protection {
  909. bool ignore_peer_ht_opmode;
  910. bool enable_ap_obss_protection;
  911. uint8_t protection_force_policy;
  912. bool is_ap_prot_enabled;
  913. uint16_t ap_protection_mode;
  914. uint32_t protection_enabled;
  915. };
  916. /*
  917. * struct wlan_mlme_chainmask - All chainmask related cfg items
  918. * @txchainmask1x1: To set transmit chainmask
  919. * @rxchainmask1x1: To set rx chainmask
  920. * @tx_chain_mask_cck: Used to enable/disable Cck ChainMask
  921. * @tx_chain_mask_1ss: Enables/disables tx chain Mask1ss
  922. * @num_11b_tx_chains: Number of Tx Chains in 11b mode
  923. * @num_11ag_tx_chains: Number of Tx Chains in 11ag mode
  924. * @tx_chain_mask_2g: Tx chain mask for 2g
  925. * @rx_chain_mask_2g: Tx chain mask for 2g
  926. * @tx_chain_mask_5g: Tx chain mask for 5g
  927. * @rx_chain_mask_5g: Rx chain mask for 5g
  928. * @enable_bt_chain_separation: Enable/Disable BT/WLAN Host chain seperation
  929. */
  930. struct wlan_mlme_chainmask {
  931. uint8_t txchainmask1x1;
  932. uint8_t rxchainmask1x1;
  933. bool tx_chain_mask_cck;
  934. uint8_t tx_chain_mask_1ss;
  935. uint16_t num_11b_tx_chains;
  936. uint16_t num_11ag_tx_chains;
  937. uint8_t tx_chain_mask_2g;
  938. uint8_t rx_chain_mask_2g;
  939. uint8_t tx_chain_mask_5g;
  940. uint8_t rx_chain_mask_5g;
  941. bool enable_bt_chain_separation;
  942. };
  943. /* struct wlan_mlme_generic - Generic CFG config items
  944. *
  945. * @band_capability: HW Band Capability - Both or 2.4G only or 5G only
  946. * @band: Current Band - Internal variable, initialized to INI and updated later
  947. * @select_5ghz_margin: RSSI margin to select 5Ghz over 2.4 Ghz
  948. * @sub_20_chan_width: Sub 20Mhz Channel Width
  949. * @ito_repeat_count: ITO Repeat Count
  950. * @pmf_sa_query_max_retries: PMF query max retries for SAP
  951. * @pmf_sa_query_retry_interval: PMF query retry interval for SAP
  952. * @dropped_pkt_disconnect_thresh: Threshold for dropped pkts before disconnect
  953. * @rtt_mac_randomization: Enable/Disable RTT MAC randomization
  954. * @rtt3_enabled: RTT3 enable or disable info
  955. * @prevent_link_down: Enable/Disable prevention of link down
  956. * @memory_deep_sleep: Enable/Disable memory deep sleep
  957. * @cck_tx_fir_override: Enable/Disable CCK Tx FIR Override
  958. * @crash_inject: Enable/Disable Crash Inject
  959. * @lpass_support: Enable/Disable LPASS Support
  960. * @self_recovery: Enable/Disable Self Recovery
  961. * @sap_dot11mc: Enable/Disable SAP 802.11mc support
  962. * @fatal_event_trigger: Enable/Disable Fatal Events Trigger
  963. * @optimize_ca_event: Enable/Disable Optimization of CA events
  964. * @fw_timeout_crash: Enable/Disable FW Timeout Crash *
  965. * @debug_packet_log: Debug packet log flags
  966. * @enabled_11h: enable 11h flag
  967. * @enabled_11d: enable 11d flag
  968. * @enable_beacon_reception_stats: enable beacon reception stats
  969. * @enable_remove_time_stamp_sync_cmd: Enable remove time stamp sync cmd
  970. * @enable_change_channel_bandwidth: enable/disable change channel bw in mission
  971. * mode
  972. */
  973. struct wlan_mlme_generic {
  974. enum band_info band_capability;
  975. enum band_info band;
  976. uint8_t select_5ghz_margin;
  977. uint8_t sub_20_chan_width;
  978. uint8_t ito_repeat_count;
  979. uint8_t pmf_sa_query_max_retries;
  980. uint16_t pmf_sa_query_retry_interval;
  981. uint16_t dropped_pkt_disconnect_thresh;
  982. bool rtt_mac_randomization;
  983. bool rtt3_enabled;
  984. bool prevent_link_down;
  985. bool memory_deep_sleep;
  986. bool cck_tx_fir_override;
  987. bool crash_inject;
  988. bool lpass_support;
  989. bool self_recovery;
  990. bool sap_dot11mc;
  991. bool fatal_event_trigger;
  992. bool optimize_ca_event;
  993. bool fw_timeout_crash;
  994. uint8_t debug_packet_log;
  995. bool enabled_11h;
  996. bool enabled_11d;
  997. bool enable_deauth_to_disassoc_map;
  998. bool enable_beacon_reception_stats;
  999. bool enable_remove_time_stamp_sync_cmd;
  1000. bool enable_change_channel_bandwidth;
  1001. };
  1002. /*
  1003. * struct wlan_mlme_product_details_cfg - product details config items
  1004. * @manufacturer_name: manufacture name
  1005. * @model_number: model number
  1006. * @model_name: model name
  1007. * @manufacture_product_name: manufacture product name
  1008. * @manufacture_product_version: manufacture product version
  1009. */
  1010. struct wlan_mlme_product_details_cfg {
  1011. char manufacturer_name[WLAN_CFG_MFR_NAME_LEN + 1];
  1012. char model_number[WLAN_CFG_MODEL_NUMBER_LEN + 1];
  1013. char model_name[WLAN_CFG_MODEL_NAME_LEN + 1];
  1014. char manufacture_product_name[WLAN_CFG_MFR_PRODUCT_NAME_LEN + 1];
  1015. char manufacture_product_version[WLAN_CFG_MFR_PRODUCT_VERSION_LEN + 1];
  1016. };
  1017. /*
  1018. * struct wlan_mlme_acs - All acs related cfg items
  1019. * @is_acs_with_more_param - to enable acs with more param
  1020. * @auto_channel_select_weight - to set acs channel weight
  1021. * @is_vendor_acs_support - enable application based channel selection
  1022. * @is_acs_support_for_dfs_ltecoex - enable channel for dfs and lte coex
  1023. * @is_external_acs_policy - control external policy
  1024. */
  1025. struct wlan_mlme_acs {
  1026. bool is_acs_with_more_param;
  1027. uint32_t auto_channel_select_weight;
  1028. bool is_vendor_acs_support;
  1029. bool is_acs_support_for_dfs_ltecoex;
  1030. bool is_external_acs_policy;
  1031. };
  1032. /*
  1033. * struct wlan_mlme_cfg_twt - All twt related cfg items
  1034. * @is_twt_bcast_enabled: twt capability for the session
  1035. * @is_twt_enabled: global twt configuration
  1036. * @is_twt_responder_enabled: twt responder
  1037. * @is_twt_requestor_enabled: twt requestor
  1038. * @twt_congestion_timeout: congestion timeout value
  1039. */
  1040. struct wlan_mlme_cfg_twt {
  1041. bool is_twt_bcast_enabled;
  1042. bool is_twt_enabled;
  1043. bool is_twt_responder_enabled;
  1044. bool is_twt_requestor_enabled;
  1045. uint32_t twt_congestion_timeout;
  1046. };
  1047. /**
  1048. * struct wlan_mlme_obss_ht40 - OBSS HT40 config items
  1049. * @active_dwelltime: obss active dwelltime
  1050. * @passive_dwelltime: obss passive dwelltime
  1051. * @width_trigger_interval: obss trigger interval
  1052. * @passive_per_channel: obss scan passive total duration per channel
  1053. * @active_per_channel: obss scan active total duration per channel
  1054. * @width_trans_delay: obss width transition delay
  1055. * @scan_activity_threshold: obss scan activity threshold
  1056. * @is_override_ht20_40_24g: use channel bonding in 2.4 GHz
  1057. * @obss_detection_offload_enabled: Enable OBSS detection offload
  1058. * @obss_color_collision_offload_enabled: Enable obss color collision
  1059. */
  1060. struct wlan_mlme_obss_ht40 {
  1061. uint32_t active_dwelltime;
  1062. uint32_t passive_dwelltime;
  1063. uint32_t width_trigger_interval;
  1064. uint32_t passive_per_channel;
  1065. uint32_t active_per_channel;
  1066. uint32_t width_trans_delay;
  1067. uint32_t scan_activity_threshold;
  1068. bool is_override_ht20_40_24g;
  1069. bool obss_detection_offload_enabled;
  1070. bool obss_color_collision_offload_enabled;
  1071. };
  1072. /**
  1073. * enum dot11p_mode - The 802.11p mode of operation
  1074. * @WLAN_HDD_11P_DISABLED: 802.11p mode is disabled
  1075. * @WLAN_HDD_11P_STANDALONE: 802.11p-only operation
  1076. * @WLAN_HDD_11P_CONCURRENT: 802.11p and WLAN operate concurrently
  1077. */
  1078. enum dot11p_mode {
  1079. CFG_11P_DISABLED = 0,
  1080. CFG_11P_STANDALONE,
  1081. CFG_11P_CONCURRENT,
  1082. };
  1083. #define MAX_VDEV_NSS 2
  1084. #define MAX_VDEV_CHAINS 2
  1085. /**
  1086. * struct wlan_mlme_nss_chains - MLME vdev config of nss, and chains
  1087. * @num_tx_chains: tx chains of vdev config
  1088. * @num_rx_chains: rx chains of vdev config
  1089. * @tx_nss: tx nss of vdev config
  1090. * @rx_nss: rx nss of vdev config
  1091. * @num_tx_chains_11b: number of tx chains in 11b mode
  1092. * @num_tx_chains_11g: number of tx chains in 11g mode
  1093. * @num_tx_chains_11a: number of tx chains in 11a mode
  1094. * @disable_rx_mrc: disable 2 rx chains, in rx nss 1 mode
  1095. * @disable_tx_mrc: disable 2 tx chains, in tx nss 1 mode
  1096. */
  1097. struct wlan_mlme_nss_chains {
  1098. uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
  1099. uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
  1100. uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
  1101. uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
  1102. uint32_t num_tx_chains_11b;
  1103. uint32_t num_tx_chains_11g;
  1104. uint32_t num_tx_chains_11a;
  1105. bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
  1106. bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
  1107. };
  1108. /**
  1109. * enum station_keepalive_method - available keepalive methods for stations
  1110. * @MLME_STA_KEEPALIVE_NULL_DATA: null data packet
  1111. * @MLME_STA_KEEPALIVE_GRAT_ARP: gratuitous ARP packet
  1112. * @MLME_STA_KEEPALIVE_COUNT: number of method options available
  1113. */
  1114. enum station_keepalive_method {
  1115. MLME_STA_KEEPALIVE_NULL_DATA,
  1116. MLME_STA_KEEPALIVE_GRAT_ARP,
  1117. /* keep at the end */
  1118. MLME_STA_KEEPALIVE_COUNT
  1119. };
  1120. /**
  1121. * struct wlan_mlme_sta_cfg - MLME STA configuration items
  1122. * @sta_keep_alive_period: Sends NULL frame to AP period
  1123. * @tgt_gtx_usr_cfg: Target gtx user config
  1124. * @pmkid_modes: Enable PMKID modes
  1125. * @wait_cnf_timeout: Wait assoc cnf timeout
  1126. * @sta_miracast_mcc_rest_time: STA+MIRACAST(P2P) MCC rest time
  1127. * @dot11p_mode: Set 802.11p mode
  1128. * @fils_max_chan_guard_time: Set maximum channel guard time
  1129. * @current_rssi: Current rssi
  1130. * @ignore_peer_erp_info: Ignore peer infrormation
  1131. * @sta_prefer_80mhz_over_160mhz: Set Sta preference to connect in 80HZ/160HZ
  1132. * @enable_5g_ebt: Set default 5G early beacon termination
  1133. * @deauth_before_connection: Send deauth before connection or not
  1134. * @enable_go_cts2self_for_sta: Stop NOA and start using cts2self
  1135. * @qcn_ie_support: QCN IE support
  1136. * @force_rsne_override: Force rsnie override from user
  1137. * @single_tid: Set replay counter for all TID
  1138. * @allow_tpc_from_ap: Support for AP power constraint
  1139. */
  1140. struct wlan_mlme_sta_cfg {
  1141. uint32_t sta_keep_alive_period;
  1142. uint32_t tgt_gtx_usr_cfg;
  1143. uint32_t pmkid_modes;
  1144. uint32_t wait_cnf_timeout;
  1145. uint32_t sta_miracast_mcc_rest_time;
  1146. enum dot11p_mode dot11p_mode;
  1147. uint8_t fils_max_chan_guard_time;
  1148. uint8_t current_rssi;
  1149. bool ignore_peer_erp_info;
  1150. bool sta_prefer_80mhz_over_160mhz;
  1151. bool enable_5g_ebt;
  1152. bool deauth_before_connection;
  1153. bool enable_go_cts2self_for_sta;
  1154. bool qcn_ie_support;
  1155. bool force_rsne_override;
  1156. bool single_tid;
  1157. bool allow_tpc_from_ap;
  1158. enum station_keepalive_method sta_keepalive_method;
  1159. };
  1160. /**
  1161. * struct wlan_mlme_stats_cfg - MLME stats configuration items
  1162. * @stats_periodic_display_time: time after which stats will be printed
  1163. * @stats_link_speed_rssi_high: rssi link speed, high
  1164. * @stats_link_speed_rssi_med: medium rssi link speed
  1165. * @stats_link_speed_rssi_low: rssi link speed, low
  1166. * @stats_report_max_link_speed_rssi: report speed limit
  1167. */
  1168. struct wlan_mlme_stats_cfg {
  1169. uint32_t stats_periodic_display_time;
  1170. int stats_link_speed_rssi_high;
  1171. int stats_link_speed_rssi_med;
  1172. int stats_link_speed_rssi_low;
  1173. uint32_t stats_report_max_link_speed_rssi;
  1174. };
  1175. /**
  1176. * enum roaming_dfs_channel_type - Allow dfs channel in roam
  1177. * @CFG_ROAMING_DFS_CHANNEL_DISABLED: Disallow dfs channel in roam
  1178. * @CFG_ROAMING_DFS_CHANNEL_ENABLED_NORMAL: Allow dfs channel
  1179. * @CFG_ROAMING_DFS_CHANNEL_ENABLED_ACTIVE: Allow dfs channel with active scan
  1180. */
  1181. enum roaming_dfs_channel_type {
  1182. ROAMING_DFS_CHANNEL_DISABLED,
  1183. ROAMING_DFS_CHANNEL_ENABLED_NORMAL,
  1184. ROAMING_DFS_CHANNEL_ENABLED_ACTIVE,
  1185. };
  1186. /*
  1187. * struct bss_load_trigger - parameters related to bss load triggered roam
  1188. * @enabled: flag to check if this trigger is enabled/disabled
  1189. * @threshold: Bss load threshold value above which roaming should start
  1190. * @sample_time: Time duration in milliseconds for which the bss load value
  1191. * should be monitored
  1192. * @rssi_threshold_5ghz: RSSI threshold of the current connected AP below which
  1193. * roam should be triggered if bss load threshold exceeds the configured value.
  1194. * This value is applicable only when we are connected in 5GHz band.
  1195. * @rssi_threshold_24ghz: RSSI threshold of the current connected AP below which
  1196. * roam should be triggered if bss load threshold exceeds the configured value.
  1197. * This value is applicable only when we are connected in 2.4 GHz band.
  1198. */
  1199. struct bss_load_trigger {
  1200. bool enabled;
  1201. uint32_t threshold;
  1202. uint32_t sample_time;
  1203. int32_t rssi_threshold_5ghz;
  1204. int32_t rssi_threshold_24ghz;
  1205. };
  1206. /*
  1207. * AKM suites supported by firmware for
  1208. * roaming
  1209. */
  1210. #define AKM_FT_SAE 0
  1211. #define AKM_FT_SUITEB_SHA384 1
  1212. #define AKM_FT_FILS 2
  1213. /*
  1214. * @mawc_roam_enabled: Enable/Disable MAWC during roaming
  1215. * @enable_fast_roam_in_concurrency:Enable LFR roaming on STA during concurrency
  1216. * @lfr3_roaming_offload: Enable/disable roam offload feature
  1217. * @enable_disconnect_roam_offload: enable disassoc/deauth roam scan.
  1218. * @enable_idle_roam: flag to enable/disable idle roam in fw
  1219. * @idle_roam_rssi_delta: rssi delta of connected ap which is used to
  1220. * identify if the AP is idle or in motion
  1221. * @idle_roam_inactive_time: Timeout value in seconds, above which the
  1222. * connection is idle
  1223. * @idle_data_packet_count: data packet count measured during inactive time,
  1224. * below which the connection is idle.
  1225. * @idle_roam_min_rssi: Minimum rssi of connected AP to be considered for
  1226. * idle roam trigger.
  1227. * @early_stop_scan_enable: Set early stop scan
  1228. * @enable_5g_band_pref: Enable preference for 5G from INI
  1229. * @ese_enabled: Enable ESE feature
  1230. * @lfr_enabled: Enable fast roaming
  1231. * @mawc_enabled: Enable MAWC
  1232. * @fast_transition_enabled: Enable fast transition
  1233. * @wes_mode_enabled: Enable WES mode
  1234. * @mawc_roam_traffic_threshold: Configure traffic threshold
  1235. * @mawc_roam_ap_rssi_threshold: Best AP RSSI threshold
  1236. * @mawc_roam_rssi_high_adjust: Adjust MAWC roam high RSSI
  1237. * @mawc_roam_rssi_low_adjust: Adjust MAWC roam low RSSI
  1238. * @roam_rssi_abs_threshold: The min RSSI of the candidate AP
  1239. * @rssi_threshold_offset_5g: Lookup threshold offset for 5G band
  1240. * @early_stop_scan_min_threshold: Set early stop scan min
  1241. * @early_stop_scan_max_threshold: Set early stop scan max
  1242. * @first_scan_bucket_threshold: Set first scan bucket
  1243. * @roam_dense_traffic_threshold: Dense traffic threshold
  1244. * @roam_dense_rssi_thre_offset: Sets dense roam RSSI threshold diff
  1245. * @roam_dense_min_aps: Sets minimum number of AP for dense roam
  1246. * @roam_bg_scan_bad_rssi_threshold:RSSI threshold for background roam
  1247. * @roam_bg_scan_client_bitmap: Bitmap used to identify the scan clients
  1248. * @roam_bg_scan_bad_rssi_offset_2g:RSSI threshold offset for 2G to 5G roam
  1249. * @adaptive_roamscan_dwell_mode: Sets dwell time adaptive mode
  1250. * @per_roam_enable: To enabled/disable PER based roaming in FW
  1251. * @per_roam_config_high_rate_th: Rate at which PER based roam will stop
  1252. * @per_roam_config_low_rate_th: Rate at which PER based roam will start
  1253. * @per_roam_config_rate_th_percent:Percentage at which FW will issue roam scan
  1254. * @per_roam_rest_time: FW will wait once it issues a roam scan.
  1255. * @per_roam_monitor_time: Min time to be considered as valid scenario
  1256. * @per_roam_min_candidate_rssi: Min roamable AP RSSI for candidate selection
  1257. * @lfr3_disallow_duration: Disallow duration before roaming
  1258. * @lfr3_rssi_channel_penalization: RSSI penalization
  1259. * @lfr3_num_disallowed_aps: Max number of AP's to maintain in LCA list
  1260. * @rssi_boost_threshold_5g: Boost threshold above which 5 GHz is favored
  1261. * @rssi_boost_factor_5g: Factor by which 5GHz RSSI is boosted
  1262. * @max_rssi_boost_5g: Maximum boost that can be applied to 5G RSSI
  1263. * @rssi_penalize_threshold_5g: Penalize thres above which 5G isn't favored
  1264. * @rssi_penalize_factor_5g: Factor by which 5GHz RSSI is penalizeed
  1265. * @max_rssi_penalize_5g: Max penalty that can be applied to 5G RSSI
  1266. * @max_num_pre_auth: Configure max number of pre-auth
  1267. * @roam_preauth_retry_count: Configure the max number of preauth retry
  1268. * @roam_preauth_no_ack_timeout: Configure the no ack timeout period
  1269. * @roam_rssi_diff: Enable roam based on rssi
  1270. * @roam_scan_offload_enabled: Enable Roam Scan Offload
  1271. * @neighbor_scan_timer_period: Neighbor scan timer period
  1272. * @neighbor_scan_min_timer_period: Min neighbor scan timer period
  1273. * @neighbor_lookup_rssi_threshold: Neighbor lookup rssi threshold
  1274. * @opportunistic_scan_threshold_diff: Set oppurtunistic threshold diff
  1275. * @roam_rescan_rssi_diff: Sets RSSI for Scan trigger in firmware
  1276. * @neighbor_scan_min_chan_time: Neighbor scan channel min time
  1277. * @neighbor_scan_max_chan_time: Neighbor scan channel max time
  1278. * @neighbor_scan_results_refresh_period: Neighbor scan refresh period
  1279. * @empty_scan_refresh_period: Empty scan refresh period
  1280. * @roam_bmiss_first_bcnt: First beacon miss count
  1281. * @roam_bmiss_final_bcnt: Final beacon miss count
  1282. * @roam_beacon_rssi_weight: Beacon miss weight
  1283. * @roaming_dfs_channel: Allow dfs channel in roam
  1284. * @roam_scan_hi_rssi_maxcount: 5GHz maximum scan count
  1285. * @roam_scan_hi_rssi_delta: RSSI Delta for scan trigger
  1286. * @roam_scan_hi_rssi_delay: Minimum delay between 5GHz scans
  1287. * @roam_scan_hi_rssi_ub: Upper bound after which 5GHz scan
  1288. * @roam_prefer_5ghz: Prefer roaming to 5GHz Bss
  1289. * @roam_intra_band: Prefer roaming within Band
  1290. * @enable_adaptive_11r Flag to check if adaptive 11r ini is enabled
  1291. * @tgt_adaptive_11r_cap: Flag to check if target supports adaptive
  1292. * 11r
  1293. * @roam_scan_home_away_time: The home away time to firmware
  1294. * @roam_scan_n_probes: The number of probes to be sent for firmware roaming
  1295. * @delay_before_vdev_stop:Wait time for tx complete before vdev stop
  1296. * @neighbor_scan_channel_list: Neighbor scan channel list
  1297. * @neighbor_scan_channel_list_num: Neighbor scan channel list number
  1298. * @enable_lfr_subnet_detection: Enable LFR3 subnet detection
  1299. * @ho_delay_for_rx: Delay hand-off by this duration to receive
  1300. * @min_delay_btw_roam_scans: Min duration
  1301. * @roam_trigger_reason_bitmask: Contains roam_trigger_reasons
  1302. * @enable_ftopen: Enable/disable FT open feature
  1303. * @roam_force_rssi_trigger: Force RSSI trigger or not
  1304. * @roaming_scan_policy: Config roaming scan policy in fw
  1305. * @roam_scan_inactivity_time: Device inactivity monitoring time in
  1306. * milliseconds for which the device is considered to be inactive.
  1307. * @roam_inactive_data_packet_count: Maximum allowed data packets count
  1308. * during roam_scan_inactivity_time.
  1309. * @roam_scan_period_after_inactivity: Roam scan period after device was in
  1310. * inactive state
  1311. * @fw_akm_bitmap: Supported Akm suites of firmware
  1312. */
  1313. struct wlan_mlme_lfr_cfg {
  1314. bool mawc_roam_enabled;
  1315. bool enable_fast_roam_in_concurrency;
  1316. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1317. bool lfr3_roaming_offload;
  1318. bool enable_disconnect_roam_offload;
  1319. bool enable_idle_roam;
  1320. uint32_t idle_roam_rssi_delta;
  1321. uint32_t idle_roam_inactive_time;
  1322. uint32_t idle_data_packet_count;
  1323. uint32_t idle_roam_band;
  1324. int32_t idle_roam_min_rssi;
  1325. #endif
  1326. bool early_stop_scan_enable;
  1327. bool enable_5g_band_pref;
  1328. #ifdef FEATURE_WLAN_ESE
  1329. bool ese_enabled;
  1330. #endif
  1331. bool lfr_enabled;
  1332. bool mawc_enabled;
  1333. bool fast_transition_enabled;
  1334. bool wes_mode_enabled;
  1335. uint32_t mawc_roam_traffic_threshold;
  1336. uint32_t mawc_roam_ap_rssi_threshold;
  1337. uint32_t mawc_roam_rssi_high_adjust;
  1338. uint32_t mawc_roam_rssi_low_adjust;
  1339. uint32_t roam_rssi_abs_threshold;
  1340. uint8_t rssi_threshold_offset_5g;
  1341. uint8_t early_stop_scan_min_threshold;
  1342. uint8_t early_stop_scan_max_threshold;
  1343. uint8_t first_scan_bucket_threshold;
  1344. uint32_t roam_dense_traffic_threshold;
  1345. uint32_t roam_dense_rssi_thre_offset;
  1346. uint32_t roam_dense_min_aps;
  1347. uint32_t roam_bg_scan_bad_rssi_threshold;
  1348. uint32_t roam_bg_scan_client_bitmap;
  1349. uint32_t roam_bg_scan_bad_rssi_offset_2g;
  1350. uint32_t adaptive_roamscan_dwell_mode;
  1351. uint32_t per_roam_enable;
  1352. uint32_t per_roam_config_high_rate_th;
  1353. uint32_t per_roam_config_low_rate_th;
  1354. uint32_t per_roam_config_rate_th_percent;
  1355. uint32_t per_roam_rest_time;
  1356. uint32_t per_roam_monitor_time;
  1357. uint32_t per_roam_min_candidate_rssi;
  1358. uint32_t lfr3_disallow_duration;
  1359. uint32_t lfr3_rssi_channel_penalization;
  1360. uint32_t lfr3_num_disallowed_aps;
  1361. uint32_t rssi_boost_threshold_5g;
  1362. uint32_t rssi_boost_factor_5g;
  1363. uint32_t max_rssi_boost_5g;
  1364. uint32_t rssi_penalize_threshold_5g;
  1365. uint32_t rssi_penalize_factor_5g;
  1366. uint32_t max_rssi_penalize_5g;
  1367. uint32_t max_num_pre_auth;
  1368. uint32_t roam_preauth_retry_count;
  1369. uint32_t roam_preauth_no_ack_timeout;
  1370. uint32_t roam_rssi_diff;
  1371. bool roam_scan_offload_enabled;
  1372. uint32_t neighbor_scan_timer_period;
  1373. uint32_t neighbor_scan_min_timer_period;
  1374. uint32_t neighbor_lookup_rssi_threshold;
  1375. uint32_t opportunistic_scan_threshold_diff;
  1376. uint32_t roam_rescan_rssi_diff;
  1377. uint16_t neighbor_scan_min_chan_time;
  1378. uint16_t neighbor_scan_max_chan_time;
  1379. uint32_t neighbor_scan_results_refresh_period;
  1380. uint32_t empty_scan_refresh_period;
  1381. uint8_t roam_bmiss_first_bcnt;
  1382. uint8_t roam_bmiss_final_bcnt;
  1383. uint32_t roam_beacon_rssi_weight;
  1384. enum roaming_dfs_channel_type roaming_dfs_channel;
  1385. uint32_t roam_scan_hi_rssi_maxcount;
  1386. uint32_t roam_scan_hi_rssi_delta;
  1387. uint32_t roam_scan_hi_rssi_delay;
  1388. uint32_t roam_scan_hi_rssi_ub;
  1389. bool roam_prefer_5ghz;
  1390. bool roam_intra_band;
  1391. #ifdef WLAN_ADAPTIVE_11R
  1392. bool enable_adaptive_11r;
  1393. bool tgt_adaptive_11r_cap;
  1394. #endif
  1395. uint16_t roam_scan_home_away_time;
  1396. uint32_t roam_scan_n_probes;
  1397. uint8_t delay_before_vdev_stop;
  1398. uint8_t neighbor_scan_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
  1399. uint8_t neighbor_scan_channel_list_num;
  1400. #ifdef FEATURE_LFR_SUBNET_DETECTION
  1401. bool enable_lfr_subnet_detection;
  1402. #endif
  1403. uint8_t ho_delay_for_rx;
  1404. uint8_t min_delay_btw_roam_scans;
  1405. uint32_t roam_trigger_reason_bitmask;
  1406. bool enable_ftopen;
  1407. bool roam_force_rssi_trigger;
  1408. struct bss_load_trigger bss_load_trig;
  1409. bool roaming_scan_policy;
  1410. uint32_t roam_scan_inactivity_time;
  1411. uint32_t roam_inactive_data_packet_count;
  1412. uint32_t roam_scan_period_after_inactivity;
  1413. uint32_t fw_akm_bitmap;
  1414. };
  1415. /**
  1416. * struct wlan_mlme_wmm_config - WMM configuration
  1417. * @wmm_mode: Enable WMM feature
  1418. * @b80211e_is_enabled: Enable 802.11e feature
  1419. * @uapsd_mask: what ACs to setup U-APSD for at assoc
  1420. * @bimplicit_qos_enabled: Enable implicit QOS
  1421. */
  1422. struct wlan_mlme_wmm_config {
  1423. uint8_t wmm_mode;
  1424. bool b80211e_is_enabled;
  1425. uint8_t uapsd_mask;
  1426. bool bimplicit_qos_enabled;
  1427. };
  1428. /**
  1429. * struct wlan_mlme_wmm_tspec_element - Default TSPEC parameters
  1430. * from the wmm spec
  1431. * @inactivity_interval: inactivity_interval as per wmm spec
  1432. * @burst_size_def: TS burst size
  1433. * @ts_ack_policy: TS Info ACK policy
  1434. * @ts_acm_is_off: ACM is off for AC
  1435. */
  1436. struct wlan_mlme_wmm_tspec_element {
  1437. #ifdef FEATURE_WLAN_ESE
  1438. uint32_t inactivity_intv;
  1439. #endif
  1440. bool burst_size_def;
  1441. enum mlme_ts_info_ack_policy ts_ack_policy;
  1442. bool ts_acm_is_off;
  1443. };
  1444. /**
  1445. * struct wlan_mlme_wmm_ac_vo - Default TSPEC parameters
  1446. * for AC_VO
  1447. * @dir_ac_vo: TSPEC direction for VO
  1448. * @nom_msdu_size_ac_vo: normal MSDU size for VO
  1449. * @mean_data_rate_ac_vo: mean data rate for VO
  1450. * @min_phy_rate_ac_vo: min PHY rate for VO
  1451. * @sba_ac_vo: surplus bandwidth allowance for VO
  1452. * @uapsd_vo_srv_intv: Uapsd service interval for voice
  1453. * @uapsd_vo_sus_intv: Uapsd suspension interval for voice
  1454. */
  1455. struct wlan_mlme_wmm_ac_vo {
  1456. uint8_t dir_ac_vo;
  1457. uint16_t nom_msdu_size_ac_vo;
  1458. uint32_t mean_data_rate_ac_vo;
  1459. uint32_t min_phy_rate_ac_vo;
  1460. uint16_t sba_ac_vo;
  1461. uint32_t uapsd_vo_srv_intv;
  1462. uint32_t uapsd_vo_sus_intv;
  1463. };
  1464. /**
  1465. * struct wlan_mlme_wmm_ac_vi - Default TSPEC parameters
  1466. * for AC_VI
  1467. * @dir_ac_vi: TSPEC direction for VI
  1468. * @nom_msdu_size_ac_vi: normal MSDU size for VI
  1469. * @mean_data_rate_ac_vi: mean data rate for VI
  1470. * @min_phy_rate_ac_vi: min PHY rate for VI
  1471. * @sba_ac_vi: surplus bandwidth allowance for VI
  1472. * @uapsd_vo_srv_intv: Uapsd service interval for VI
  1473. * @uapsd_vo_sus_intv: Uapsd suspension interval for VI
  1474. */
  1475. struct wlan_mlme_wmm_ac_vi {
  1476. uint8_t dir_ac_vi;
  1477. uint16_t nom_msdu_size_ac_vi;
  1478. uint32_t mean_data_rate_ac_vi;
  1479. uint32_t min_phy_rate_ac_vi;
  1480. uint16_t sba_ac_vi;
  1481. uint32_t uapsd_vi_srv_intv;
  1482. uint32_t uapsd_vi_sus_intv;
  1483. };
  1484. /**
  1485. * struct wlan_mlme_wmm_ac_be - Default TSPEC parameters
  1486. * for AC_BE
  1487. * @dir_ac_be: TSPEC direction for BE
  1488. * @nom_msdu_size_ac_be: normal MSDU size for BE
  1489. * @mean_data_rate_ac_be: mean data rate for BE
  1490. * @min_phy_rate_ac_be: min PHY rate for BE
  1491. * @sba_ac_be: surplus bandwidth allowance for BE
  1492. * @uapsd_be_srv_intv: Uapsd service interval for BE
  1493. * @uapsd_be_sus_intv: Uapsd suspension interval for BE
  1494. */
  1495. struct wlan_mlme_wmm_ac_be {
  1496. uint8_t dir_ac_be;
  1497. uint16_t nom_msdu_size_ac_be;
  1498. uint32_t mean_data_rate_ac_be;
  1499. uint32_t min_phy_rate_ac_be;
  1500. uint16_t sba_ac_be;
  1501. uint32_t uapsd_be_srv_intv;
  1502. uint32_t uapsd_be_sus_intv;
  1503. };
  1504. /**
  1505. * struct wlan_mlme_wmm_ac_bk - Default TSPEC parameters
  1506. * for AC_BK
  1507. * @dir_ac_bk: TSPEC direction for BK
  1508. * @nom_msdu_size_ac_bk: normal MSDU size for BK
  1509. * @mean_data_rate_ac_bk: mean data rate for BK
  1510. * @min_phy_rate_ac_bk: min PHY rate for BK
  1511. * @sba_ac_bk: surplus bandwidth allowance for BK
  1512. * @uapsd_bk_srv_intv: Uapsd service interval for BK
  1513. * @uapsd_bk_sus_intv: Uapsd suspension interval for BK
  1514. */
  1515. struct wlan_mlme_wmm_ac_bk {
  1516. uint8_t dir_ac_bk;
  1517. uint16_t nom_msdu_size_ac_bk;
  1518. uint32_t mean_data_rate_ac_bk;
  1519. uint32_t min_phy_rate_ac_bk;
  1520. uint16_t sba_ac_bk;
  1521. uint32_t uapsd_bk_srv_intv;
  1522. uint32_t uapsd_bk_sus_intv;
  1523. };
  1524. /**
  1525. * struct wlan_mlme_wmm_params - WMM CFG Items
  1526. * @qos_enabled: AP is enabled with 11E
  1527. * @wme_enabled: AP is enabled with WMM
  1528. * @max_sp_length: Maximum SP Length
  1529. * @wsm_enabled: AP is enabled with WSM
  1530. * @edca_profile: WMM Edca profile
  1531. * @wmm_config: WMM configuration
  1532. * @wmm_tspec_element: Default TSPEC parameters
  1533. * @ac_vo: Default TSPEC parameters for AC_VO
  1534. * @ac_vi: Default TSPEC parameters for AC_VI
  1535. * @ac_be: Default TSPEC parameters for AC_BE
  1536. * @ac_bk: Default TSPEC parameters for AC_BK
  1537. * @delayed_trigger_frm_int: delay int(in ms) of UAPSD auto trigger
  1538. */
  1539. struct wlan_mlme_wmm_params {
  1540. bool qos_enabled;
  1541. bool wme_enabled;
  1542. uint8_t max_sp_length;
  1543. bool wsm_enabled;
  1544. uint32_t edca_profile;
  1545. struct wlan_mlme_wmm_config wmm_config;
  1546. struct wlan_mlme_wmm_tspec_element wmm_tspec_element;
  1547. struct wlan_mlme_wmm_ac_vo ac_vo;
  1548. struct wlan_mlme_wmm_ac_vi ac_vi;
  1549. struct wlan_mlme_wmm_ac_be ac_be;
  1550. struct wlan_mlme_wmm_ac_bk ac_bk;
  1551. uint32_t delayed_trigger_frm_int;
  1552. };
  1553. /**
  1554. * struct wlan_mlme_weight_config - weight params to
  1555. * calculate best candidate
  1556. *
  1557. * @rssi_weightage: RSSI weightage
  1558. * @ht_caps_weightage: HT caps weightage
  1559. * @vht_caps_weightage: VHT caps weightage
  1560. * @he_caps_weightage: HE caps weightage
  1561. * @chan_width_weightage: Channel width weightage
  1562. * @chan_band_weightage: Channel band weightage
  1563. * @nss_weightage: NSS weightage
  1564. * @beamforming_cap_weightage: Beamforming caps weightage
  1565. * @pcl_weightage: PCL weightage
  1566. * @channel_congestion_weightage: channel congestion weightage
  1567. * @oce_wan_weightage: OCE WAN metrics weightage
  1568. */
  1569. struct wlan_mlme_weight_config {
  1570. uint8_t rssi_weightage;
  1571. uint8_t ht_caps_weightage;
  1572. uint8_t vht_caps_weightage;
  1573. uint8_t he_caps_weightage;
  1574. uint8_t chan_width_weightage;
  1575. uint8_t chan_band_weightage;
  1576. uint8_t nss_weightage;
  1577. uint8_t beamforming_cap_weightage;
  1578. uint8_t pcl_weightage;
  1579. uint8_t channel_congestion_weightage;
  1580. uint8_t oce_wan_weightage;
  1581. };
  1582. /**
  1583. * struct wlan_mlme_rssi_cfg_score - RSSI params to
  1584. * calculate best candidate
  1585. *
  1586. * @best_rssi_threshold: Best RSSI threshold
  1587. * @good_rssi_threshold: Good RSSI threshold
  1588. * @bad_rssi_threshold: Bad RSSI threshold
  1589. * @good_rssi_pcnt: Good RSSI Percentage
  1590. * @bad_rssi_pcnt: Bad RSSI Percentage
  1591. * @good_rssi_bucket_size: Good RSSI Bucket Size
  1592. * @bad_rssi_bucket_size: Bad RSSI Bucket Size
  1593. * @rssi_pref_5g_rssi_thresh: Preffered 5G RSSI threshold
  1594. */
  1595. struct wlan_mlme_rssi_cfg_score {
  1596. uint32_t best_rssi_threshold;
  1597. uint32_t good_rssi_threshold;
  1598. uint32_t bad_rssi_threshold;
  1599. uint32_t good_rssi_pcnt;
  1600. uint32_t bad_rssi_pcnt;
  1601. uint32_t good_rssi_bucket_size;
  1602. uint32_t bad_rssi_bucket_size;
  1603. uint32_t rssi_pref_5g_rssi_thresh;
  1604. };
  1605. /**
  1606. * struct wlan_mlme_per_slot_scoring - define % score for differents slots
  1607. * for a scoring param.
  1608. * num_slot: number of slots in which the param will be divided.
  1609. * Max 15. index 0 is used for 'not_present. Num_slot will
  1610. * equally divide 100. e.g, if num_slot = 4 slot 0 = 0-25%, slot
  1611. * 1 = 26-50% slot 2 = 51-75%, slot 3 = 76-100%
  1612. * score_pcnt3_to_0: Conatins score percentage for slot 0-3
  1613. * BITS 0-7 :- the scoring pcnt when not present
  1614. * BITS 8-15 :- SLOT_1
  1615. * BITS 16-23 :- SLOT_2
  1616. * BITS 24-31 :- SLOT_3
  1617. * score_pcnt7_to_4: Conatins score percentage for slot 4-7
  1618. * BITS 0-7 :- SLOT_4
  1619. * BITS 8-15 :- SLOT_5
  1620. * BITS 16-23 :- SLOT_6
  1621. * BITS 24-31 :- SLOT_7
  1622. * score_pcnt11_to_8: Conatins score percentage for slot 8-11
  1623. * BITS 0-7 :- SLOT_8
  1624. * BITS 8-15 :- SLOT_9
  1625. * BITS 16-23 :- SLOT_10
  1626. * BITS 24-31 :- SLOT_11
  1627. * score_pcnt15_to_12: Conatins score percentage for slot 12-15
  1628. * BITS 0-7 :- SLOT_12
  1629. * BITS 8-15 :- SLOT_13
  1630. * BITS 16-23 :- SLOT_14
  1631. * BITS 24-31 :- SLOT_15
  1632. */
  1633. struct wlan_mlme_per_slot_scoring {
  1634. uint32_t num_slot;
  1635. uint32_t score_pcnt3_to_0;
  1636. uint32_t score_pcnt7_to_4;
  1637. uint32_t score_pcnt11_to_8;
  1638. uint32_t score_pcnt15_to_12;
  1639. };
  1640. /*
  1641. * struct wlan_mlme_score_config - MLME BSS Scoring related config
  1642. * @enable_scoring_for_roam: Enable/disable BSS Scoring for Roaming
  1643. * @weight_cfg: Various Weight related Scoring Configs
  1644. * @rssi_score: RSSI Scoring related thresholds/percentages config
  1645. * @esp_qbss_scoring: ESP QBSS Scoring configs
  1646. * @oce_wan_scoring: OCE WAN Scoring Configs
  1647. * @bandwidth_weight_per_index: Bandwidth weight per index for scoring logic
  1648. * @nss_weight_per_index: NSS weight per index for scoring logic
  1649. * @band_weight_per_index: Band weight per index for scoring logic
  1650. * @roam_trigger_bitmap: bitmap for various roam triggers
  1651. * @roam_score_delta: percentage delta in roam score
  1652. * @apsd_enabled: Enable automatic power save delivery
  1653. */
  1654. struct wlan_mlme_scoring_cfg {
  1655. bool enable_scoring_for_roam;
  1656. struct wlan_mlme_weight_config weight_cfg;
  1657. struct wlan_mlme_rssi_cfg_score rssi_score;
  1658. struct wlan_mlme_per_slot_scoring esp_qbss_scoring;
  1659. struct wlan_mlme_per_slot_scoring oce_wan_scoring;
  1660. uint32_t bandwidth_weight_per_index;
  1661. uint32_t nss_weight_per_index;
  1662. uint32_t band_weight_per_index;
  1663. uint32_t roam_trigger_bitmap;
  1664. uint32_t roam_score_delta;
  1665. bool apsd_enabled;
  1666. };
  1667. /* struct wlan_mlme_threshold - Threshold related config items
  1668. * @rts_threshold: set rts threshold
  1669. * @frag_threshold: set fragmentation threshold
  1670. */
  1671. struct wlan_mlme_threshold {
  1672. uint32_t rts_threshold;
  1673. uint32_t frag_threshold;
  1674. };
  1675. /* struct mlme_max_tx_power_24 - power related items
  1676. * @max_len: max length of string
  1677. * @len: actual len of string
  1678. * @data: Data in string format
  1679. */
  1680. struct mlme_max_tx_power_24 {
  1681. qdf_size_t max_len;
  1682. qdf_size_t len;
  1683. uint8_t data[CFG_MAX_TX_POWER_2_4_LEN];
  1684. };
  1685. /* struct mlme_max_tx_power_5 - power related items
  1686. * @max_len: max length of string
  1687. * @len: actual len of string
  1688. * @data: Data in string format
  1689. */
  1690. struct mlme_max_tx_power_5 {
  1691. qdf_size_t max_len;
  1692. qdf_size_t len;
  1693. uint8_t data[CFG_MAX_TX_POWER_5_LEN];
  1694. };
  1695. /* struct mlme_power_usage - power related items
  1696. * @max_len: max length of string
  1697. * @len: actual len of string
  1698. * @data: Data in string format
  1699. */
  1700. struct mlme_power_usage {
  1701. qdf_size_t max_len;
  1702. qdf_size_t len;
  1703. char data[CFG_POWER_USAGE_MAX_LEN];
  1704. };
  1705. /*
  1706. * struct wlan_mlme_power - power related config items
  1707. * @max_tx_power_24: max power Tx for 2.4 ghz
  1708. * @max_tx_power_5: max power Tx for 5 ghz
  1709. * @power_usage: power usage mode, min, max, mod
  1710. * @tx_power_2g: limit tx power in 2.4 ghz
  1711. * @tx_power_5g: limit tx power in 5 ghz
  1712. * @max_tx_power: WLAN max tx power
  1713. * @current_tx_power_level: current tx power level
  1714. * @local_power_constraint: local power constraint
  1715. */
  1716. struct wlan_mlme_power {
  1717. struct mlme_max_tx_power_24 max_tx_power_24;
  1718. struct mlme_max_tx_power_5 max_tx_power_5;
  1719. struct mlme_power_usage power_usage;
  1720. uint8_t tx_power_2g;
  1721. uint8_t tx_power_5g;
  1722. uint8_t max_tx_power;
  1723. uint8_t current_tx_power_level;
  1724. uint8_t local_power_constraint;
  1725. };
  1726. /*
  1727. * struct wlan_mlme_timeout - mlme timeout related config items
  1728. * @join_failure_timeout: join failure timeout
  1729. * @auth_failure_timeout: authenticate failure timeout
  1730. * @auth_rsp_timeout: authenticate response timeout
  1731. * @assoc_failure_timeout: assoc failure timeout
  1732. * @reassoc_failure_timeout: re-assoc failure timeout
  1733. * @probe_after_hb_fail_timeout: Probe after HB fail timeout
  1734. * @olbc_detect_timeout: OLBC detect timeout
  1735. * @addts_rsp_timeout: ADDTS rsp timeout value
  1736. * @heart_beat_threshold: Heart beat threshold
  1737. * @ap_keep_alive_timeout: AP keep alive timeout value
  1738. * @ap_link_monitor_timeout: AP link monitor timeout value
  1739. * @ps_data_inactivity_timeout: PS data inactivity timeout
  1740. * @wmi_wq_watchdog_timeout: timeout period for wmi watchdog bite
  1741. */
  1742. struct wlan_mlme_timeout {
  1743. uint32_t join_failure_timeout;
  1744. uint32_t auth_failure_timeout;
  1745. uint32_t auth_rsp_timeout;
  1746. uint32_t assoc_failure_timeout;
  1747. uint32_t reassoc_failure_timeout;
  1748. uint32_t probe_after_hb_fail_timeout;
  1749. uint32_t olbc_detect_timeout;
  1750. uint32_t addts_rsp_timeout;
  1751. uint32_t heart_beat_threshold;
  1752. uint32_t ap_keep_alive_timeout;
  1753. uint32_t ap_link_monitor_timeout;
  1754. uint32_t ps_data_inactivity_timeout;
  1755. uint32_t wmi_wq_watchdog_timeout;
  1756. };
  1757. /**
  1758. * struct wlan_mlme_oce - OCE related config items
  1759. * @enable_bcast_probe_rsp: enable broadcast probe response
  1760. * @oce_sta_enabled: enable/disable oce feature for sta
  1761. * @oce_sap_enabled: enable/disable oce feature for sap
  1762. * @fils_enabled: enable/disable fils support
  1763. * @feature_bitmap: oce feature bitmap
  1764. *
  1765. */
  1766. struct wlan_mlme_oce {
  1767. bool enable_bcast_probe_rsp;
  1768. bool oce_sta_enabled;
  1769. bool oce_sap_enabled;
  1770. bool fils_enabled;
  1771. uint8_t feature_bitmap;
  1772. };
  1773. /**
  1774. * enum wep_key_id - values passed to get/set wep default keys
  1775. * @MLME_WEP_DEFAULT_KEY_1: wep default key 1
  1776. * @MLME_WEP_DEFAULT_KEY_2: wep default key 2
  1777. * @MLME_WEP_DEFAULT_KEY_3: wep default key 3
  1778. * @MLME_WEP_DEFAULT_KEY_4: wep default key 4
  1779. */
  1780. enum wep_key_id {
  1781. MLME_WEP_DEFAULT_KEY_1 = 0,
  1782. MLME_WEP_DEFAULT_KEY_2,
  1783. MLME_WEP_DEFAULT_KEY_3,
  1784. MLME_WEP_DEFAULT_KEY_4
  1785. };
  1786. /**
  1787. * struct wlan_mlme_wep_cfg - WEP related configs
  1788. * @is_privacy_enabled: Flag to check if encryption is enabled
  1789. * @is_shared_key_auth: Flag to check if the auth type is shared key
  1790. * @is_auth_open_system: Flag to check if the auth type is open
  1791. * @auth_type: Authentication type value
  1792. * @wep_default_key_id: Default WEP key id
  1793. * @wep_default_key_1: WEP encryption key 1
  1794. * @wep_default_key_2: WEP encryption key 2
  1795. * @wep_default_key_3: WEP encryption key 3
  1796. * @wep_default_key_4: WEP encryption key 4
  1797. */
  1798. struct wlan_mlme_wep_cfg {
  1799. bool is_privacy_enabled;
  1800. bool is_shared_key_auth;
  1801. bool is_auth_open_system;
  1802. uint8_t auth_type;
  1803. uint8_t wep_default_key_id;
  1804. struct mlme_cfg_str wep_default_key_1;
  1805. struct mlme_cfg_str wep_default_key_2;
  1806. struct mlme_cfg_str wep_default_key_3;
  1807. struct mlme_cfg_str wep_default_key_4;
  1808. };
  1809. /**
  1810. * struct wlan_mlme_wifi_pos_cfg - WIFI POS configs
  1811. * @fine_time_meas_cap: fine timing measurement capability information
  1812. */
  1813. struct wlan_mlme_wifi_pos_cfg {
  1814. uint32_t fine_time_meas_cap;
  1815. };
  1816. #define MLME_SET_BIT(value, bit_offset) ((value) |= (1 << (bit_offset)))
  1817. #define BTM_OFFLOAD_CONFIG_BIT_8 8
  1818. #define BTM_OFFLOAD_CONFIG_BIT_7 7
  1819. /*
  1820. * struct wlan_mlme_btm - BTM related configs
  1821. * @prefer_btm_query: flag to prefer btm query over 11k
  1822. * @abridge_flag: set this flag to enable firmware to sort candidates based on
  1823. * roam score rather than selecting preferred APs.
  1824. * @btm_offload_config: configure btm offload
  1825. * @btm_solicited_timeout: configure timeout value for waiting BTM request
  1826. * @btm_max_attempt_cnt: configure maximum attempt for sending BTM query to ESS
  1827. * @btm_sticky_time: configure Stick time after roaming to new AP by BTM
  1828. * @rct_validity_timer: Timeout values for roam cache table entries
  1829. * @disassoc_timer_threshold: Disassociation timeout till which roam scan need
  1830. * not be triggered
  1831. * @btm_query_bitmask: Bitmask to send BTM query with candidate list on
  1832. * various roam
  1833. * @btm_trig_min_candidate_score: Minimum score to consider the AP as candidate
  1834. * when the roam trigger is BTM.
  1835. */
  1836. struct wlan_mlme_btm {
  1837. bool prefer_btm_query;
  1838. bool abridge_flag;
  1839. uint32_t btm_offload_config;
  1840. uint32_t btm_solicited_timeout;
  1841. uint32_t btm_max_attempt_cnt;
  1842. uint32_t btm_sticky_time;
  1843. uint32_t rct_validity_timer;
  1844. uint32_t disassoc_timer_threshold;
  1845. uint32_t btm_query_bitmask;
  1846. uint32_t btm_trig_min_candidate_score;
  1847. };
  1848. /**
  1849. * struct wlan_mlme_fe_wlm - WLM related configs
  1850. * @latency_enable: Flag to check if latency is enabled
  1851. * @latency_level: WLM latency level
  1852. * @latency_flags: WLM latency flags setting
  1853. */
  1854. struct wlan_mlme_fe_wlm {
  1855. bool latency_enable;
  1856. uint8_t latency_level;
  1857. uint32_t latency_flags[MLME_NUM_WLM_LATENCY_LEVEL];
  1858. };
  1859. /**
  1860. * struct wlan_mlme_fe_rrm - RRM related configs
  1861. * @rrm_enabled: Flag to check if RRM is enabled
  1862. * @rrm_rand_interval: RRM randomization interval
  1863. * @rm_capability: RM enabled capabilities IE
  1864. */
  1865. struct wlan_mlme_fe_rrm {
  1866. bool rrm_enabled;
  1867. uint8_t rrm_rand_interval;
  1868. uint8_t rm_capability[MLME_RMENABLEDCAP_MAX_LEN];
  1869. };
  1870. #ifdef MWS_COEX
  1871. /*
  1872. * struct wlan_mlme_mwc - MWC related configs
  1873. * @mws_coex_4g_quick_tdm: bitmap to set mws-coex 5g-nr power limit
  1874. * @mws_coex_5g_nr_pwr_limit: bitmap to set mws-coex 5g-nr power limit
  1875. **/
  1876. struct wlan_mlme_mwc {
  1877. uint32_t mws_coex_4g_quick_tdm;
  1878. uint32_t mws_coex_5g_nr_pwr_limit;
  1879. };
  1880. #else
  1881. struct wlan_mlme_mwc {
  1882. };
  1883. #endif
  1884. /**
  1885. * struct wlan_mlme_reg - REG related configs
  1886. * @self_gen_frm_pwr: self-generated frame power in tx chain mask
  1887. * for CCK rates
  1888. * @etsi13_srd_chan_in_master_mode: etsi13 srd chan in master mode
  1889. * @restart_beaconing_on_ch_avoid: restart beaconing on ch avoid
  1890. * @indoor_channel_support: indoor channel support
  1891. * @scan_11d_interval: scan 11d interval
  1892. * @valid_channel_list: array for valid channel list
  1893. * @valid_channel_list_num: valid channel list number
  1894. * @country_code: country code
  1895. * @country_code_len: country code length
  1896. * @enable_11d_in_world_mode: Whether to enable 11d scan in world mode or not
  1897. */
  1898. struct wlan_mlme_reg {
  1899. uint32_t self_gen_frm_pwr;
  1900. bool etsi13_srd_chan_in_master_mode;
  1901. enum restart_beaconing_on_ch_avoid_rule
  1902. restart_beaconing_on_ch_avoid;
  1903. bool indoor_channel_support;
  1904. uint32_t scan_11d_interval;
  1905. uint8_t valid_channel_list[CFG_VALID_CHANNEL_LIST_LEN];
  1906. uint8_t valid_channel_list_num;
  1907. uint8_t country_code[CFG_COUNTRY_CODE_LEN + 1];
  1908. uint8_t country_code_len;
  1909. bool enable_11d_in_world_mode;
  1910. };
  1911. /**
  1912. * struct wlan_mlme_ibss_cfg - IBSS config params
  1913. * @auto_bssid: Enable Auto BSSID for IBSS
  1914. * @atim_win_size: Set IBSS ATIM window size
  1915. * @adhoc_ch_5g: Default 5Ghz IBSS channel if not provided by supplicant
  1916. * @adhoc_ch_2g: Default 2.4Ghz IBSS channel if not provided by supplicant
  1917. * @coalesing_enable: IBSS coalesing control param
  1918. * @power_save_allow: IBSS Power Save control
  1919. * @power_collapse_allow: IBSS Power collapse control
  1920. * @awake_on_tx_rx: IBSS sta power save mode on TX/RX activity
  1921. * @inactivity_bcon_count: No of Beacons of data inactivity for power save
  1922. * @txsp_end_timeout: TX service period inactivity timeout
  1923. * @ps_warm_up_time: IBSS Power save skip time
  1924. * @ps_1rx_chain_atim_win: Control IBSS Power save in 1RX chain during ATIM
  1925. * @bssid: BSSID Mac address: IBSS BSSID if not provided by supplicant
  1926. */
  1927. struct wlan_mlme_ibss_cfg {
  1928. bool auto_bssid;
  1929. uint32_t atim_win_size;
  1930. uint32_t adhoc_ch_5g;
  1931. uint32_t adhoc_ch_2g;
  1932. bool coalesing_enable;
  1933. bool power_save_allow;
  1934. bool power_collapse_allow;
  1935. bool awake_on_tx_rx;
  1936. uint32_t inactivity_bcon_count;
  1937. uint32_t txsp_end_timeout;
  1938. uint32_t ps_warm_up_time;
  1939. uint32_t ps_1rx_chain_atim_win;
  1940. struct qdf_mac_addr bssid;
  1941. };
  1942. /**
  1943. * struct wlan_mlme_cfg - MLME config items
  1944. * @chainmask_cfg: VHT chainmask related cfg items
  1945. * @edca_params: edca related CFG items
  1946. * @gen: Generic CFG items
  1947. * @ht_caps: HT related CFG Items
  1948. * @he_caps: HE related cfg items
  1949. * @lfr: LFR related CFG Items
  1950. * @ibss: IBSS related CFG items
  1951. * @obss_ht40:obss ht40 CFG Items
  1952. * @mbo_cfg: Multiband Operation related CFG items
  1953. * @vht_caps: VHT related CFG Items
  1954. * @qos_mlme_params: QOS CFG Items
  1955. * @rates: Rates related cfg items
  1956. * @product_details: product details related CFG Items
  1957. * @dfs_cfg: DFS related CFG Items
  1958. * @sap_protection_cfg: SAP erp protection related CFG items
  1959. * @sap_cfg: sap CFG items
  1960. * @nss_chains_ini_cfg: Per vdev nss, chains related CFG items
  1961. * @sta: sta CFG Items
  1962. * @stats: stats CFG Items
  1963. * @scoring: BSS Scoring related CFG Items
  1964. * @oce: OCE related CFG items
  1965. * @threshold: threshold related cfg items
  1966. * @timeouts: mlme timeout related CFG items
  1967. * @twt_cfg: TWT CFG Items
  1968. * @wlan_mlme_power: power related items
  1969. * @acs: ACS related CFG items
  1970. * @feature_flags: Feature flag config items
  1971. * @ps_params: Powersave related ini configs
  1972. * @wep_params: WEP related config items
  1973. * @wifi_pos_cfg: WIFI POS config
  1974. * @wmm_params: WMM related CFG & INI Items
  1975. * @wps_params: WPS related CFG itmes
  1976. * @btm: BTM related CFG itmes
  1977. * @wlm_config: WLM related CFG items
  1978. * @rrm_config: RRM related CFG items
  1979. * @mwc: MWC related CFG items
  1980. * @dot11_mode: dot11 mode supported
  1981. * @reg: REG related CFG itmes
  1982. * @trig_score_delta: Roam score delta value for various roam triggers
  1983. * @trig_min_rssi: Expected minimum RSSI value of candidate AP for
  1984. * various roam triggers
  1985. */
  1986. struct wlan_mlme_cfg {
  1987. struct wlan_mlme_chainmask chainmask_cfg;
  1988. struct wlan_mlme_edca_params edca_params;
  1989. struct wlan_mlme_generic gen;
  1990. struct wlan_mlme_ht_caps ht_caps;
  1991. #ifdef WLAN_FEATURE_11AX
  1992. struct wlan_mlme_he_caps he_caps;
  1993. #endif
  1994. struct wlan_mlme_lfr_cfg lfr;
  1995. struct wlan_mlme_ibss_cfg ibss;
  1996. struct wlan_mlme_obss_ht40 obss_ht40;
  1997. struct wlan_mlme_mbo mbo_cfg;
  1998. struct wlan_mlme_vht_caps vht_caps;
  1999. struct wlan_mlme_qos qos_mlme_params;
  2000. struct wlan_mlme_rates rates;
  2001. struct wlan_mlme_product_details_cfg product_details;
  2002. struct wlan_mlme_dfs_cfg dfs_cfg;
  2003. struct wlan_mlme_sap_protection sap_protection_cfg;
  2004. struct wlan_mlme_cfg_sap sap_cfg;
  2005. struct wlan_mlme_nss_chains nss_chains_ini_cfg;
  2006. struct wlan_mlme_sta_cfg sta;
  2007. struct wlan_mlme_stats_cfg stats;
  2008. struct wlan_mlme_scoring_cfg scoring;
  2009. struct wlan_mlme_oce oce;
  2010. struct wlan_mlme_threshold threshold;
  2011. struct wlan_mlme_timeout timeouts;
  2012. struct wlan_mlme_cfg_twt twt_cfg;
  2013. struct wlan_mlme_power power;
  2014. struct wlan_mlme_acs acs;
  2015. struct wlan_mlme_feature_flag feature_flags;
  2016. struct wlan_mlme_powersave ps_params;
  2017. struct wlan_mlme_wep_cfg wep_params;
  2018. struct wlan_mlme_wifi_pos_cfg wifi_pos_cfg;
  2019. struct wlan_mlme_wmm_params wmm_params;
  2020. struct wlan_mlme_wps_params wps_params;
  2021. struct wlan_mlme_btm btm;
  2022. struct wlan_mlme_fe_wlm wlm_config;
  2023. struct wlan_mlme_fe_rrm rrm_config;
  2024. struct wlan_mlme_mwc mwc;
  2025. struct wlan_mlme_dot11_mode dot11_mode;
  2026. struct wlan_mlme_reg reg;
  2027. struct roam_trigger_score_delta trig_score_delta[NUM_OF_ROAM_TRIGGERS];
  2028. struct roam_trigger_min_rssi trig_min_rssi[NUM_OF_ROAM_TRIGGERS];
  2029. };
  2030. #endif