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