wmi_unified_param.h 68 KB

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