wmi_unified_param.h 65 KB

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