wmi_unified_param.h 66 KB

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