wlan_mlme_public_struct.h 74 KB

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