wmi_unified_param.h 59 KB

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