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