wlan_mlme_public_struct.h 68 KB

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