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