wmi_unified_param.h 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450
  1. /*
  2. * Copyright (c) 2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  5. *
  6. *
  7. * Permission to use, copy, modify, and/or distribute this software for
  8. * any purpose with or without fee is hereby granted, provided that the
  9. * above copyright notice and this permission notice appear in all
  10. * copies.
  11. *
  12. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  13. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  14. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  15. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  16. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  17. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  18. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  19. * PERFORMANCE OF THIS SOFTWARE.
  20. */
  21. /*
  22. * This file was originally distributed by Qualcomm Atheros, Inc.
  23. * under proprietary terms before Copyright ownership was assigned
  24. * to the Linux Foundation.
  25. */
  26. /*
  27. * This file contains the API definitions for the Unified Wireless Module
  28. * Interface (WMI).
  29. */
  30. #ifndef _WMI_UNIFIED_PARAM_H_
  31. #define _WMI_UNIFIED_PARAM_H_
  32. #include "wmi_unified.h"
  33. #define IEEE80211_ADDR_LEN 6 /* size of 802.11 address */
  34. #define WMI_MAC_MAX_SSID_LENGTH 32
  35. #define WMI_SCAN_MAX_NUM_SSID 0x0A
  36. #define mgmt_tx_dl_frm_len 64
  37. #define WMI_SMPS_MASK_LOWER_16BITS 0xFF
  38. #define WMI_SMPS_MASK_UPPER_3BITS 0x7
  39. #define WMI_SMPS_PARAM_VALUE_S 29
  40. #define WMI_MAX_NUM_ARGS 8
  41. /* The size of the utc time in bytes. */
  42. #define WMI_SIZE_UTC_TIME (10)
  43. /* The size of the utc time error in bytes. */
  44. #define WMI_SIZE_UTC_TIME_ERROR (5)
  45. #define WMI_MCC_MIN_CHANNEL_QUOTA 20
  46. #define WMI_MCC_MAX_CHANNEL_QUOTA 80
  47. #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
  48. #define WMI_BEACON_TX_BUFFER_SIZE (512)
  49. #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
  50. #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  51. #define WMI_RSSI_THOLD_DEFAULT -300
  52. #define WMI_NLO_FREQ_THRESH 1000
  53. #define WMI_SEC_TO_MSEC(sec) (sec * 1000)
  54. #define WMI_MSEC_TO_USEC(msec) (msec * 1000)
  55. #define WMI_ETH_LEN 64
  56. #define WMI_QOS_NUM_TSPEC_MAX 2
  57. #define WMI_QOS_NUM_AC_MAX 4
  58. #define WMI_IPV4_ADDR_LEN 4
  59. #define WMI_KEEP_ALIVE_NULL_PKT 1
  60. #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP 2
  61. #define WMI_KRK_KEY_LEN 16
  62. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  63. #define WMI_BTK_KEY_LEN 32
  64. #define WMI_ROAM_R0KH_ID_MAX_LEN 48
  65. #define WMI_ROAM_SCAN_PSK_SIZE 32
  66. #endif
  67. #define WMI_NOISE_FLOOR_DBM_DEFAULT (-96)
  68. #ifdef WLAN_NS_OFFLOAD
  69. /* support only one IPv6 offload */
  70. #define WMI_MAC_NS_OFFLOAD_SIZE 1
  71. /* Number of target IP V6 addresses for NS offload */
  72. #define WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA 16
  73. #define WMI_MAC_IPV6_ADDR_LEN 16
  74. #define WMI_IPV6_ADDR_VALID 1
  75. #endif /* WLAN_NS_OFFLOAD */
  76. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  77. #define WMI_ROAM_MAX_CHANNELS 80
  78. #ifdef FEATURE_WLAN_EXTSCAN
  79. #define WMI_MAX_EXTSCAN_MSG_SIZE 1536
  80. #define WMI_EXTSCAN_REST_TIME 100
  81. #define WMI_EXTSCAN_MAX_SCAN_TIME 50000
  82. #define WMI_EXTSCAN_BURST_DURATION 150
  83. #endif
  84. #define WMI_SCAN_NPROBES_DEFAULT (2)
  85. #define WMI_SEC_TO_MSEC(sec) (sec * 1000) /* sec to msec */
  86. #define WMI_MSEC_TO_USEC(msec) (msec * 1000) /* msec to usec */
  87. #define WMI_NLO_FREQ_THRESH 1000 /* in MHz */
  88. #include "qdf_atomic.h"
  89. /**
  90. * struct vdev_create_params - vdev create cmd parameter
  91. * @if_id: interface id
  92. * @type: interface type
  93. * @subtype: interface subtype
  94. */
  95. struct vdev_create_params {
  96. uint8_t if_id;
  97. uint32_t type;
  98. uint32_t subtype;
  99. };
  100. /**
  101. * struct vdev_delete_params - vdev delete cmd parameter
  102. * @if_id: interface id
  103. */
  104. struct vdev_delete_params {
  105. uint8_t if_id;
  106. };
  107. /**
  108. * struct vdev_stop_params - vdev stop cmd parameter
  109. * @vdev_id: vdev id
  110. */
  111. struct vdev_stop_params {
  112. uint8_t vdev_id;
  113. };
  114. /**
  115. * struct vdev_up_params - vdev up cmd parameter
  116. * @vdev_id: vdev id
  117. * @assoc_id: association id
  118. */
  119. struct vdev_up_params {
  120. uint8_t vdev_id;
  121. uint16_t assoc_id;
  122. };
  123. /**
  124. * struct vdev_down_params - vdev down cmd parameter
  125. * @vdev_id: vdev id
  126. */
  127. struct vdev_down_params {
  128. uint8_t vdev_id;
  129. };
  130. /**
  131. * struct mac_ssid - mac ssid structure
  132. * @length:
  133. * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
  134. */
  135. struct mac_ssid {
  136. uint8_t length;
  137. uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
  138. } qdf_packed;
  139. /**
  140. * struct vdev_start_params - vdev start cmd parameter
  141. * @vdev_id: vdev id
  142. * @chan_freq: channel frequency
  143. * @chan_mode: channel mode
  144. * @band_center_freq1: center freq 1
  145. * @band_center_freq2: center freq 2
  146. * @flags: flags to set like pmf_enabled etc.
  147. * @is_dfs: flag to check if dfs enabled
  148. * @beacon_intval: beacon interval
  149. * @dtim_period: dtim period
  150. * @max_txpow: max tx power
  151. * @is_restart: flag to check if it is vdev
  152. * @ssid: ssid and ssid length info
  153. * @preferred_tx_streams: preferred tx streams
  154. * @preferred_rx_streams: preferred rx streams
  155. * @intr_update: flag to check if need to update
  156. * required wma interface params
  157. * @intr_ssid: pointer to wma interface ssid
  158. * @intr_flags: poiter to wma interface flags
  159. * @requestor_id: to update requestor id
  160. * @disable_hw_ack: to update disable hw ack flag
  161. * @info: to update channel info
  162. * @reg_info_1: to update min power, max power,
  163. * reg power and reg class id
  164. * @reg_info_2: to update antennamax
  165. */
  166. struct vdev_start_params {
  167. uint8_t vdev_id;
  168. uint32_t chan_freq;
  169. uint32_t chan_mode;
  170. uint32_t band_center_freq1;
  171. uint32_t band_center_freq2;
  172. uint32_t flags;
  173. bool is_dfs;
  174. uint32_t beacon_intval;
  175. uint32_t dtim_period;
  176. int32_t max_txpow;
  177. bool is_restart;
  178. bool is_half_rate;
  179. bool is_quarter_rate;
  180. uint32_t dis_hw_ack;
  181. uint32_t flag_dfs;
  182. uint8_t hidden_ssid;
  183. uint8_t pmf_enabled;
  184. struct mac_ssid ssid;
  185. uint32_t num_noa_descriptors;
  186. uint32_t preferred_rx_streams;
  187. uint32_t preferred_tx_streams;
  188. };
  189. /**
  190. * struct hidden_ssid_vdev_restart_params -
  191. * vdev restart cmd parameter
  192. * @session_id: session id
  193. * @ssid_len: ssid length
  194. * @ssid: ssid
  195. * @flags: flags
  196. * @requestor_id: requestor id
  197. * @disable_hw_ack: flag to disable hw ack feature
  198. * @mhz: channel frequency
  199. * @band_center_freq1: center freq 1
  200. * @band_center_freq2: center freq 2
  201. * @info: channel info
  202. * @reg_info_1: contains min power, max power,
  203. * reg power and reg class id
  204. * @reg_info_2: contains antennamax
  205. * @hidden_ssid_restart_in_progress:
  206. * flag to check if restart is in progress
  207. */
  208. struct hidden_ssid_vdev_restart_params {
  209. uint8_t session_id;
  210. uint32_t ssid_len;
  211. uint32_t ssid[8];
  212. uint32_t flags;
  213. uint32_t requestor_id;
  214. uint32_t disable_hw_ack;
  215. uint32_t mhz;
  216. uint32_t band_center_freq1;
  217. uint32_t band_center_freq2;
  218. uint32_t info;
  219. uint32_t reg_info_1;
  220. uint32_t reg_info_2;
  221. qdf_atomic_t hidden_ssid_restart_in_progress;
  222. };
  223. /**
  224. * struct vdev_set_params - vdev set cmd parameter
  225. * @if_id: vdev id
  226. * @param_id: parameter id
  227. * @param_value: parameter value
  228. */
  229. struct vdev_set_params {
  230. uint32_t if_id;
  231. uint32_t param_id;
  232. uint32_t param_value;
  233. };
  234. /**
  235. * struct peer_delete_params - peer delete cmd parameter
  236. * @vdev_id: vdev id
  237. */
  238. struct peer_delete_params {
  239. uint8_t vdev_id;
  240. };
  241. /**
  242. * struct peer_flush_params - peer flush cmd parameter
  243. * @peer_tid_bitmap: peer tid bitmap
  244. * @vdev_id: vdev id
  245. */
  246. struct peer_flush_params {
  247. uint32_t peer_tid_bitmap;
  248. uint8_t vdev_id;
  249. };
  250. /**
  251. * struct peer_set_params - peer set cmd parameter
  252. * @param_id: parameter id
  253. * @param_value: parameter value
  254. * @vdev_id: vdev id
  255. */
  256. struct peer_set_params {
  257. uint32_t param_id;
  258. uint32_t param_value;
  259. uint32_t vdev_id;
  260. };
  261. /**
  262. * struct peer_create_params - peer create cmd parameter
  263. * @peer_addr: peer mac addr
  264. * @peer_type: peer type
  265. * @vdev_id: vdev id
  266. */
  267. struct peer_create_params {
  268. const uint8_t *peer_addr;
  269. uint32_t peer_type;
  270. uint32_t vdev_id;
  271. };
  272. /**
  273. * struct peer_remove_params - peer remove cmd parameter
  274. * @bssid: bss id
  275. * @vdev_id: vdev id
  276. * @roam_synch_in_progress: flag to indicate if roaming is in progress
  277. */
  278. struct peer_remove_params {
  279. uint8_t *bssid;
  280. uint8_t vdev_id;
  281. bool roam_synch_in_progress;
  282. };
  283. /**
  284. * struct stats_request_params - stats_request cmd parameter
  285. * @stats_id: statistics id
  286. * @vdev_id: vdev id
  287. */
  288. struct stats_request_params {
  289. uint32_t stats_id;
  290. uint32_t vdev_id;
  291. };
  292. /**
  293. * struct green_ap_ps_params - green ap ps cmd parameter
  294. * @value: parameter value
  295. */
  296. struct green_ap_ps_params {
  297. uint32_t value;
  298. };
  299. /**
  300. * struct wow_cmd_params - wow cmd parameter
  301. * @enable: wow enable or disable flag
  302. * @can_suspend_link: flag to indicate if link can be suspended
  303. * @pause_iface_config: interface config
  304. */
  305. struct wow_cmd_params {
  306. bool enable;
  307. bool can_suspend_link;
  308. uint8_t pause_iface_config;
  309. };
  310. /**
  311. * struct packet_enable_params - packet enable cmd parameter
  312. * @vdev_id: vdev id
  313. * @enable: flag to indicate if parameter can be enabled or disabled
  314. */
  315. struct packet_enable_params {
  316. uint8_t vdev_id;
  317. bool enable;
  318. };
  319. /**
  320. * struct suspend_params - suspend cmd parameter
  321. * @disable_target_intr: disable target interrupt
  322. */
  323. struct suspend_params {
  324. uint8_t disable_target_intr;
  325. };
  326. /**
  327. * struct pdev_params - pdev set cmd parameter
  328. * @param_id: parameter id
  329. * @param_value: parameter value
  330. */
  331. struct pdev_params {
  332. uint32_t param_id;
  333. uint32_t param_value;
  334. };
  335. /**
  336. * struct beacon_params - beacon template cmd parameter
  337. * @vdev_id: vdev id
  338. * @tim_ie_offset: tim ie offset
  339. * @tmpl_len: beacon template length
  340. * @tmpl_len_aligned: beacon template alignment
  341. * @frm: beacon template parameter
  342. */
  343. struct beacon_params {
  344. uint8_t vdev_id;
  345. uint32_t tim_ie_offset;
  346. uint32_t tmpl_len;
  347. uint32_t tmpl_len_aligned;
  348. uint8_t *frm;
  349. };
  350. /**
  351. * struct peer_assoc_params - peer assoc cmd parameter
  352. * @peer_macaddr: peer mac address
  353. * @vdev_id: vdev id
  354. * @peer_new_assoc: peer association type
  355. * @peer_associd: peer association id
  356. * @peer_flags: peer flags
  357. * @peer_caps: peer capabalities
  358. * @peer_listen_intval: peer listen interval
  359. * @peer_ht_caps: HT capabalities
  360. * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
  361. * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
  362. * @peer_rate_caps: peer rate capabalities
  363. * @peer_nss: peer nss
  364. * @peer_phymode: peer phymode
  365. * @peer_ht_info: peer HT info
  366. * @peer_legacy_rates: peer legacy rates
  367. * @peer_ht_rates: peer ht rates
  368. * @rx_max_rate: max rx rates
  369. * @rx_mcs_set: rx mcs
  370. * @tx_max_rate: max tx rates
  371. * @tx_mcs_set: tx mcs
  372. * @vht_capable: VHT capabalities
  373. */
  374. struct peer_assoc_params {
  375. wmi_mac_addr peer_macaddr;
  376. uint32_t vdev_id;
  377. uint32_t peer_new_assoc;
  378. uint32_t peer_associd;
  379. uint32_t peer_flags;
  380. uint32_t peer_caps;
  381. uint32_t peer_listen_intval;
  382. uint32_t peer_ht_caps;
  383. uint32_t peer_max_mpdu;
  384. uint32_t peer_mpdu_density;
  385. uint32_t peer_rate_caps;
  386. uint32_t peer_nss;
  387. uint32_t peer_vht_caps;
  388. uint32_t peer_phymode;
  389. uint32_t peer_ht_info[2];
  390. wmi_rate_set peer_legacy_rates;
  391. wmi_rate_set peer_ht_rates;
  392. uint32_t rx_max_rate;
  393. uint32_t rx_mcs_set;
  394. uint32_t tx_max_rate;
  395. uint32_t tx_mcs_set;
  396. uint8_t vht_capable;
  397. };
  398. /**
  399. * struct sta_ps_params - sta ps cmd parameter
  400. * @vdev_id: vdev id
  401. * @param: sta ps paramter
  402. * @value: sta ps parameter value
  403. */
  404. struct sta_ps_params {
  405. uint32_t vdev_id;
  406. uint32_t param;
  407. uint32_t value;
  408. };
  409. /**
  410. * struct ap_ps_params - ap ps cmd parameter
  411. * @vdev_id: vdev id
  412. * @param: ap ps paramter
  413. * @value: ap ps paramter value
  414. */
  415. struct ap_ps_params {
  416. uint32_t vdev_id;
  417. uint32_t param;
  418. uint32_t value;
  419. };
  420. /**
  421. * struct scan_start_params - start scan cmd parameter
  422. * @scan_id: scan id
  423. * @scan_req_id: requeted scan id
  424. * @vdev_id: vdev id
  425. * @scan_priority: scan priority
  426. * @notify_scan_events: flag to indicate if scan to be notified
  427. * @dwell_time_active: active dwell time
  428. * @dwell_time_passive: passive dwell time
  429. * @min_rest_time: min rest time
  430. * @max_rest_time: max rest time
  431. * @repeat_probe_time: repeat probe time
  432. * @probe_spacing_time: probe spacing time
  433. * @idle_time: idle time
  434. * @max_scan_time: max scan time
  435. * @probe_delay: probe delay
  436. * @scan_ctrl_flags: scan control flag
  437. * @burst_duration: burst duration
  438. * @num_chan: no of channel
  439. * @num_bssid: no of bssid
  440. * @num_ssids: no of ssid
  441. * @ie_len: ie length
  442. * @n_probes: no of probe
  443. * @chan_list: channel list
  444. * @ie_len_with_pad: ie length with padding
  445. * @num_ssid: no of ssid
  446. * @sid: pointer to mac_ssid structure
  447. * @uie_fieldOffset: ie field offset
  448. * @mac_add_bytes: mac address bytes
  449. */
  450. struct scan_start_params {
  451. uint32_t scan_id;
  452. uint32_t scan_req_id;
  453. uint32_t vdev_id;
  454. uint32_t scan_priority;
  455. uint32_t notify_scan_events;
  456. uint32_t dwell_time_active;
  457. uint32_t dwell_time_passive;
  458. uint32_t min_rest_time;
  459. uint32_t max_rest_time;
  460. uint32_t repeat_probe_time;
  461. uint32_t probe_spacing_time;
  462. uint32_t idle_time;
  463. uint32_t max_scan_time;
  464. uint32_t probe_delay;
  465. uint32_t scan_ctrl_flags;
  466. uint32_t burst_duration;
  467. uint32_t num_chan;
  468. uint32_t num_bssid;
  469. uint32_t num_ssids;
  470. uint32_t ie_len;
  471. uint32_t n_probes;
  472. uint32_t *chan_list;
  473. uint32_t ie_len_with_pad;
  474. struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID];
  475. uint8_t *ie_base;
  476. uint16_t uie_fieldOffset;
  477. uint8_t mac_add_bytes[IEEE80211_ADDR_LEN];
  478. };
  479. /**
  480. * struct scan_stop_params - stop scan cmd parameter
  481. * @requestor: scan requestor
  482. * @scan_id: scan id
  483. * @req_type: scan request type
  484. * @vdev_id: vdev id
  485. */
  486. struct scan_stop_params {
  487. uint32_t requestor;
  488. uint32_t scan_id;
  489. uint32_t req_type;
  490. uint32_t vdev_id;
  491. };
  492. /**
  493. * struct scan_chan_list_params - scan channel list cmd parameter
  494. * @num_scan_chans: no of scan channels
  495. * @chan_info: pointer to wmi channel info
  496. */
  497. struct scan_chan_list_params {
  498. uint8_t num_scan_chans;
  499. wmi_channel *chan_info;
  500. };
  501. /**
  502. * struct fw_hang_params - fw hang command parameters
  503. * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
  504. * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
  505. */
  506. struct fw_hang_params {
  507. uint32_t type;
  508. uint32_t delay_time_ms;
  509. };
  510. /**
  511. * struct pdev_utf_params - pdev utf command parameters
  512. * @utf_payload:
  513. * @len:
  514. */
  515. struct pdev_utf_params {
  516. uint8_t *utf_payload;
  517. uint32_t len;
  518. };
  519. /**
  520. * struct crash_inject - crash inject command parameters
  521. * @type: crash inject type
  522. * @delay_time_ms: time in milliseconds for FW to delay the crash
  523. */
  524. struct crash_inject {
  525. uint32_t type;
  526. uint32_t delay_time_ms;
  527. };
  528. /**
  529. * struct dbglog_params - fw deboglog command parameters
  530. * @param: command parameter
  531. * @val: parameter value
  532. * @module_id_bitmap: fixed length module id bitmap
  533. * @bitmap_len: module id bitmap length
  534. */
  535. struct dbglog_params {
  536. uint32_t param;
  537. uint32_t val;
  538. uint32_t *module_id_bitmap;
  539. uint32_t bitmap_len;
  540. };
  541. /**
  542. * struct seg_hdr_info - header info
  543. * @len: length
  544. * @msgref: message refrence
  545. * @segmentInfo: segment info
  546. * @pad: padding
  547. */
  548. struct seg_hdr_info {
  549. uint32_t len;
  550. uint32_t msgref;
  551. uint32_t segmentInfo;
  552. uint32_t pad;
  553. };
  554. /**
  555. * struct wmi_mgmt_params - wmi mgmt cmd paramters
  556. * @tx_frame: management tx frame
  557. * @frmLen: frame length
  558. * @vdev_id: vdev id
  559. * @tx_complete_cb: tx download callback handler
  560. * @tx_ota_post_proc_cb: OTA complition handler
  561. * @chanfreq: channel frequency
  562. * @pdata: frame data
  563. * @wmi_desc: command descriptor
  564. */
  565. struct wmi_mgmt_params {
  566. void *tx_frame;
  567. uint16_t frm_len;
  568. uint8_t vdev_id;
  569. void *tx_complete_cb;
  570. void *tx_ota_post_proc_cb;
  571. uint16_t chanfreq;
  572. void *pdata;
  573. struct wmi_desc_t *wmi_desc;
  574. void *qdf_ctx;
  575. };
  576. /**
  577. * struct p2p_ps_params - P2P powersave related params
  578. * @opp_ps: opportunistic power save
  579. * @ctwindow: CT window
  580. * @count: count
  581. * @duration: duration
  582. * @interval: interval
  583. * @single_noa_duration: single shot noa duration
  584. * @ps_selection: power save selection
  585. * @session_id: session id
  586. */
  587. struct p2p_ps_params {
  588. uint8_t opp_ps;
  589. uint32_t ctwindow;
  590. uint8_t count;
  591. uint32_t duration;
  592. uint32_t interval;
  593. uint32_t single_noa_duration;
  594. uint8_t ps_selection;
  595. uint8_t session_id;
  596. };
  597. /**
  598. * struct ta_uapsd_trig_params - uapsd trigger parameter
  599. * @vdevid: vdev id
  600. * @peer_addr: peer address
  601. * @auto_triggerparam: trigger parameters
  602. * @num_ac: no of access category
  603. */
  604. struct sta_uapsd_trig_params {
  605. uint32_t vdevid;
  606. uint8_t peer_addr[IEEE80211_ADDR_LEN];
  607. uint8_t *auto_triggerparam;
  608. uint32_t num_ac;
  609. };
  610. /**
  611. * struct ocb_utc_param
  612. * @vdev_id: session id
  613. * @utc_time: number of nanoseconds from Jan 1st 1958
  614. * @time_error: the error in the UTC time. All 1's for unknown
  615. */
  616. struct ocb_utc_param {
  617. uint32_t vdev_id;
  618. uint8_t utc_time[WMI_SIZE_UTC_TIME];
  619. uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR];
  620. };
  621. /**
  622. * struct ocb_timing_advert_param
  623. * @vdev_id: session id
  624. * @chan_freq: frequency on which to advertise
  625. * @repeat_rate: the number of times it will send TA in 5 seconds
  626. * @timestamp_offset: offset of the timestamp field in the TA frame
  627. * @time_value_offset: offset of the time_value field in the TA frame
  628. * @template_length: size in bytes of the TA frame
  629. * @template_value: the TA frame
  630. */
  631. struct ocb_timing_advert_param {
  632. uint32_t vdev_id;
  633. uint32_t chan_freq;
  634. uint32_t repeat_rate;
  635. uint32_t timestamp_offset;
  636. uint32_t time_value_offset;
  637. uint32_t template_length;
  638. uint8_t *template_value;
  639. };
  640. /**
  641. * struct dcc_get_stats_param
  642. * @vdev_id: session id
  643. * @channel_count: number of dcc channels
  644. * @request_array_len: size in bytes of the request array
  645. * @request_array: the request array
  646. */
  647. struct dcc_get_stats_param {
  648. uint32_t vdev_id;
  649. uint32_t channel_count;
  650. uint32_t request_array_len;
  651. void *request_array;
  652. };
  653. /**
  654. * struct dcc_update_ndl_param
  655. * @vdev_id: session id
  656. * @channel_count: number of channels to be updated
  657. * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
  658. * @dcc_ndl_chan_list: the ndl_chan array
  659. * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
  660. * @dcc_ndl_active_state_list: the active state array
  661. */
  662. struct dcc_update_ndl_param {
  663. uint32_t vdev_id;
  664. uint32_t channel_count;
  665. uint32_t dcc_ndl_chan_list_len;
  666. void *dcc_ndl_chan_list;
  667. uint32_t dcc_ndl_active_state_list_len;
  668. void *dcc_ndl_active_state_list;
  669. };
  670. /**
  671. * struct ocb_config_sched
  672. * @chan_freq: frequency of the channel
  673. * @total_duration: duration of the schedule
  674. * @guard_interval: guard interval on the start of the schedule
  675. */
  676. struct ocb_config_sched {
  677. uint32_t chan_freq;
  678. uint32_t total_duration;
  679. uint32_t guard_interval;
  680. };
  681. /**
  682. * OCB structures
  683. */
  684. #define WMI_NUM_AC (4)
  685. #define WMI_OCB_CHANNEL_MAX (5)
  686. #define WMI_MAX_NUM_AC 4
  687. struct wmi_ocb_qos_params {
  688. uint8_t aifsn;
  689. uint8_t cwmin;
  690. uint8_t cwmax;
  691. };
  692. /**
  693. * struct ocb_config_channel
  694. * @chan_freq: frequency of the channel
  695. * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
  696. * @mac_address: MAC address assigned to this channel
  697. * @qos_params: QoS parameters
  698. * @max_pwr: maximum transmit power of the channel (dBm)
  699. * @min_pwr: minimum transmit power of the channel (dBm)
  700. * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
  701. * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
  702. */
  703. struct ocb_config_channel {
  704. uint32_t chan_freq;
  705. uint32_t bandwidth;
  706. struct qdf_mac_addr mac_address;
  707. struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC];
  708. uint32_t max_pwr;
  709. uint32_t min_pwr;
  710. uint8_t reg_pwr;
  711. uint8_t antenna_max;
  712. uint16_t flags;
  713. };
  714. /**
  715. * struct ocb_config_param
  716. * @session_id: session id
  717. * @channel_count: number of channels
  718. * @schedule_size: size of the channel schedule
  719. * @flags: reserved
  720. * @channels: array of OCB channels
  721. * @schedule: array of OCB schedule elements
  722. * @dcc_ndl_chan_list_len: size of the ndl_chan array
  723. * @dcc_ndl_chan_list: array of dcc channel info
  724. * @dcc_ndl_active_state_list_len: size of the active state array
  725. * @dcc_ndl_active_state_list: array of active states
  726. * @adapter: the OCB adapter
  727. * @dcc_stats_callback: callback for the response event
  728. */
  729. struct ocb_config_param {
  730. uint8_t session_id;
  731. uint32_t channel_count;
  732. uint32_t schedule_size;
  733. uint32_t flags;
  734. struct ocb_config_channel *channels;
  735. struct ocb_config_sched *schedule;
  736. uint32_t dcc_ndl_chan_list_len;
  737. void *dcc_ndl_chan_list;
  738. uint32_t dcc_ndl_active_state_list_len;
  739. void *dcc_ndl_active_state_list;
  740. };
  741. /**
  742. * struct t_thermal_cmd_params - thermal command parameters
  743. * @min_temp: minimum temprature
  744. * @max_temp: maximum temprature
  745. * @thermal_enable: thermal enable
  746. */
  747. struct thermal_cmd_params {
  748. uint16_t min_temp;
  749. uint16_t max_temp;
  750. uint8_t thermal_enable;
  751. };
  752. #define WMI_LRO_IPV4_SEED_ARR_SZ 5
  753. #define WMI_LRO_IPV6_SEED_ARR_SZ 11
  754. /**
  755. * struct wmi_lro_config_cmd_t - set LRO init parameters
  756. * @lro_enable: indicates whether lro is enabled
  757. * @tcp_flag: If the TCP flags from the packet do not match
  758. * the values in this field after masking with TCP flags mask
  759. * below, packet is not LRO eligible
  760. * @tcp_flag_mask: field for comparing the TCP values provided
  761. * above with the TCP flags field in the received packet
  762. * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
  763. * 5-tuple toeplitz hash for ipv4 packets
  764. * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
  765. * 5-tuple toeplitz hash for ipv6 packets
  766. */
  767. struct wmi_lro_config_cmd_t {
  768. uint32_t lro_enable;
  769. uint32_t tcp_flag:9,
  770. tcp_flag_mask:9;
  771. uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
  772. uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
  773. };
  774. /**
  775. * struct gtx_config_t - GTX config
  776. * @gtx_rt_mask: for HT and VHT rate masks
  777. * @gtx_usrcfg: host request for GTX mask
  778. * @gtx_threshold: PER Threshold (default: 10%)
  779. * @gtx_margin: PER margin (default: 2%)
  780. * @gtx_tcpstep: TCP step (default: 1)
  781. * @gtx_tpcMin: TCP min (default: 5)
  782. * @gtx_bwmask: BW mask (20/40/80/160 Mhz)
  783. */
  784. struct wmi_gtx_config {
  785. uint32_t gtx_rt_mask[2];
  786. uint32_t gtx_usrcfg;
  787. uint32_t gtx_threshold;
  788. uint32_t gtx_margin;
  789. uint32_t gtx_tpcstep;
  790. uint32_t gtx_tpcmin;
  791. uint32_t gtx_bwmask;
  792. };
  793. /**
  794. * struct wmi_probe_resp_params - send probe response parameters
  795. * @bssId: BSSID
  796. * @pProbeRespTemplate: probe response template
  797. * @probeRespTemplateLen: probe response template length
  798. * @ucProxyProbeReqValidIEBmap: valid IE bitmap
  799. */
  800. struct wmi_probe_resp_params {
  801. uint8_t bssId[IEEE80211_ADDR_LEN];
  802. uint8_t *pProbeRespTemplate;
  803. uint32_t probeRespTemplateLen;
  804. uint32_t ucProxyProbeReqValidIEBmap[8];
  805. };
  806. /**
  807. * struct sta_params - sta keep alive parameters
  808. * @vdev_id: vdev id
  809. * @method: keep alive method
  810. * @timeperiod: time to keep alive
  811. * @hostv4addr: host ipv4 address
  812. * @destv4addr: destination ipv4 address
  813. * @destmac: destination mac address
  814. */
  815. struct sta_params {
  816. uint8_t vdev_id;
  817. uint32_t method;
  818. uint32_t timeperiod;
  819. uint8_t *hostv4addr;
  820. uint8_t *destv4addr;
  821. uint8_t *destmac;
  822. };
  823. /**
  824. * struct gateway_update_req_param - gateway parameter update request
  825. * @request_id: request id
  826. * @session_id: session id
  827. * @max_retries: Max ARP/NS retry attempts
  828. * @timeout: Retry interval
  829. * @ipv4_addr_type: on ipv4 network
  830. * @ipv6_addr_type: on ipv6 network
  831. * @gw_mac_addr: gateway mac addr
  832. * @ipv4_addr: ipv4 addr
  833. * @ipv6_addr: ipv6 addr
  834. */
  835. struct gateway_update_req_param {
  836. uint32_t request_id;
  837. uint32_t session_id;
  838. uint32_t max_retries;
  839. uint32_t timeout;
  840. uint32_t ipv4_addr_type;
  841. uint32_t ipv6_addr_type;
  842. struct qdf_mac_addr gw_mac_addr;
  843. uint8_t ipv4_addr[QDF_IPV4_ADDR_SIZE];
  844. uint8_t ipv6_addr[QDF_IPV6_ADDR_SIZE];
  845. };
  846. /**
  847. * struct rssi_monitor_param - rssi monitoring
  848. * @request_id: request id
  849. * @session_id: session id
  850. * @min_rssi: minimum rssi
  851. * @max_rssi: maximum rssi
  852. * @control: flag to indicate start or stop
  853. */
  854. struct rssi_monitor_param {
  855. uint32_t request_id;
  856. uint32_t session_id;
  857. int8_t min_rssi;
  858. int8_t max_rssi;
  859. bool control;
  860. };
  861. /**
  862. * struct scan_mac_oui - oui paramters
  863. * @oui: oui parameters
  864. */
  865. struct scan_mac_oui {
  866. uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
  867. };
  868. #define WMI_PASSPOINT_REALM_LEN 256
  869. #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
  870. #define WMI_PASSPOINT_PLMN_LEN 3
  871. /**
  872. * struct wifi_passpoint_network_param - passpoint network block
  873. * @id: identifier of this network block
  874. * @realm: null terminated UTF8 encoded realm, 0 if unspecified
  875. * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
  876. * @plmn: mcc/mnc combination as per rules, 0s if unspecified
  877. */
  878. struct wifi_passpoint_network_param {
  879. uint32_t id;
  880. uint8_t realm[WMI_PASSPOINT_REALM_LEN];
  881. int64_t roaming_consortium_ids[WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
  882. uint8_t plmn[WMI_PASSPOINT_PLMN_LEN];
  883. };
  884. /**
  885. * struct wifi_passpoint_req_param - passpoint request
  886. * @request_id: request identifier
  887. * @num_networks: number of networks
  888. * @networks: passpoint networks
  889. */
  890. struct wifi_passpoint_req_param {
  891. uint32_t request_id;
  892. uint32_t session_id;
  893. uint32_t num_networks;
  894. struct wifi_passpoint_network_param networks[];
  895. };
  896. /* struct mobility_domain_info - structure containing
  897. * mobility domain info
  898. * @mdie_present: mobility domain present or not
  899. * @mobility_domain: mobility domain
  900. */
  901. struct mobility_domain_info {
  902. uint8_t mdie_present;
  903. uint16_t mobility_domain;
  904. };
  905. /* struct roam_offload_scan_params - structure
  906. * containing roaming offload scan parameters
  907. * @is_roam_req_valid: flag to tell whether roam req
  908. * is valid or NULL
  909. * @mode: stores flags for scan
  910. * @vdev_id: vdev id
  911. * @roam_offload_enabled: flag for offload enable
  912. * @psk_pmk: pre shared key/pairwise master key
  913. * @pmk_len: length of PMK
  914. * @prefer_5ghz: prefer select 5G candidate
  915. * @roam_rssi_cat_gap: gap for every category bucket
  916. * @select_5ghz_margin: select 5 Ghz margin
  917. * @krk: KRK
  918. * @btk: BTK
  919. * @reassoc_failure_timeout: reassoc failure timeout
  920. * @rokh_id_length: r0kh id length
  921. * @rokh_id: r0kh id
  922. * @roam_key_mgmt_offload_enabled: roam offload flag
  923. * @auth_mode: authentication mode
  924. * @is_ese_assoc: flag to determine ese assoc
  925. * @mdid: mobility domain info
  926. * @roam_offload_params: roam offload tlv params
  927. */
  928. struct roam_offload_scan_params {
  929. uint8_t is_roam_req_valid;
  930. uint32_t mode;
  931. uint32_t vdev_id;
  932. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  933. uint8_t roam_offload_enabled;
  934. uint8_t psk_pmk[WMI_ROAM_SCAN_PSK_SIZE];
  935. uint32_t pmk_len;
  936. uint8_t prefer_5ghz;
  937. uint8_t roam_rssi_cat_gap;
  938. uint8_t select_5ghz_margin;
  939. uint8_t krk[WMI_KRK_KEY_LEN];
  940. uint8_t btk[WMI_BTK_KEY_LEN];
  941. uint32_t reassoc_failure_timeout;
  942. uint32_t rokh_id_length;
  943. uint8_t rokh_id[WMI_ROAM_R0KH_ID_MAX_LEN];
  944. uint8_t roam_key_mgmt_offload_enabled;
  945. int auth_mode;
  946. #endif
  947. bool is_ese_assoc;
  948. struct mobility_domain_info mdid;
  949. wmi_roam_offload_tlv_param roam_offload_params;
  950. };
  951. /* struct roam_offload_scan_rssi_params - structure containing
  952. * parameters for roam offload scan based on RSSI
  953. * @rssi_thresh: rssi threshold
  954. * @rssi_thresh_diff: difference in rssi threshold
  955. * @hi_rssi_scan_max_count: 5G scan max count
  956. * @hi_rssi_scan_rssi_delta: 5G scan rssi change threshold value
  957. * @hi_rssi_scan_rssi_ub: 5G scan upper bound
  958. * @raise_rssi_thresh_5g: flag to determine penalty and boost thresholds
  959. * @session_id: vdev id
  960. * @penalty_threshold_5g: RSSI threshold below which 5GHz RSSI is penalized
  961. * @boost_threshold_5g: RSSI threshold above which 5GHz RSSI is favored
  962. * @raise_factor_5g: factor by which 5GHz RSSI is boosted
  963. * @drop_factor_5g: factor by which 5GHz RSSI is penalized
  964. * @max_raise_rssi_5g: maximum boost that can be applied to a 5GHz RSSI
  965. * @max_drop_rssi_5g: maximum penalty that can be applied to a 5GHz RSSI
  966. * @good_rssi_threshold: RSSI below which roam is kicked in by background
  967. * scan although rssi is still good
  968. * @roam_earlystop_thres_min: Minimum RSSI threshold value for early stop,
  969. * unit is dB above NF
  970. * @roam_earlystop_thres_max: Maximum RSSI threshold value for early stop,
  971. * unit is dB above NF
  972. */
  973. struct roam_offload_scan_rssi_params {
  974. int8_t rssi_thresh;
  975. uint8_t rssi_thresh_diff;
  976. uint32_t hi_rssi_scan_max_count;
  977. uint32_t hi_rssi_scan_rssi_delta;
  978. int32_t hi_rssi_scan_rssi_ub;
  979. int raise_rssi_thresh_5g;
  980. uint8_t session_id;
  981. uint32_t penalty_threshold_5g;
  982. uint32_t boost_threshold_5g;
  983. uint8_t raise_factor_5g;
  984. uint8_t drop_factor_5g;
  985. int max_raise_rssi_5g;
  986. int max_drop_rssi_5g;
  987. uint32_t good_rssi_threshold;
  988. uint32_t roam_earlystop_thres_min;
  989. uint32_t roam_earlystop_thres_max;
  990. };
  991. /**
  992. * struct wifi_epno_network - enhanced pno network block
  993. * @ssid: ssid
  994. * @rssi_threshold: threshold for considering this SSID as found, required
  995. * granularity for this threshold is 4dBm to 8dBm
  996. * @flags: WIFI_PNO_FLAG_XXX
  997. * @auth_bit_field: auth bit field for matching WPA IE
  998. */
  999. struct wifi_epno_network_params {
  1000. struct mac_ssid ssid;
  1001. int8_t rssi_threshold;
  1002. uint8_t flags;
  1003. uint8_t auth_bit_field;
  1004. };
  1005. /**
  1006. * struct wifi_enhanched_pno_params - enhanced pno network params
  1007. * @num_networks: number of ssids
  1008. * @networks: PNO networks
  1009. */
  1010. struct wifi_enhanched_pno_params {
  1011. uint32_t request_id;
  1012. uint32_t session_id;
  1013. uint32_t num_networks;
  1014. struct wifi_epno_network_params networks[];
  1015. };
  1016. enum {
  1017. WMI_AP_RX_DATA_OFFLOAD = 0x00,
  1018. WMI_STA_RX_DATA_OFFLOAD = 0x01,
  1019. };
  1020. /**
  1021. * enum extscan_report_events_type - extscan report events type
  1022. * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
  1023. * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
  1024. * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
  1025. * (beacons/probe responses + IEs)
  1026. * in real time to HAL, in addition to completion events.
  1027. * Note: To keep backward compatibility,
  1028. * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
  1029. * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
  1030. * 0 => batching, 1 => no batching
  1031. */
  1032. enum wmi_extscan_report_events_type {
  1033. WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
  1034. WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
  1035. WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
  1036. WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
  1037. };
  1038. /**
  1039. * struct ipa_offload_control_params - ipa offload parameters
  1040. * @offload_type: ipa offload type
  1041. * @vdev_id: vdev id
  1042. * @enable: ipa offload enable/disable
  1043. */
  1044. struct ipa_offload_control_params {
  1045. uint32_t offload_type;
  1046. uint32_t vdev_id;
  1047. uint32_t enable;
  1048. };
  1049. /**
  1050. * struct extscan_capabilities_params - ext scan capablities
  1051. * @request_id: request_id
  1052. * @session_id: session_id
  1053. */
  1054. struct extscan_capabilities_params {
  1055. uint32_t request_id;
  1056. uint8_t session_id;
  1057. };
  1058. /**
  1059. * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
  1060. * @request_id: request_id
  1061. * @session_id: session_id
  1062. */
  1063. struct extscan_capabilities_reset_params {
  1064. uint32_t request_id;
  1065. uint8_t session_id;
  1066. };
  1067. /**
  1068. * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
  1069. * @request_id: request_id
  1070. * @session_id: session_id
  1071. */
  1072. struct extscan_bssid_hotlist_reset_params {
  1073. uint32_t request_id;
  1074. uint8_t session_id;
  1075. };
  1076. /**
  1077. * struct extscan_stop_req_params - ext scan stop parameter
  1078. * @request_id: request_id
  1079. * @session_id: session_id
  1080. */
  1081. struct extscan_stop_req_params {
  1082. uint32_t request_id;
  1083. uint8_t session_id;
  1084. };
  1085. /**
  1086. * struct ap_threshold_params - ap threshold parameter
  1087. * @bssid: mac address
  1088. * @low: low threshold
  1089. * @high: high threshold
  1090. */
  1091. struct ap_threshold_params {
  1092. struct qdf_mac_addr bssid;
  1093. int32_t low;
  1094. int32_t high;
  1095. };
  1096. /**
  1097. * struct extscan_set_sig_changereq_params - ext scan channel parameter
  1098. * @request_id: mac address
  1099. * @session_id: low threshold
  1100. * @rssi_sample_size: Number of samples for averaging RSSI
  1101. * @lostap_sample_size: Number of missed samples to confirm AP loss
  1102. * @min_breaching: Number of APs breaching threshold required for firmware
  1103. * @num_ap: no of scanned ap
  1104. * @ap: ap threshold parameter
  1105. */
  1106. struct extscan_set_sig_changereq_params {
  1107. uint32_t request_id;
  1108. uint8_t session_id;
  1109. uint32_t rssi_sample_size;
  1110. uint32_t lostap_sample_size;
  1111. uint32_t min_breaching;
  1112. uint32_t num_ap;
  1113. struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
  1114. };
  1115. /**
  1116. * struct extscan_cached_result_params - ext scan cached parameter
  1117. * @request_id: mac address
  1118. * @session_id: low threshold
  1119. * @flush: cached results flush
  1120. */
  1121. struct extscan_cached_result_params {
  1122. uint32_t request_id;
  1123. uint8_t session_id;
  1124. bool flush;
  1125. };
  1126. #ifdef FEATURE_WLAN_SCAN_PNO
  1127. /* Set PNO */
  1128. #define WMI_PNO_MAX_NETW_CHANNELS 26
  1129. #define WMI_PNO_MAX_NETW_CHANNELS_EX 60
  1130. #define WMI_PNO_MAX_SUPP_NETWORKS 16
  1131. /*
  1132. * size based of dot11 declaration without extra IEs as we will not carry those
  1133. * for PNO
  1134. */
  1135. #define WMI_PNO_MAX_PB_REQ_SIZE 450
  1136. #define WMI_PNO_24G_DEFAULT_CH 1
  1137. #define WMI_PNO_5G_DEFAULT_CH 36
  1138. /**
  1139. * enum pno_mode - pno mode types
  1140. * @WMI_PNO_MODE_IMMEDIATE: immidiate mode
  1141. * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode
  1142. * @WMI_PNO_MODE_ON_RESUME: resume on mode
  1143. * @WMI_PNO_MODE_MAX: max range
  1144. */
  1145. enum pno_mode {
  1146. WMI_PNO_MODE_IMMEDIATE,
  1147. WMI_PNO_MODE_ON_SUSPEND,
  1148. WMI_PNO_MODE_ON_RESUME,
  1149. WMI_PNO_MODE_MAX
  1150. };
  1151. /**
  1152. * struct pno_nw_type - pno nw type
  1153. * @ssid: mac ssid
  1154. * @authentication: authentication type
  1155. * @encryption: encryption type
  1156. * @bcastNetwType: broadcast nw type
  1157. * @ucChannelCount: uc channel count
  1158. * @aChannels: pno channel
  1159. * @rssiThreshold: rssi threshold
  1160. */
  1161. struct pno_nw_type {
  1162. struct mac_ssid ssid;
  1163. uint32_t authentication;
  1164. uint32_t encryption;
  1165. uint32_t bcastNetwType;
  1166. uint8_t ucChannelCount;
  1167. uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX];
  1168. int32_t rssiThreshold;
  1169. };
  1170. /**
  1171. * struct pno_scan_req_params - PNO Scan request structure
  1172. * @enable: flag to enable or disable
  1173. * @modePNO: PNO Mode
  1174. * @ucNetworksCount: Number of networks
  1175. * @aNetworks: Preferred network list
  1176. * @sessionId: Session identifier
  1177. * @fast_scan_period: Fast Scan period
  1178. * @slow_scan_period: Slow scan period
  1179. * @fast_scan_max_cycles: Fast scan max cycles
  1180. * @us24GProbeTemplateLen: 2.4G probe template length
  1181. * @p24GProbeTemplate: 2.4G probe template
  1182. * @us5GProbeTemplateLen: 5G probe template length
  1183. * @p5GProbeTemplate: 5G probe template
  1184. */
  1185. struct pno_scan_req_params {
  1186. uint8_t enable;
  1187. enum pno_mode modePNO;
  1188. uint8_t ucNetworksCount;
  1189. struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS];
  1190. uint8_t sessionId;
  1191. uint32_t fast_scan_period;
  1192. uint32_t slow_scan_period;
  1193. uint8_t fast_scan_max_cycles;
  1194. uint32_t active_min_time;
  1195. uint32_t active_max_time;
  1196. uint32_t passive_min_time;
  1197. uint32_t passive_max_time;
  1198. uint16_t us24GProbeTemplateLen;
  1199. uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
  1200. uint16_t us5GProbeTemplateLen;
  1201. uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
  1202. #ifdef FEATURE_WLAN_SCAN_PNO
  1203. bool pno_channel_prediction;
  1204. uint8_t top_k_num_of_channels;
  1205. uint8_t stationary_thresh;
  1206. uint32_t channel_prediction_full_scan;
  1207. #endif
  1208. };
  1209. #endif /* FEATURE_WLAN_SCAN_PNO */
  1210. #define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
  1211. #define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
  1212. #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
  1213. #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  1214. #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
  1215. /**
  1216. * struct wifi_scan_channelspec_params - wifi scan channel parameter
  1217. * @channel: Frequency in MHz
  1218. * @dwellTimeMs: dwell time
  1219. * @flush: cached results flush
  1220. * @passive: passive scan
  1221. * @chnlClass: channel class
  1222. */
  1223. struct wifi_scan_channelspec_params {
  1224. uint32_t channel;
  1225. uint32_t dwellTimeMs;
  1226. bool passive;
  1227. uint8_t chnlClass;
  1228. };
  1229. /**
  1230. * enum wmi_wifi_band - wifi band
  1231. * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
  1232. * @WMI_WIFI_BAND_BG: 2.4 GHz
  1233. * @WMI_WIFI_BAND_A: 5 GHz without DFS
  1234. * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
  1235. * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
  1236. * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
  1237. * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
  1238. * @WMI_WIFI_BAND_MAX: max range
  1239. */
  1240. enum wmi_wifi_band {
  1241. WMI_WIFI_BAND_UNSPECIFIED,
  1242. WMI_WIFI_BAND_BG = 1,
  1243. WMI_WIFI_BAND_A = 2,
  1244. WMI_WIFI_BAND_ABG = 3,
  1245. WMI_WIFI_BAND_A_DFS_ONLY = 4,
  1246. /* 5 is reserved */
  1247. WMI_WIFI_BAND_A_WITH_DFS = 6,
  1248. WMI_WIFI_BAND_ABG_WITH_DFS = 7,
  1249. /* Keep it last */
  1250. WMI_WIFI_BAND_MAX
  1251. };
  1252. /**
  1253. * struct wifi_scan_bucket_params - wifi scan bucket spec
  1254. * @bucket: bucket identifier
  1255. * @band: wifi band
  1256. * @period: Desired period, in millisecond; if this is too
  1257. * low, the firmware should choose to generate results as fast as
  1258. * it can instead of failing the command byte
  1259. * for exponential backoff bucket this is the min_period
  1260. * @reportEvents: 0 => normal reporting (reporting rssi history
  1261. * only, when rssi history buffer is % full)
  1262. * 1 => same as 0 + report a scan completion event after scanning
  1263. * this bucket
  1264. * 2 => same as 1 + forward scan results
  1265. * (beacons/probe responses + IEs) in real time to HAL
  1266. * @max_period: if max_period is non zero or different than period,
  1267. * then this bucket is an exponential backoff bucket and
  1268. * the scan period will grow exponentially as per formula:
  1269. * actual_period(N) = period ^ (N/(step_count+1)) to a
  1270. * maximum period of max_period
  1271. * @exponent: for exponential back off bucket: multiplier:
  1272. * new_period = old_period * exponent
  1273. * @step_count: for exponential back off bucket, number of scans performed
  1274. * at a given period and until the exponent is applied
  1275. * @numChannels: channels to scan; these may include DFS channels
  1276. * Note that a given channel may appear in multiple buckets
  1277. * @min_dwell_time_active: per bucket minimum active dwell time
  1278. * @max_dwell_time_active: per bucket maximum active dwell time
  1279. * @min_dwell_time_passive: per bucket minimum passive dwell time
  1280. * @max_dwell_time_passive: per bucket maximum passive dwell time
  1281. * @channels: Channel list
  1282. */
  1283. struct wifi_scan_bucket_params {
  1284. uint8_t bucket;
  1285. enum wmi_wifi_band band;
  1286. uint32_t period;
  1287. uint32_t reportEvents;
  1288. uint32_t max_period;
  1289. uint32_t exponent;
  1290. uint32_t step_count;
  1291. uint32_t numChannels;
  1292. uint32_t min_dwell_time_active;
  1293. uint32_t max_dwell_time_active;
  1294. uint32_t min_dwell_time_passive;
  1295. uint32_t max_dwell_time_passive;
  1296. struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
  1297. };
  1298. /**
  1299. * struct wifi_scan_cmd_req_params - wifi scan command request params
  1300. * @basePeriod: base timer period
  1301. * @maxAPperScan: max ap per scan
  1302. * @report_threshold_percent: report threshold
  1303. * in %, when buffer is this much full, wake up host
  1304. * @report_threshold_num_scans: report threshold number of scans
  1305. * in number of scans, wake up host after these many scans
  1306. * @requestId: request id
  1307. * @sessionId: session id
  1308. * @numBuckets: number of buckets
  1309. * @min_dwell_time_active: per bucket minimum active dwell time
  1310. * @max_dwell_time_active: per bucket maximum active dwell time
  1311. * @min_dwell_time_passive: per bucket minimum passive dwell time
  1312. * @max_dwell_time_passive: per bucket maximum passive dwell time
  1313. * @configuration_flags: configuration flags
  1314. * @buckets: buckets array
  1315. */
  1316. struct wifi_scan_cmd_req_params {
  1317. uint32_t basePeriod;
  1318. uint32_t maxAPperScan;
  1319. uint32_t report_threshold_percent;
  1320. uint32_t report_threshold_num_scans;
  1321. uint32_t requestId;
  1322. uint8_t sessionId;
  1323. uint32_t numBuckets;
  1324. uint32_t min_dwell_time_active;
  1325. uint32_t max_dwell_time_active;
  1326. uint32_t min_dwell_time_passive;
  1327. uint32_t max_dwell_time_passive;
  1328. uint32_t configuration_flags;
  1329. struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
  1330. };
  1331. #if defined(FEATURE_WLAN_ESE) && defined(FEATURE_WLAN_ESE_UPLOAD)
  1332. #define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
  1333. /**
  1334. * struct plm_req_params - plm req parameter
  1335. * @diag_token: Dialog token
  1336. * @meas_token: measurement token
  1337. * @num_bursts: total number of bursts
  1338. * @burst_int: burst interval in seconds
  1339. * @meas_duration:in TU's,STA goes off-ch
  1340. * @burst_len: no of times the STA should cycle through PLM ch list
  1341. * @desired_tx_pwr: desired tx power
  1342. * @mac_addr: MC dest addr
  1343. * @plm_num_ch: channel numbers
  1344. * @plm_ch_list: channel list
  1345. * @session_id: session id
  1346. * @enable: enable/disable
  1347. */
  1348. struct plm_req_params {
  1349. uint16_t diag_token;
  1350. uint16_t meas_token;
  1351. uint16_t num_bursts;
  1352. uint16_t burst_int;
  1353. uint16_t meas_duration;
  1354. /* no of times the STA should cycle through PLM ch list */
  1355. uint8_t burst_len;
  1356. int8_t desired_tx_pwr;
  1357. struct qdf_mac_addr mac_addr;
  1358. /* no of channels */
  1359. uint8_t plm_num_ch;
  1360. /* channel numbers */
  1361. uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
  1362. uint8_t session_id;
  1363. bool enable;
  1364. };
  1365. #endif
  1366. #define MAX_SSID_ALLOWED_LIST 4
  1367. #define MAX_BSSID_AVOID_LIST 16
  1368. #define MAX_BSSID_FAVORED 16
  1369. /**
  1370. * struct mac_ts_info_tfc - mac ts info parameters
  1371. * @burstSizeDefn: burst size
  1372. * @reserved: reserved
  1373. * @ackPolicy: ack policy
  1374. * @psb: psb
  1375. * @aggregation: aggregation
  1376. * @accessPolicy: access policy
  1377. * @direction: direction
  1378. * @tsid: direction
  1379. * @trafficType: traffic type
  1380. */
  1381. struct mac_ts_info_tfc {
  1382. #ifndef ANI_LITTLE_BIT_ENDIAN
  1383. uint8_t burstSizeDefn:1;
  1384. uint8_t reserved:7;
  1385. #else
  1386. uint8_t reserved:7;
  1387. uint8_t burstSizeDefn:1;
  1388. #endif
  1389. #ifndef ANI_LITTLE_BIT_ENDIAN
  1390. uint16_t ackPolicy:2;
  1391. uint16_t userPrio:3;
  1392. uint16_t psb:1;
  1393. uint16_t aggregation:1;
  1394. uint16_t accessPolicy:2;
  1395. uint16_t direction:2;
  1396. uint16_t tsid:4;
  1397. uint16_t trafficType:1;
  1398. #else
  1399. uint16_t trafficType:1;
  1400. uint16_t tsid:4;
  1401. uint16_t direction:2;
  1402. uint16_t accessPolicy:2;
  1403. uint16_t aggregation:1;
  1404. uint16_t psb:1;
  1405. uint16_t userPrio:3;
  1406. uint16_t ackPolicy:2;
  1407. #endif
  1408. } qdf_packed;
  1409. /**
  1410. * struct mac_ts_info_sch - mac ts info schedule parameters
  1411. * @rsvd: reserved
  1412. * @schedule: schedule bit
  1413. */
  1414. struct mac_ts_info_sch {
  1415. #ifndef ANI_LITTLE_BIT_ENDIAN
  1416. uint8_t rsvd:7;
  1417. uint8_t schedule:1;
  1418. #else
  1419. uint8_t schedule:1;
  1420. uint8_t rsvd:7;
  1421. #endif
  1422. } qdf_packed;
  1423. /**
  1424. * struct mac_ts_info_sch - mac ts info schedule parameters
  1425. * @traffic: mac tfc parameter
  1426. * @schedule: mac schedule parameters
  1427. */
  1428. struct mac_ts_info {
  1429. struct mac_ts_info_tfc traffic;
  1430. struct mac_ts_info_sch schedule;
  1431. } qdf_packed;
  1432. /**
  1433. * struct mac_tspec_ie - mac ts spec
  1434. * @type: type
  1435. * @length: length
  1436. * @tsinfo: tsinfo
  1437. * @nomMsduSz: nomMsduSz
  1438. * @maxMsduSz: maxMsduSz
  1439. * @minSvcInterval: minSvcInterval
  1440. * @maxSvcInterval: maxSvcInterval
  1441. * @inactInterval: inactInterval
  1442. * @suspendInterval: suspendInterval
  1443. * @svcStartTime: svcStartTime
  1444. * @minDataRate: minDataRate
  1445. * @meanDataRate: meanDataRate
  1446. * @peakDataRate: peakDataRate
  1447. * @maxBurstSz: maxBurstSz
  1448. * @delayBound: delayBound
  1449. * @minPhyRate: minPhyRate
  1450. * @surplusBw: surplusBw
  1451. * @mediumTime: mediumTime
  1452. */
  1453. struct mac_tspec_ie {
  1454. uint8_t type;
  1455. uint8_t length;
  1456. struct mac_ts_info tsinfo;
  1457. uint16_t nomMsduSz;
  1458. uint16_t maxMsduSz;
  1459. uint32_t minSvcInterval;
  1460. uint32_t maxSvcInterval;
  1461. uint32_t inactInterval;
  1462. uint32_t suspendInterval;
  1463. uint32_t svcStartTime;
  1464. uint32_t minDataRate;
  1465. uint32_t meanDataRate;
  1466. uint32_t peakDataRate;
  1467. uint32_t maxBurstSz;
  1468. uint32_t delayBound;
  1469. uint32_t minPhyRate;
  1470. uint16_t surplusBw;
  1471. uint16_t mediumTime;
  1472. } qdf_packed;
  1473. /**
  1474. * struct add_ts_param - ADDTS related parameters
  1475. * @staIdx: station index
  1476. * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
  1477. * @tspec: tspec value
  1478. * @status: CDF status
  1479. * @sessionId: session id
  1480. * @tsm_interval: TSM interval period passed from UMAC to WMI
  1481. * @setRICparams: RIC parameters
  1482. * @sme_session_id: sme session id
  1483. */
  1484. struct add_ts_param {
  1485. uint16_t staIdx;
  1486. uint16_t tspecIdx;
  1487. struct mac_tspec_ie tspec;
  1488. QDF_STATUS status;
  1489. uint8_t sessionId;
  1490. #ifdef FEATURE_WLAN_ESE
  1491. uint16_t tsm_interval;
  1492. #endif /* FEATURE_WLAN_ESE */
  1493. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1494. uint8_t setRICparams;
  1495. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  1496. uint8_t sme_session_id;
  1497. };
  1498. /**
  1499. * struct delts_req_info - DELTS request parameter
  1500. * @tsinfo: ts info
  1501. * @tspec: ts spec
  1502. * @wmeTspecPresent: wme ts spec flag
  1503. * @wsmTspecPresent: wsm ts spec flag
  1504. * @lleTspecPresent: lle ts spec flag
  1505. */
  1506. struct delts_req_info {
  1507. struct mac_ts_info tsinfo;
  1508. struct mac_tspec_ie tspec;
  1509. uint8_t wmeTspecPresent:1;
  1510. uint8_t wsmTspecPresent:1;
  1511. uint8_t lleTspecPresent:1;
  1512. };
  1513. /**
  1514. * struct del_ts_params - DELTS related parameters
  1515. * @staIdx: station index
  1516. * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
  1517. * @bssId: BSSID
  1518. * @sessionId: session id
  1519. * @userPrio: user priority
  1520. * @delTsInfo: DELTS info
  1521. * @setRICparams: RIC parameters
  1522. */
  1523. struct del_ts_params {
  1524. uint16_t staIdx;
  1525. uint16_t tspecIdx;
  1526. uint8_t bssId[IEEE80211_ADDR_LEN];
  1527. uint8_t sessionId;
  1528. uint8_t userPrio;
  1529. #ifdef WLAN_FEATURE_ROAM_OFFLOAD
  1530. struct delts_req_info delTsInfo;
  1531. uint8_t setRICparams;
  1532. #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
  1533. };
  1534. /**
  1535. * struct ll_stats_clear_params - ll stats clear parameter
  1536. * @req_id: request id
  1537. * @sta_id: sta id
  1538. * @stats_clear_mask: stats clear mask
  1539. * @stop_req: stop request
  1540. */
  1541. struct ll_stats_clear_params {
  1542. uint32_t req_id;
  1543. uint8_t sta_id;
  1544. uint32_t stats_clear_mask;
  1545. uint8_t stop_req;
  1546. };
  1547. /**
  1548. * struct ll_stats_set_params - ll stats get parameter
  1549. * @req_id: request id
  1550. * @sta_id: sta id
  1551. * @mpdu_size_threshold: mpdu sixe threshold
  1552. * @aggressive_statistics_gathering: aggressive_statistics_gathering
  1553. */
  1554. struct ll_stats_set_params {
  1555. uint32_t req_id;
  1556. uint8_t sta_id;
  1557. uint32_t mpdu_size_threshold;
  1558. uint32_t aggressive_statistics_gathering;
  1559. };
  1560. /**
  1561. * struct ll_stats_get_params - ll stats parameter
  1562. * @req_id: request id
  1563. * @sta_id: sta id
  1564. * @param_id_mask: param is mask
  1565. */
  1566. struct ll_stats_get_params {
  1567. uint32_t req_id;
  1568. uint8_t sta_id;
  1569. uint32_t param_id_mask;
  1570. };
  1571. /**
  1572. * struct pe_stats_req - pe stats parameter
  1573. * @msg_type: message type is same as the request type
  1574. * @msg_len: length of the entire request
  1575. * @sta_id: Per STA stats request must contain valid
  1576. * @stats_mask: categories of stats requested
  1577. * @session_id: wsm ts spec flag
  1578. */
  1579. struct pe_stats_req {
  1580. /* Common for all types are requests */
  1581. uint16_t msg_type;
  1582. uint16_t msg_len;
  1583. uint32_t sta_id;
  1584. /* categories of stats requested. look at ePEStatsMask */
  1585. uint32_t stats_mask;
  1586. uint8_t session_id;
  1587. };
  1588. /**
  1589. * struct link_status_params - link stats parameter
  1590. * @msg_type: message type is same as the request type
  1591. * @msg_len: length of the entire request
  1592. * @link_status: wme ts spec flag
  1593. * @session_id: wsm ts spec flag
  1594. */
  1595. struct link_status_params {
  1596. uint16_t msg_type;
  1597. uint16_t msg_len;
  1598. uint8_t link_status;
  1599. uint8_t session_id;
  1600. };
  1601. /**
  1602. * struct dhcp_stop_ind_params - DHCP Stop indication message
  1603. * @msgtype: message type is same as the request type
  1604. * @msglen: length of the entire request
  1605. * @device_mode: Mode of the device(ex:STA, AP)
  1606. * @adapter_macaddr: MAC address of the adapter
  1607. * @peer_macaddr: MAC address of the connected peer
  1608. */
  1609. struct dhcp_stop_ind_params {
  1610. uint16_t msgtype;
  1611. uint16_t msglen;
  1612. uint8_t device_mode;
  1613. struct qdf_mac_addr adapter_macaddr;
  1614. struct qdf_mac_addr peer_macaddr;
  1615. };
  1616. /**
  1617. * struct aggr_add_ts_param - ADDTS parameters
  1618. * @staIdx: station index
  1619. * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
  1620. * @tspec: tspec value
  1621. * @status: CDF status
  1622. * @sessionId: session id
  1623. */
  1624. struct aggr_add_ts_param {
  1625. uint16_t staIdx;
  1626. uint16_t tspecIdx;
  1627. struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
  1628. QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
  1629. uint8_t sessionId;
  1630. };
  1631. #define WMI_MAX_FILTER_TEST_DATA_LEN 8
  1632. #define WMI_MAX_NUM_MULTICAST_ADDRESS 240
  1633. #define WMI_MAX_NUM_FILTERS 20
  1634. #define WMI_MAX_NUM_TESTS_PER_FILTER 10
  1635. /**
  1636. * enum packet_filter_type - packet filter type
  1637. * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
  1638. * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
  1639. * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
  1640. * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
  1641. */
  1642. enum packet_filter_type {
  1643. WMI_RCV_FILTER_TYPE_INVALID,
  1644. WMI_RCV_FILTER_TYPE_FILTER_PKT,
  1645. WMI_RCV_FILTER_TYPE_BUFFER_PKT,
  1646. WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
  1647. };
  1648. /**
  1649. * enum packet_protocol_type - packet protocol type
  1650. * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
  1651. * @WMI_FILTER_HDR_TYPE_MAC: mac type
  1652. * @WMI_FILTER_HDR_TYPE_ARP: trp type
  1653. * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
  1654. * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
  1655. * @WMI_FILTER_HDR_TYPE_UDP: udp type
  1656. * @WMI_FILTER_HDR_TYPE_MAX: max type
  1657. */
  1658. enum packet_protocol_type {
  1659. WMI_FILTER_HDR_TYPE_INVALID,
  1660. WMI_FILTER_HDR_TYPE_MAC,
  1661. WMI_FILTER_HDR_TYPE_ARP,
  1662. WMI_FILTER_HDR_TYPE_IPV4,
  1663. WMI_FILTER_HDR_TYPE_IPV6,
  1664. WMI_FILTER_HDR_TYPE_UDP,
  1665. WMI_FILTER_HDR_TYPE_MAX
  1666. };
  1667. /**
  1668. * enum packet_filter_comp_type - packet filter comparison type
  1669. * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
  1670. * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
  1671. * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
  1672. * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
  1673. * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
  1674. * @WMI_FILTER_CMP_TYPE_MAX: max type
  1675. */
  1676. enum packet_filter_comp_type {
  1677. WMI_FILTER_CMP_TYPE_INVALID,
  1678. WMI_FILTER_CMP_TYPE_EQUAL,
  1679. WMI_FILTER_CMP_TYPE_MASK_EQUAL,
  1680. WMI_FILTER_CMP_TYPE_NOT_EQUAL,
  1681. WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
  1682. WMI_FILTER_CMP_TYPE_MAX
  1683. };
  1684. /**
  1685. * struct rcv_pkt_filter_params - recieve packet filter parameters
  1686. * @protocolLayer - protocol layer
  1687. * @cmpFlag - comparison flag
  1688. * @dataLength - data length
  1689. * @dataOffset - data offset
  1690. * @reserved - resserved
  1691. * @compareData - compare data
  1692. * @dataMask - data mask
  1693. */
  1694. struct rcv_pkt_filter_params {
  1695. enum packet_protocol_type protocolLayer;
  1696. enum packet_filter_comp_type cmpFlag;
  1697. uint16_t dataLength;
  1698. uint8_t dataOffset;
  1699. uint8_t reserved;
  1700. uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
  1701. uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
  1702. };
  1703. /**
  1704. * struct rcv_pkt_filter_config - recieve packet filter info
  1705. * @filterId - filter id
  1706. * @filterType - filter type
  1707. * @numFieldParams - no of fields
  1708. * @coalesceTime - reserved parameter
  1709. * @self_macaddr - self mac address
  1710. * @bssid - Bssid of the connected AP
  1711. * @paramsData - data parameter
  1712. */
  1713. struct rcv_pkt_filter_config {
  1714. uint8_t filterId;
  1715. enum packet_filter_type filterType;
  1716. uint32_t numFieldParams;
  1717. uint32_t coalesceTime;
  1718. struct qdf_mac_addr self_macaddr;
  1719. struct qdf_mac_addr bssid;
  1720. struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
  1721. };
  1722. /**
  1723. * struct vdev_ie_info_param - IE info
  1724. * @vdev_id - vdev for which the IE is being sent
  1725. * @ie_id - ID of the IE
  1726. * @length - length of the IE data
  1727. * @data - IE data
  1728. *
  1729. * This structure is used to store the IE information.
  1730. */
  1731. struct vdev_ie_info_param {
  1732. uint32_t vdev_id;
  1733. uint32_t ie_id;
  1734. uint32_t length;
  1735. uint8_t *data;
  1736. };
  1737. #define WMI_MAX_NUM_FW_SEGMENTS 4
  1738. /**
  1739. * struct fw_dump_seg_req_param - individual segment details
  1740. * @seg_id - segment id.
  1741. * @seg_start_addr_lo - lower address of the segment.
  1742. * @seg_start_addr_hi - higher address of the segment.
  1743. * @seg_length - length of the segment.
  1744. * @dst_addr_lo - lower address of the destination buffer.
  1745. * @dst_addr_hi - higher address of the destination buffer.
  1746. *
  1747. * This structure carries the information to firmware about the
  1748. * individual segments. This structure is part of firmware memory
  1749. * dump request.
  1750. */
  1751. struct fw_dump_seg_req_param {
  1752. uint8_t seg_id;
  1753. uint32_t seg_start_addr_lo;
  1754. uint32_t seg_start_addr_hi;
  1755. uint32_t seg_length;
  1756. uint32_t dst_addr_lo;
  1757. uint32_t dst_addr_hi;
  1758. };
  1759. /**
  1760. * struct fw_dump_req_param - firmware memory dump request details.
  1761. * @request_id - request id.
  1762. * @num_seg - requested number of segments.
  1763. * @fw_dump_seg_req - individual segment information.
  1764. *
  1765. * This structure carries information about the firmware
  1766. * memory dump request.
  1767. */
  1768. struct fw_dump_req_param {
  1769. uint32_t request_id;
  1770. uint32_t num_seg;
  1771. struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
  1772. };
  1773. #define WMI_TDLS_MAX_SUPP_CHANNELS 128
  1774. #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
  1775. #define WMI_2_4_GHZ_MAX_FREQ 3000
  1776. /**
  1777. * struct tdls_update_ch_params - channel parameters
  1778. * @chanId: ID of the channel
  1779. * @pwr: power level
  1780. * @dfsSet: is dfs supported or not
  1781. * @half_rate: is the channel operating at 10MHz
  1782. * @quarter_rate: is the channel operating at 5MHz
  1783. */
  1784. struct tdls_update_ch_params {
  1785. uint8_t chanId;
  1786. uint8_t pwr;
  1787. bool dfsSet;
  1788. bool half_rate;
  1789. bool quarter_rate;
  1790. };
  1791. /**
  1792. * struct tdls_peer_cap_params - TDLS peer capablities parameters
  1793. * @isPeerResponder: is peer responder or not
  1794. * @peerUapsdQueue: peer uapsd queue
  1795. * @peerMaxSp: peer max SP value
  1796. * @peerBuffStaSupport: peer buffer sta supported or not
  1797. * @peerOffChanSupport: peer offchannel support
  1798. * @peerCurrOperClass: peer current operating class
  1799. * @selfCurrOperClass: self current operating class
  1800. * @peerChanLen: peer channel length
  1801. * @peerChan: peer channel list
  1802. * @peerOperClassLen: peer operating class length
  1803. * @peerOperClass: peer operating class
  1804. * @prefOffChanNum: peer offchannel number
  1805. * @prefOffChanBandwidth: peer offchannel bandwidth
  1806. * @opClassForPrefOffChan: operating class for offchannel
  1807. */
  1808. struct tdls_peer_cap_params {
  1809. uint8_t isPeerResponder;
  1810. uint8_t peerUapsdQueue;
  1811. uint8_t peerMaxSp;
  1812. uint8_t peerBuffStaSupport;
  1813. uint8_t peerOffChanSupport;
  1814. uint8_t peerCurrOperClass;
  1815. uint8_t selfCurrOperClass;
  1816. uint8_t peerChanLen;
  1817. struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
  1818. uint8_t peerOperClassLen;
  1819. uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
  1820. uint8_t prefOffChanNum;
  1821. uint8_t prefOffChanBandwidth;
  1822. uint8_t opClassForPrefOffChan;
  1823. };
  1824. /**
  1825. * struct tdls_peer_state_params - TDLS peer state parameters
  1826. * @vdevId: vdev id
  1827. * @peerMacAddr: peer mac address
  1828. * @peerCap: peer capabality
  1829. */
  1830. struct tdls_peer_state_params {
  1831. uint32_t vdevId;
  1832. uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
  1833. uint32_t peerState;
  1834. struct tdls_peer_cap_params peerCap;
  1835. };
  1836. /**
  1837. * struct wmi_tdls_params - TDLS parameters
  1838. * @vdev_id: vdev id
  1839. * @tdls_state: TDLS state
  1840. * @notification_interval_ms: notification inerval
  1841. * @tx_discovery_threshold: tx discovery threshold
  1842. * @tx_teardown_threshold: tx teardown threashold
  1843. * @rssi_teardown_threshold: RSSI teardown threshold
  1844. * @rssi_delta: RSSI delta
  1845. * @tdls_options: TDLS options
  1846. * @peer_traffic_ind_window: raffic indication window
  1847. * @peer_traffic_response_timeout: traffic response timeout
  1848. * @puapsd_mask: uapsd mask
  1849. * @puapsd_inactivity_time: uapsd inactivity time
  1850. * @puapsd_rx_frame_threshold: uapsd rx frame threshold
  1851. * @teardown_notification_ms: tdls teardown notification interval
  1852. * @tdls_peer_kickout_threshold: tdls packet threshold for
  1853. * peer kickout operation
  1854. */
  1855. struct wmi_tdls_params {
  1856. uint32_t vdev_id;
  1857. uint32_t tdls_state;
  1858. uint32_t notification_interval_ms;
  1859. uint32_t tx_discovery_threshold;
  1860. uint32_t tx_teardown_threshold;
  1861. int32_t rssi_teardown_threshold;
  1862. int32_t rssi_delta;
  1863. uint32_t tdls_options;
  1864. uint32_t peer_traffic_ind_window;
  1865. uint32_t peer_traffic_response_timeout;
  1866. uint32_t puapsd_mask;
  1867. uint32_t puapsd_inactivity_time;
  1868. uint32_t puapsd_rx_frame_threshold;
  1869. uint32_t teardown_notification_ms;
  1870. uint32_t tdls_peer_kickout_threshold;
  1871. };
  1872. /**
  1873. * struct tdls_chan_switch_params - channel switch parameter structure
  1874. * @vdev_id: vdev ID
  1875. * @peer_mac_addr: Peer mac address
  1876. * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
  1877. * @tdls_off_ch: Target Off Channel
  1878. * @oper_class: Operating class for target channel
  1879. * @is_responder: Responder or initiator
  1880. */
  1881. struct tdls_channel_switch_params {
  1882. uint32_t vdev_id;
  1883. uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
  1884. uint16_t tdls_off_ch_bw_offset;
  1885. uint8_t tdls_off_ch;
  1886. uint8_t tdls_sw_mode;
  1887. uint8_t oper_class;
  1888. uint8_t is_responder;
  1889. };
  1890. /**
  1891. * struct dhcp_offload_info_params - dhcp offload parameters
  1892. * @vdev_id: request data length
  1893. * @dhcpSrvOffloadEnabled: dhcp offload enabled
  1894. * @dhcpClientNum: dhcp client no
  1895. * @dhcpSrvIP: dhcp server ip
  1896. */
  1897. struct dhcp_offload_info_params {
  1898. uint32_t vdev_id;
  1899. uint32_t dhcpSrvOffloadEnabled;
  1900. uint32_t dhcpClientNum;
  1901. uint32_t dhcpSrvIP;
  1902. };
  1903. /**
  1904. * struct nan_req_params - NAN request params
  1905. * @request_data_len: request data length
  1906. * @request_data: request data
  1907. */
  1908. struct nan_req_params {
  1909. uint16_t request_data_len;
  1910. uint8_t request_data[];
  1911. };
  1912. /**
  1913. * struct app_type2_params - app type2parameter
  1914. * @vdev_id: vdev id
  1915. * @rc4_key: rc4 key
  1916. * @rc4_key_len: rc4 key length
  1917. * @ip_id: NC id
  1918. * @ip_device_ip: NC IP addres
  1919. * @ip_server_ip: Push server IP address
  1920. * @tcp_src_port: NC TCP port
  1921. * @tcp_dst_port: Push server TCP port
  1922. * @tcp_seq: tcp sequence
  1923. * @tcp_ack_seq: tcp ack sequence
  1924. * @keepalive_init: Initial ping interval
  1925. * @keepalive_min: Minimum ping interval
  1926. * @keepalive_max: Maximum ping interval
  1927. * @keepalive_inc: Increment of ping interval
  1928. * @gateway_mac: gateway mac address
  1929. * @tcp_tx_timeout_val: tcp tx timeout value
  1930. * @tcp_rx_timeout_val: tcp rx timeout value
  1931. */
  1932. struct app_type2_params {
  1933. uint8_t vdev_id;
  1934. uint8_t rc4_key[16];
  1935. uint32_t rc4_key_len;
  1936. /** ip header parameter */
  1937. uint32_t ip_id;
  1938. uint32_t ip_device_ip;
  1939. uint32_t ip_server_ip;
  1940. /** tcp header parameter */
  1941. uint16_t tcp_src_port;
  1942. uint16_t tcp_dst_port;
  1943. uint32_t tcp_seq;
  1944. uint32_t tcp_ack_seq;
  1945. uint32_t keepalive_init;
  1946. uint32_t keepalive_min;
  1947. uint32_t keepalive_max;
  1948. uint32_t keepalive_inc;
  1949. struct qdf_mac_addr gateway_mac;
  1950. uint32_t tcp_tx_timeout_val;
  1951. uint32_t tcp_rx_timeout_val;
  1952. };
  1953. /**
  1954. * struct app_type1_params - app type1 parameter
  1955. * @vdev_id: vdev id
  1956. * @wakee_mac_addr: mac address
  1957. * @identification_id: identification id
  1958. * @password: password
  1959. * @id_length: id length
  1960. * @pass_length: password length
  1961. */
  1962. struct app_type1_params {
  1963. uint8_t vdev_id;
  1964. struct qdf_mac_addr wakee_mac_addr;
  1965. uint8_t identification_id[8];
  1966. uint8_t password[16];
  1967. uint32_t id_length;
  1968. uint32_t pass_length;
  1969. };
  1970. /**
  1971. * enum wmi_ext_wow_type - wow type
  1972. * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
  1973. * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
  1974. * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
  1975. */
  1976. enum wmi_ext_wow_type {
  1977. WMI_EXT_WOW_TYPE_APP_TYPE1,
  1978. WMI_EXT_WOW_TYPE_APP_TYPE2,
  1979. WMI_EXT_WOW_TYPE_APP_TYPE1_2,
  1980. };
  1981. /**
  1982. * struct ext_wow_params - ext wow parameters
  1983. * @vdev_id: vdev id
  1984. * @type: wow type
  1985. * @wakeup_pin_num: wake up gpio no
  1986. */
  1987. struct ext_wow_params {
  1988. uint8_t vdev_id;
  1989. enum wmi_ext_wow_type type;
  1990. uint32_t wakeup_pin_num;
  1991. };
  1992. /**
  1993. * struct stats_ext_params - ext stats request
  1994. * @vdev_id: vdev id
  1995. * @request_data_len: request data length
  1996. * @request_data: request data
  1997. */
  1998. struct stats_ext_params {
  1999. uint32_t vdev_id;
  2000. uint32_t request_data_len;
  2001. uint8_t request_data[];
  2002. };
  2003. #define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
  2004. /**
  2005. * struct periodic_tx_pattern - periodic tx pattern
  2006. * @mac_address: MAC Address for the adapter
  2007. * @ucPtrnId: Pattern ID
  2008. * @ucPtrnSize: Pattern size
  2009. * @usPtrnIntervalMs: in ms
  2010. * @ucPattern: Pattern buffer
  2011. */
  2012. struct periodic_tx_pattern {
  2013. struct qdf_mac_addr mac_address;
  2014. uint8_t ucPtrnId;
  2015. uint16_t ucPtrnSize;
  2016. uint32_t usPtrnIntervalMs;
  2017. uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
  2018. };
  2019. #define WMI_GTK_OFFLOAD_KEK_BYTES 16
  2020. #define WMI_GTK_OFFLOAD_KCK_BYTES 16
  2021. /**
  2022. * struct gtk_offload_params - gtk offload parameters
  2023. * @ulFlags: optional flags
  2024. * @aKCK: Key confirmation key
  2025. * @aKEK: key encryption key
  2026. * @ullKeyReplayCounter: replay counter
  2027. * @bssid: bss id
  2028. */
  2029. struct gtk_offload_params {
  2030. uint32_t ulFlags;
  2031. uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES];
  2032. uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES];
  2033. uint64_t ullKeyReplayCounter;
  2034. struct qdf_mac_addr bssid;
  2035. };
  2036. /**
  2037. * struct flashing_req_params - led flashing parameter
  2038. * @reqId: request id
  2039. * @pattern_id: pattern identifier. 0: disconnected 1: connected
  2040. * @led_x0: led flashing parameter0
  2041. * @led_x1: led flashing parameter1
  2042. */
  2043. struct flashing_req_params {
  2044. uint32_t req_id;
  2045. uint32_t pattern_id;
  2046. uint32_t led_x0;
  2047. uint32_t led_x1;
  2048. };
  2049. struct wmi_host_mem_chunk {
  2050. uint32_t *vaddr;
  2051. uint32_t paddr;
  2052. qdf_dma_mem_context(memctx);
  2053. uint32_t len;
  2054. uint32_t req_id;
  2055. };
  2056. struct target_resource_config {
  2057. uint32_t num_vdevs;
  2058. uint32_t num_peers;
  2059. uint32_t num_active_peers;
  2060. uint32_t num_offload_peers;
  2061. uint32_t num_offload_reorder_buffs;
  2062. uint32_t num_peer_keys;
  2063. uint32_t num_tids;
  2064. uint32_t ast_skid_limit;
  2065. uint32_t tx_chain_mask;
  2066. uint32_t rx_chain_mask;
  2067. uint32_t rx_timeout_pri[4];
  2068. uint32_t rx_decap_mode;
  2069. uint32_t scan_max_pending_req;
  2070. uint32_t bmiss_offload_max_vdev;
  2071. uint32_t roam_offload_max_vdev;
  2072. uint32_t roam_offload_max_ap_profiles;
  2073. uint32_t num_mcast_groups;
  2074. uint32_t num_mcast_table_elems;
  2075. uint32_t mcast2ucast_mode;
  2076. uint32_t tx_dbg_log_size;
  2077. uint32_t num_wds_entries;
  2078. uint32_t dma_burst_size;
  2079. uint32_t mac_aggr_delim;
  2080. uint32_t rx_skip_defrag_timeout_dup_detection_check;
  2081. uint32_t vow_config;
  2082. uint32_t gtk_offload_max_vdev;
  2083. uint32_t num_msdu_desc; /* Number of msdu desc */
  2084. uint32_t max_frag_entries;
  2085. /* End common */
  2086. /* Added in MCL */
  2087. uint32_t num_tdls_vdevs;
  2088. uint32_t num_tdls_conn_table_entries;
  2089. uint32_t beacon_tx_offload_max_vdev;
  2090. uint32_t num_multicast_filter_entries;
  2091. uint32_t num_wow_filters;
  2092. uint32_t num_keep_alive_pattern;
  2093. uint32_t keep_alive_pattern_size;
  2094. uint32_t max_tdls_concurrent_sleep_sta;
  2095. uint32_t max_tdls_concurrent_buffer_sta;
  2096. uint32_t wmi_send_separate;
  2097. uint32_t num_ocb_vdevs;
  2098. uint32_t num_ocb_channels;
  2099. uint32_t num_ocb_schedules;
  2100. };
  2101. /**
  2102. * struct wmi_wifi_start_log - Structure to store the params sent to start/
  2103. * stop logging
  2104. * @name: Attribute which indicates the type of logging like per packet
  2105. * statistics, connectivity etc.
  2106. * @verbose_level: Verbose level which can be 0,1,2,3
  2107. * @flag: Flag field for future use
  2108. */
  2109. struct wmi_wifi_start_log {
  2110. uint32_t ring_id;
  2111. uint32_t verbose_level;
  2112. uint32_t flag;
  2113. };
  2114. /**
  2115. * struct wmi_pcl_list - Format of PCL
  2116. * @pcl_list: List of preferred channels
  2117. * @pcl_len: Number of channels in the PCL
  2118. */
  2119. struct wmi_pcl_list {
  2120. uint8_t pcl_list[128];
  2121. uint32_t pcl_len;
  2122. };
  2123. /**
  2124. * struct wmi_hw_mode_params - HW mode params
  2125. * @mac0_tx_ss: MAC0 Tx spatial stream
  2126. * @mac0_rx_ss: MAC0 Rx spatial stream
  2127. * @mac1_tx_ss: MAC1 Tx spatial stream
  2128. * @mac1_rx_ss: MAC1 Rx spatial stream
  2129. * @mac0_bw: MAC0 bandwidth
  2130. * @mac1_bw: MAC1 bandwidth
  2131. * @dbs_cap: DBS capabality
  2132. * @agile_dfs_cap: Agile DFS capabality
  2133. */
  2134. struct wmi_hw_mode_params {
  2135. uint8_t mac0_tx_ss;
  2136. uint8_t mac0_rx_ss;
  2137. uint8_t mac1_tx_ss;
  2138. uint8_t mac1_rx_ss;
  2139. uint8_t mac0_bw;
  2140. uint8_t mac1_bw;
  2141. uint8_t dbs_cap;
  2142. uint8_t agile_dfs_cap;
  2143. };
  2144. /**
  2145. * struct wmi_dual_mac_config - Dual MAC configuration
  2146. * @scan_config: Scan configuration
  2147. * @fw_mode_config: FW mode configuration
  2148. * @set_dual_mac_cb: Callback function to be executed on response to the command
  2149. */
  2150. struct wmi_dual_mac_config {
  2151. uint32_t scan_config;
  2152. uint32_t fw_mode_config;
  2153. void *set_dual_mac_cb;
  2154. };
  2155. #ifdef WLAN_NS_OFFLOAD
  2156. /**
  2157. * struct ns_offload_req_params - ns offload request paramter
  2158. * @srcIPv6Addr: src ipv6 address
  2159. * @selfIPv6Addr: self ipv6 address
  2160. * @targetIPv6Addr: target ipv6 address
  2161. * @self_macaddr: self mac address
  2162. * @srcIPv6AddrValid: src ipv6 address valid flag
  2163. * @targetIPv6AddrValid: target ipv6 address valid flag
  2164. * @slotIdx: slot index
  2165. */
  2166. struct ns_offload_req_params {
  2167. uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN];
  2168. uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
  2169. uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
  2170. struct qdf_mac_addr self_macaddr;
  2171. uint8_t srcIPv6AddrValid;
  2172. uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
  2173. uint8_t slotIdx;
  2174. };
  2175. #endif /* WLAN_NS_OFFLOAD */
  2176. /**
  2177. * struct host_offload_req_param - arp offload parameter
  2178. * @offloadType: offload type
  2179. * @enableOrDisable: enable or disable
  2180. * @num_ns_offload_count: offload count
  2181. */
  2182. struct host_offload_req_param {
  2183. uint8_t offloadType;
  2184. uint8_t enableOrDisable;
  2185. uint32_t num_ns_offload_count;
  2186. union {
  2187. uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN];
  2188. uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN];
  2189. } params;
  2190. #ifdef WLAN_NS_OFFLOAD
  2191. struct ns_offload_req_params nsOffloadInfo;
  2192. #endif /* WLAN_NS_OFFLOAD */
  2193. struct qdf_mac_addr bssid;
  2194. };
  2195. /**
  2196. * struct ssid_hotlist_param - param for SSID Hotlist
  2197. * @ssid: SSID which is being hotlisted
  2198. * @band: Band in which the given SSID should be scanned
  2199. * @rssi_low: Low bound on RSSI
  2200. * @rssi_high: High bound on RSSI
  2201. */
  2202. struct ssid_hotlist_param {
  2203. struct mac_ssid ssid;
  2204. uint8_t band;
  2205. int32_t rssi_low;
  2206. int32_t rssi_high;
  2207. };
  2208. /**
  2209. * struct roam_scan_filter_params - Structure holding roaming scan
  2210. * parameters
  2211. * @len: length
  2212. * @op_bitmap: bitmap to determine reason of roaming
  2213. * @session_id: vdev id
  2214. * @num_bssid_black_list: The number of BSSID's that we should
  2215. * avoid connecting to. It is like a
  2216. * blacklist of BSSID's.
  2217. * @num_ssid_white_list: The number of SSID profiles that are
  2218. * in the Whitelist. When roaming, we
  2219. * consider the BSSID's with this SSID
  2220. * also for roaming apart from the connected one's
  2221. * @num_bssid_preferred_list: Number of BSSID's which have a preference over
  2222. * others
  2223. * @bssid_avoid_list: Blacklist SSID's
  2224. * @ssid_allowed_list: Whitelist SSID's
  2225. * @bssid_favored: Favorable BSSID's
  2226. * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
  2227. *
  2228. * This structure holds all the key parameters related to
  2229. * initial connection and roaming connections.
  2230. */
  2231. struct roam_scan_filter_params {
  2232. uint32_t len;
  2233. uint32_t op_bitmap;
  2234. uint8_t session_id;
  2235. uint32_t num_bssid_black_list;
  2236. uint32_t num_ssid_white_list;
  2237. uint32_t num_bssid_preferred_list;
  2238. struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
  2239. struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
  2240. struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
  2241. uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
  2242. };
  2243. /**
  2244. * struct ssid_hotlist_request_params - set SSID hotlist request struct
  2245. * @request_id: ID of the request
  2246. * @session_id: ID of the session
  2247. * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
  2248. * must not be seen in order to consider the SSID "lost"
  2249. * @ssid_count: Number of valid entries in the @ssids array
  2250. * @ssids: Array that defines the SSIDs that are in the hotlist
  2251. */
  2252. struct ssid_hotlist_request_params {
  2253. uint32_t request_id;
  2254. uint8_t session_id;
  2255. uint32_t lost_ssid_sample_size;
  2256. uint32_t ssid_count;
  2257. struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
  2258. };
  2259. /**
  2260. * struct wmi_unit_test_cmd - unit test command parameters
  2261. * @vdev_id: vdev id
  2262. * @module_id: module id
  2263. * @num_args: number of arguments
  2264. * @args: arguments
  2265. */
  2266. struct wmi_unit_test_cmd {
  2267. uint32_t vdev_id;
  2268. WLAN_MODULE_ID module_id;
  2269. uint32_t num_args;
  2270. uint32_t args[WMI_MAX_NUM_ARGS];
  2271. };
  2272. /**
  2273. * struct wmi_roam_invoke_cmd - roam invoke command
  2274. * @vdev_id: vdev id
  2275. * @bssid: mac address
  2276. * @channel: channel
  2277. */
  2278. struct wmi_roam_invoke_cmd {
  2279. uint32_t vdev_id;
  2280. uint8_t bssid[IEEE80211_ADDR_LEN];
  2281. uint32_t channel;
  2282. };
  2283. /**
  2284. * struct ext_scan_setbssi_hotlist_params - set hotlist request
  2285. * @requestId: request identifier
  2286. * @sessionId: session identifier
  2287. * @lost_ap_sample_size: number of samples to confirm AP loss
  2288. * @numAp: Number of hotlist APs
  2289. * @ap: hotlist APs
  2290. */
  2291. struct ext_scan_setbssi_hotlist_params {
  2292. uint32_t requestId;
  2293. uint8_t sessionId;
  2294. uint32_t lost_ap_sample_size;
  2295. uint32_t numAp;
  2296. struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
  2297. };
  2298. #endif /* _WMI_UNIFIED_PARAM_H_ */