wlan_mlme_public_struct.h 77 KB

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