wlan_mlme_public_struct.h 78 KB

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