wlan_mlme_public_struct.h 76 KB

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