wmi_unified_param.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  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. /* The size of the utc time in bytes. */
  41. #define WMI_SIZE_UTC_TIME (10)
  42. /* The size of the utc time error in bytes. */
  43. #define WMI_SIZE_UTC_TIME_ERROR (5)
  44. #define WMI_MCC_MIN_CHANNEL_QUOTA 20
  45. #define WMI_MCC_MAX_CHANNEL_QUOTA 80
  46. #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY 30
  47. #define WMI_BEACON_TX_BUFFER_SIZE (512)
  48. #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH 3
  49. #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
  50. #define WMI_RSSI_THOLD_DEFAULT -300
  51. #define WMI_NLO_FREQ_THRESH 1000
  52. #define WMI_SEC_TO_MSEC(sec) (sec * 1000)
  53. #define WMI_MSEC_TO_USEC(msec) (msec * 1000)
  54. #define WMI_ETH_LEN 64
  55. #define WMI_QOS_NUM_TSPEC_MAX 2
  56. #define WMI_QOS_NUM_AC_MAX 4
  57. /**
  58. * struct vdev_create_params - vdev create cmd parameter
  59. * @if_id: interface id
  60. * @type: interface type
  61. * @subtype: interface subtype
  62. */
  63. struct vdev_create_params {
  64. uint8_t if_id;
  65. uint32_t type;
  66. uint32_t subtype;
  67. };
  68. /**
  69. * struct vdev_delete_params - vdev delete cmd parameter
  70. * @if_id: interface id
  71. */
  72. struct vdev_delete_params {
  73. uint8_t if_id;
  74. };
  75. /**
  76. * struct vdev_start_params - vdev start cmd parameter
  77. * @beacon_intval: beacon intval
  78. * @dtim_period: dtim period
  79. * @max_txpow: max tx power
  80. * @phy_ch_width chan_width: channel width
  81. * @is_dfs: flag to check if dfs enabled
  82. * @vdev_id: vdev id
  83. * @chan: channel no
  84. * @oper_mode: operating mode
  85. * @length: length
  86. * @ssId[32]: ssid
  87. * @hidden_ssid: hidden ssid
  88. * @pmf_enabled: is pmf enabled
  89. * @vht_capable: is vht capable
  90. * @ch_center_freq_seg0: center freq seq 0
  91. * @ch_center_freq_seg1: center freq seq 1
  92. * @ht_capable: is ht capable
  93. * @dfs_pri_multiplier: DFS multiplier
  94. * @dot11_mode: dot11 mode
  95. * @is_half_rate: Indicates half rate channel
  96. * @is_quarter_rate: Indicates quarter rate channel
  97. * @preferred_tx_streams: preferred tx streams
  98. * @preferred_rx_streams: preferred rx streams
  99. */
  100. struct vdev_start_params {
  101. uint32_t beacon_intval;
  102. uint32_t dtim_period;
  103. int32_t max_txpow;
  104. bool is_dfs;
  105. uint8_t vdev_id;
  106. uint8_t chan;
  107. uint8_t oper_mode;
  108. uint8_t length;
  109. uint8_t ssId[32];
  110. uint8_t hidden_ssid;
  111. uint8_t pmf_enabled;
  112. uint8_t vht_capable;
  113. uint8_t ch_center_freq_seg0;
  114. uint8_t ch_center_freq_seg1;
  115. uint8_t ht_capable;
  116. int32_t dfs_pri_multiplier;
  117. uint8_t dot11_mode;
  118. bool is_half_rate;
  119. bool is_quarter_rate;
  120. uint32_t preferred_tx_streams;
  121. uint32_t preferred_rx_streams;
  122. };
  123. /**
  124. * struct vdev_stop_params - vdev stop cmd parameter
  125. * @vdev_id: vdev id
  126. */
  127. struct vdev_stop_params {
  128. uint8_t vdev_id;
  129. };
  130. /**
  131. * struct vdev_up_params - vdev up cmd parameter
  132. * @vdev_id: vdev id
  133. * @assoc_id: association id
  134. */
  135. struct vdev_up_params {
  136. uint8_t vdev_id;
  137. uint16_t assoc_id;
  138. };
  139. /**
  140. * struct vdev_down_params - vdev down cmd parameter
  141. * @vdev_id: vdev id
  142. */
  143. struct vdev_down_params {
  144. uint8_t vdev_id;
  145. };
  146. /**
  147. * struct vdev_set_params - vdev set cmd parameter
  148. * @if_id: vdev id
  149. * @param_id: parameter id
  150. * @param_value: parameter value
  151. */
  152. struct vdev_set_params {
  153. uint32_t if_id;
  154. uint32_t param_id;
  155. uint32_t param_value;
  156. };
  157. /**
  158. * struct peer_delete_params - peer delete cmd parameter
  159. * @vdev_id: vdev id
  160. */
  161. struct peer_delete_params {
  162. uint8_t vdev_id;
  163. };
  164. /**
  165. * struct peer_flush_params - peer flush cmd parameter
  166. * @peer_tid_bitmap: peer tid bitmap
  167. * @vdev_id: vdev id
  168. */
  169. struct peer_flush_params {
  170. uint32_t peer_tid_bitmap;
  171. uint8_t vdev_id;
  172. };
  173. /**
  174. * struct peer_set_params - peer set cmd parameter
  175. * @param_id: parameter id
  176. * @param_value: parameter value
  177. * @vdev_id: vdev id
  178. */
  179. struct peer_set_params {
  180. uint32_t param_id;
  181. uint32_t param_value;
  182. uint32_t vdev_id;
  183. };
  184. /**
  185. * struct peer_create_params - peer create cmd parameter
  186. * @peer_addr: peer mac addr
  187. * @peer_type: peer type
  188. * @vdev_id: vdev id
  189. */
  190. struct peer_create_params {
  191. const uint8_t *peer_addr;
  192. uint32_t peer_type;
  193. uint32_t vdev_id;
  194. };
  195. /**
  196. * struct peer_remove_params - peer remove cmd parameter
  197. * @bssid: bss id
  198. * @vdev_id: vdev id
  199. * @roam_synch_in_progress: flag to indicate if roaming is in progress
  200. */
  201. struct peer_remove_params {
  202. uint8_t *bssid;
  203. uint8_t vdev_id;
  204. bool roam_synch_in_progress;
  205. };
  206. /**
  207. * struct stats_request_params - stats_request cmd parameter
  208. * @stats_id: statistics id
  209. * @vdev_id: vdev id
  210. */
  211. struct stats_request_params {
  212. uint32_t stats_id;
  213. uint32_t vdev_id;
  214. };
  215. /**
  216. * struct green_ap_ps_params - green ap ps cmd parameter
  217. * @value: parameter value
  218. */
  219. struct green_ap_ps_params {
  220. uint32_t value;
  221. };
  222. /**
  223. * struct wow_cmd_params - wow cmd parameter
  224. * @enable: wow enable or disable flag
  225. * @can_suspend_link: flag to indicate if link can be suspended
  226. * @pause_iface_config: interface config
  227. */
  228. struct wow_cmd_params {
  229. bool enable;
  230. bool can_suspend_link;
  231. uint8_t pause_iface_config;
  232. };
  233. /**
  234. * struct packet_enable_params - packet enable cmd parameter
  235. * @vdev_id: vdev id
  236. * @enable: flag to indicate if parameter can be enabled or disabled
  237. */
  238. struct packet_enable_params {
  239. uint8_t vdev_id;
  240. bool enable;
  241. };
  242. /**
  243. * struct suspend_params - suspend cmd parameter
  244. * @disable_target_intr: disable target interrupt
  245. */
  246. struct suspend_params {
  247. uint8_t disable_target_intr;
  248. };
  249. /**
  250. * struct pdev_params - pdev set cmd parameter
  251. * @param_id: parameter id
  252. * @param_value: parameter value
  253. */
  254. struct pdev_params {
  255. uint32_t param_id;
  256. uint32_t param_value;
  257. };
  258. /**
  259. * struct beacon_params - beacon template cmd parameter
  260. * @vdev_id: vdev id
  261. * @tim_ie_offset: tim ie offset
  262. * @tmpl_len: beacon template length
  263. * @tmpl_len_aligned: beacon template alignment
  264. * @frm: beacon template parameter
  265. */
  266. struct beacon_params {
  267. uint8_t vdev_id;
  268. uint32_t tim_ie_offset;
  269. uint32_t tmpl_len;
  270. uint32_t tmpl_len_aligned;
  271. uint8_t *frm;
  272. };
  273. /**
  274. * struct peer_assoc_params - peer assoc cmd parameter
  275. * @peer_macaddr: peer mac address
  276. * @vdev_id: vdev id
  277. * @peer_new_assoc: peer association type
  278. * @peer_associd: peer association id
  279. * @peer_flags: peer flags
  280. * @peer_caps: peer capabalities
  281. * @peer_listen_intval: peer listen interval
  282. * @peer_ht_caps: HT capabalities
  283. * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
  284. * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
  285. * @peer_rate_caps: peer rate capabalities
  286. * @peer_nss: peer nss
  287. * @peer_phymode: peer phymode
  288. * @peer_ht_info: peer HT info
  289. * @peer_legacy_rates: peer legacy rates
  290. * @peer_ht_rates: peer ht rates
  291. * @num_peer_legacy_rates: no of peer legacy rates
  292. * @num_peer_ht_rates: no of peer ht rates
  293. * @rx_max_rate: max rx rates
  294. * @rx_mcs_set: rx mcs
  295. * @tx_max_rate: max tx rates
  296. * @tx_mcs_set: tx mcs
  297. * @vht_capable: VHT capabalities
  298. */
  299. struct peer_assoc_params {
  300. wmi_mac_addr peer_macaddr;
  301. uint32_t vdev_id;
  302. uint32_t peer_new_assoc;
  303. uint32_t peer_associd;
  304. uint32_t peer_flags;
  305. uint32_t peer_caps;
  306. uint32_t peer_listen_intval;
  307. uint32_t peer_ht_caps;
  308. uint32_t peer_max_mpdu;
  309. uint32_t peer_mpdu_density;
  310. uint32_t peer_rate_caps;
  311. uint32_t peer_nss;
  312. uint32_t peer_vht_caps;
  313. uint32_t peer_phymode;
  314. uint32_t peer_ht_info[2];
  315. wmi_rate_set peer_legacy_rates;
  316. wmi_rate_set peer_ht_rates;
  317. uint32_t num_peer_legacy_rates;
  318. uint32_t num_peer_ht_rates;
  319. uint32_t rx_max_rate;
  320. uint32_t rx_mcs_set;
  321. uint32_t tx_max_rate;
  322. uint32_t tx_mcs_set;
  323. uint8_t vht_capable;
  324. };
  325. /**
  326. * struct sta_ps_params - sta ps cmd parameter
  327. * @vdev_id: vdev id
  328. * @param: sta ps paramter
  329. * @value: sta ps parameter value
  330. */
  331. struct sta_ps_params {
  332. uint32_t vdev_id;
  333. uint32_t param;
  334. uint32_t value;
  335. };
  336. /**
  337. * struct ap_ps_params - ap ps cmd parameter
  338. * @vdev_id: vdev id
  339. * @param: ap ps paramter
  340. * @value: ap ps paramter value
  341. */
  342. struct ap_ps_params {
  343. uint32_t vdev_id;
  344. uint32_t param;
  345. uint32_t value;
  346. };
  347. /**
  348. * struct mac_ssid - mac ssid structure
  349. * @length:
  350. * @mac_ssid[WMI_MAC_MAX_SSID_LENGTH]:
  351. */
  352. struct mac_ssid {
  353. uint8_t length;
  354. uint8_t mac_ssid[WMI_MAC_MAX_SSID_LENGTH];
  355. } cdf_packed;
  356. /**
  357. * struct scan_start_params - start scan cmd parameter
  358. * @scan_id: scan id
  359. * @scan_req_id: requeted scan id
  360. * @vdev_id: vdev id
  361. * @scan_priority: scan priority
  362. * @notify_scan_events: flag to indicate if scan to be notified
  363. * @dwell_time_active: active dwell time
  364. * @dwell_time_passive: passive dwell time
  365. * @min_rest_time: min rest time
  366. * @max_rest_time: max rest time
  367. * @repeat_probe_time: repeat probe time
  368. * @probe_spacing_time: probe spacing time
  369. * @idle_time: idle time
  370. * @max_scan_time: max scan time
  371. * @probe_delay: probe delay
  372. * @scan_ctrl_flags: scan control flag
  373. * @burst_duration: burst duration
  374. * @num_chan: no of channel
  375. * @num_bssid: no of bssid
  376. * @num_ssids: no of ssid
  377. * @ie_len: ie length
  378. * @n_probes: no of probe
  379. * @chan_list: channel list
  380. * @ie_len_with_pad: ie length with padding
  381. * @num_ssid: no of ssid
  382. * @sid: pointer to mac_ssid structure
  383. * @uie_fieldOffset: ie field offset
  384. * @mac_add_bytes: mac address bytes
  385. */
  386. struct scan_start_params {
  387. uint32_t scan_id;
  388. uint32_t scan_req_id;
  389. uint32_t vdev_id;
  390. uint32_t scan_priority;
  391. uint32_t notify_scan_events;
  392. uint32_t dwell_time_active;
  393. uint32_t dwell_time_passive;
  394. uint32_t min_rest_time;
  395. uint32_t max_rest_time;
  396. uint32_t repeat_probe_time;
  397. uint32_t probe_spacing_time;
  398. uint32_t idle_time;
  399. uint32_t max_scan_time;
  400. uint32_t probe_delay;
  401. uint32_t scan_ctrl_flags;
  402. uint32_t burst_duration;
  403. uint32_t num_chan;
  404. uint32_t num_bssid;
  405. uint32_t num_ssids;
  406. uint32_t ie_len;
  407. uint32_t n_probes;
  408. uint32_t *chan_list;
  409. uint32_t ie_len_with_pad;
  410. struct mac_ssid ssid[WMI_SCAN_MAX_NUM_SSID];
  411. uint8_t *ie_base;
  412. uint16_t uie_fieldOffset;
  413. uint8_t mac_add_bytes[IEEE80211_ADDR_LEN];
  414. };
  415. /**
  416. * struct scan_stop_params - stop scan cmd parameter
  417. * @requestor: scan requestor
  418. * @scan_id: scan id
  419. * @req_type: scan request type
  420. * @vdev_id: vdev id
  421. */
  422. struct scan_stop_params {
  423. uint32_t requestor;
  424. uint32_t scan_id;
  425. uint32_t req_type;
  426. uint32_t vdev_id;
  427. };
  428. /**
  429. * struct scan_chan_list_params - scan channel list cmd parameter
  430. * @num_scan_chans: no of scan channels
  431. * @chan_info: pointer to wmi channel info
  432. */
  433. struct scan_chan_list_params {
  434. uint8_t num_scan_chans;
  435. wmi_channel *chan_info;
  436. };
  437. /**
  438. * struct fw_hang_params - fw hang command parameters
  439. * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
  440. * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
  441. */
  442. struct fw_hang_params {
  443. uint32_t type;
  444. uint32_t delay_time_ms;
  445. };
  446. /**
  447. * struct pdev_utf_params - pdev utf command parameters
  448. * @utf_payload:
  449. * @len:
  450. */
  451. struct pdev_utf_params {
  452. uint8_t *utf_payload;
  453. uint32_t len;
  454. };
  455. /**
  456. * struct crash_inject - crash inject command parameters
  457. * @type: crash inject type
  458. * @delay_time_ms: time in milliseconds for FW to delay the crash
  459. */
  460. struct crash_inject {
  461. uint32_t type;
  462. uint32_t delay_time_ms;
  463. };
  464. /**
  465. * struct dbglog_params - fw deboglog command parameters
  466. * @param: command parameter
  467. * @val: parameter value
  468. * @module_id_bitmap: fixed length module id bitmap
  469. * @bitmap_len: module id bitmap length
  470. */
  471. struct dbglog_params {
  472. uint32_t param;
  473. uint32_t val;
  474. uint32_t *module_id_bitmap;
  475. uint32_t bitmap_len;
  476. };
  477. /**
  478. * struct seg_hdr_info - header info
  479. * @len: length
  480. * @msgref: message refrence
  481. * @segmentInfo: segment info
  482. * @pad: padding
  483. */
  484. struct seg_hdr_info {
  485. uint32_t len;
  486. uint32_t msgref;
  487. uint32_t segmentInfo;
  488. uint32_t pad;
  489. };
  490. /**
  491. * struct wmi_mgmt_params - wmi mgmt cmd paramters
  492. * @tx_frame: management tx frame
  493. * @frmLen: frame length
  494. * @vdev_id: vdev id
  495. * @tx_complete_cb: tx download callback handler
  496. * @tx_ota_post_proc_cb: OTA complition handler
  497. * @chanfreq: channel frequency
  498. * @pdata: frame data
  499. * @wmi_desc: command descriptor
  500. */
  501. struct wmi_mgmt_params {
  502. void *tx_frame;
  503. uint16_t frm_len;
  504. uint8_t vdev_id;
  505. void *tx_complete_cb;
  506. void *tx_ota_post_proc_cb;
  507. uint16_t chanfreq;
  508. void *pdata;
  509. struct wmi_desc_t *wmi_desc;
  510. void *cdf_ctx;
  511. };
  512. /**
  513. * struct p2p_ps_params - P2P powersave related params
  514. * @opp_ps: opportunistic power save
  515. * @ctwindow: CT window
  516. * @count: count
  517. * @duration: duration
  518. * @interval: interval
  519. * @single_noa_duration: single shot noa duration
  520. * @ps_selection: power save selection
  521. * @session_id: session id
  522. */
  523. struct p2p_ps_params {
  524. uint8_t opp_ps;
  525. uint32_t ctwindow;
  526. uint8_t count;
  527. uint32_t duration;
  528. uint32_t interval;
  529. uint32_t single_noa_duration;
  530. uint8_t ps_selection;
  531. uint8_t session_id;
  532. };
  533. /**
  534. * struct ta_uapsd_trig_params - uapsd trigger parameter
  535. * @vdevid: vdev id
  536. * @peer_addr: peer address
  537. * @auto_triggerparam: trigger parameters
  538. * @num_ac: no of access category
  539. */
  540. struct sta_uapsd_trig_params {
  541. uint32_t vdevid;
  542. uint8_t peer_addr[IEEE80211_ADDR_LEN];
  543. uint8_t *auto_triggerparam;
  544. uint32_t num_ac;
  545. };
  546. /**
  547. * struct ocb_utc_param
  548. * @vdev_id: session id
  549. * @utc_time: number of nanoseconds from Jan 1st 1958
  550. * @time_error: the error in the UTC time. All 1's for unknown
  551. */
  552. struct ocb_utc_param {
  553. uint32_t vdev_id;
  554. uint8_t utc_time[WMI_SIZE_UTC_TIME];
  555. uint8_t time_error[WMI_SIZE_UTC_TIME_ERROR];
  556. };
  557. /**
  558. * struct ocb_timing_advert_param
  559. * @vdev_id: session id
  560. * @chan_freq: frequency on which to advertise
  561. * @repeat_rate: the number of times it will send TA in 5 seconds
  562. * @timestamp_offset: offset of the timestamp field in the TA frame
  563. * @time_value_offset: offset of the time_value field in the TA frame
  564. * @template_length: size in bytes of the TA frame
  565. * @template_value: the TA frame
  566. */
  567. struct ocb_timing_advert_param {
  568. uint32_t vdev_id;
  569. uint32_t chan_freq;
  570. uint32_t repeat_rate;
  571. uint32_t timestamp_offset;
  572. uint32_t time_value_offset;
  573. uint32_t template_length;
  574. uint8_t *template_value;
  575. };
  576. /**
  577. * struct dcc_get_stats_param
  578. * @vdev_id: session id
  579. * @channel_count: number of dcc channels
  580. * @request_array_len: size in bytes of the request array
  581. * @request_array: the request array
  582. */
  583. struct dcc_get_stats_param {
  584. uint32_t vdev_id;
  585. uint32_t channel_count;
  586. uint32_t request_array_len;
  587. void *request_array;
  588. };
  589. /**
  590. * struct dcc_update_ndl_param
  591. * @vdev_id: session id
  592. * @channel_count: number of channels to be updated
  593. * @dcc_ndl_chan_list_len: size in bytes of the ndl_chan array
  594. * @dcc_ndl_chan_list: the ndl_chan array
  595. * @dcc_ndl_active_state_list_len: size in bytes of the active_state array
  596. * @dcc_ndl_active_state_list: the active state array
  597. */
  598. struct dcc_update_ndl_param {
  599. uint32_t vdev_id;
  600. uint32_t channel_count;
  601. uint32_t dcc_ndl_chan_list_len;
  602. void *dcc_ndl_chan_list;
  603. uint32_t dcc_ndl_active_state_list_len;
  604. void *dcc_ndl_active_state_list;
  605. };
  606. /**
  607. * struct ocb_config_sched
  608. * @chan_freq: frequency of the channel
  609. * @total_duration: duration of the schedule
  610. * @guard_interval: guard interval on the start of the schedule
  611. */
  612. struct ocb_config_sched {
  613. uint32_t chan_freq;
  614. uint32_t total_duration;
  615. uint32_t guard_interval;
  616. };
  617. /**
  618. * OCB structures
  619. */
  620. #define WMI_NUM_AC (4)
  621. #define WMI_OCB_CHANNEL_MAX (5)
  622. #define WMI_MAX_NUM_AC 4
  623. struct wmi_ocb_qos_params {
  624. uint8_t aifsn;
  625. uint8_t cwmin;
  626. uint8_t cwmax;
  627. };
  628. /**
  629. * struct ocb_config_channel
  630. * @chan_freq: frequency of the channel
  631. * @bandwidth: bandwidth of the channel, either 10 or 20 MHz
  632. * @mac_address: MAC address assigned to this channel
  633. * @qos_params: QoS parameters
  634. * @max_pwr: maximum transmit power of the channel (dBm)
  635. * @min_pwr: minimum transmit power of the channel (dBm)
  636. * @reg_pwr: maximum transmit power specified by the regulatory domain (dBm)
  637. * @antenna_max: maximum antenna gain specified by the regulatory domain (dB)
  638. */
  639. struct ocb_config_channel {
  640. uint32_t chan_freq;
  641. uint32_t bandwidth;
  642. struct cdf_mac_addr mac_address;
  643. struct wmi_ocb_qos_params qos_params[WMI_MAX_NUM_AC];
  644. uint32_t max_pwr;
  645. uint32_t min_pwr;
  646. uint8_t reg_pwr;
  647. uint8_t antenna_max;
  648. uint16_t flags;
  649. };
  650. /**
  651. * struct ocb_config_param
  652. * @session_id: session id
  653. * @channel_count: number of channels
  654. * @schedule_size: size of the channel schedule
  655. * @flags: reserved
  656. * @channels: array of OCB channels
  657. * @schedule: array of OCB schedule elements
  658. * @dcc_ndl_chan_list_len: size of the ndl_chan array
  659. * @dcc_ndl_chan_list: array of dcc channel info
  660. * @dcc_ndl_active_state_list_len: size of the active state array
  661. * @dcc_ndl_active_state_list: array of active states
  662. * @adapter: the OCB adapter
  663. * @dcc_stats_callback: callback for the response event
  664. */
  665. struct ocb_config_param {
  666. uint8_t session_id;
  667. uint32_t channel_count;
  668. uint32_t schedule_size;
  669. uint32_t flags;
  670. struct ocb_config_channel *channels;
  671. struct ocb_config_sched *schedule;
  672. uint32_t dcc_ndl_chan_list_len;
  673. void *dcc_ndl_chan_list;
  674. uint32_t dcc_ndl_active_state_list_len;
  675. void *dcc_ndl_active_state_list;
  676. };
  677. /**
  678. * struct t_thermal_cmd_params - thermal command parameters
  679. * @min_temp: minimum temprature
  680. * @max_temp: maximum temprature
  681. * @thermal_enable: thermal enable
  682. */
  683. struct thermal_cmd_params {
  684. uint16_t min_temp;
  685. uint16_t max_temp;
  686. uint8_t thermal_enable;
  687. };
  688. #define WMI_LRO_IPV4_SEED_ARR_SZ 5
  689. #define WMI_LRO_IPV6_SEED_ARR_SZ 11
  690. /**
  691. * struct wmi_lro_config_cmd_t - set LRO init parameters
  692. * @lro_enable: indicates whether lro is enabled
  693. * @tcp_flag: If the TCP flags from the packet do not match
  694. * the values in this field after masking with TCP flags mask
  695. * below, packet is not LRO eligible
  696. * @tcp_flag_mask: field for comparing the TCP values provided
  697. * above with the TCP flags field in the received packet
  698. * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
  699. * 5-tuple toeplitz hash for ipv4 packets
  700. * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
  701. * 5-tuple toeplitz hash for ipv6 packets
  702. */
  703. struct wmi_lro_config_cmd_t {
  704. uint32_t lro_enable;
  705. uint32_t tcp_flag:9,
  706. tcp_flag_mask:9;
  707. uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
  708. uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
  709. };
  710. #endif /* _WMI_UNIFIED_PARAM_H_ */