wlan_mlme_public_struct.h 76 KB

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