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