wmi_unified_param.h 67 KB

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