wlan_mlme_public_struct.h 68 KB

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