wmi_unified_param.h 67 KB

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