wmi_unified_param.h 17 KB

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