blob: 48d98757a7243346a4759308ba63ad07504324ea [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
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301064 * @dense_rssi_thresh_offset: dense roam RSSI threshold difference
1065 * @dense_min_aps_cnt: dense roam minimum APs
1066 * @initial_dense_status: dense status detected by host
1067 * @traffic_threshold: dense roam RSSI threshold
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301068 */
1069struct roam_offload_scan_rssi_params {
1070 int8_t rssi_thresh;
1071 uint8_t rssi_thresh_diff;
1072 uint32_t hi_rssi_scan_max_count;
1073 uint32_t hi_rssi_scan_rssi_delta;
1074 int32_t hi_rssi_scan_rssi_ub;
1075 int raise_rssi_thresh_5g;
1076 uint8_t session_id;
1077 uint32_t penalty_threshold_5g;
1078 uint32_t boost_threshold_5g;
1079 uint8_t raise_factor_5g;
1080 uint8_t drop_factor_5g;
1081 int max_raise_rssi_5g;
1082 int max_drop_rssi_5g;
1083 uint32_t good_rssi_threshold;
1084 uint32_t roam_earlystop_thres_min;
1085 uint32_t roam_earlystop_thres_max;
Gupta, Kapil1f4a4c32016-04-12 15:02:00 +05301086 int dense_rssi_thresh_offset;
1087 int dense_min_aps_cnt;
1088 int initial_dense_status;
1089 int traffic_threshold;
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301090};
1091
Govind Singhae855362016-03-07 14:24:22 +05301092/**
1093 * struct wifi_epno_network - enhanced pno network block
1094 * @ssid: ssid
1095 * @rssi_threshold: threshold for considering this SSID as found, required
1096 * granularity for this threshold is 4dBm to 8dBm
1097 * @flags: WIFI_PNO_FLAG_XXX
1098 * @auth_bit_field: auth bit field for matching WPA IE
1099 */
1100struct wifi_epno_network_params {
1101 struct mac_ssid ssid;
1102 int8_t rssi_threshold;
1103 uint8_t flags;
1104 uint8_t auth_bit_field;
1105};
1106
1107/**
1108 * struct wifi_enhanched_pno_params - enhanced pno network params
1109 * @num_networks: number of ssids
1110 * @networks: PNO networks
1111 */
1112struct wifi_enhanched_pno_params {
1113 uint32_t request_id;
1114 uint32_t session_id;
1115 uint32_t num_networks;
1116 struct wifi_epno_network_params networks[];
1117};
1118
1119enum {
1120 WMI_AP_RX_DATA_OFFLOAD = 0x00,
1121 WMI_STA_RX_DATA_OFFLOAD = 0x01,
1122};
1123
1124/**
1125 * enum extscan_report_events_type - extscan report events type
1126 * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
1127 * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
1128 * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
1129 * (beacons/probe responses + IEs)
1130 * in real time to HAL, in addition to completion events.
1131 * Note: To keep backward compatibility,
1132 * fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
1133 * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
1134 * 0 => batching, 1 => no batching
1135 */
1136enum wmi_extscan_report_events_type {
1137 WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL = 0x00,
1138 WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN = 0x01,
1139 WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS = 0x02,
1140 WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH = 0x04,
1141};
1142
1143/**
1144 * struct ipa_offload_control_params - ipa offload parameters
1145 * @offload_type: ipa offload type
1146 * @vdev_id: vdev id
1147 * @enable: ipa offload enable/disable
1148 */
1149struct ipa_offload_control_params {
1150 uint32_t offload_type;
1151 uint32_t vdev_id;
1152 uint32_t enable;
1153};
1154
1155/**
1156 * struct extscan_capabilities_params - ext scan capablities
1157 * @request_id: request_id
1158 * @session_id: session_id
1159 */
1160struct extscan_capabilities_params {
1161 uint32_t request_id;
1162 uint8_t session_id;
1163};
1164
1165/**
1166 * struct extscan_capabilities_reset_params - ext scan capablities reset parameter
1167 * @request_id: request_id
1168 * @session_id: session_id
1169 */
1170struct extscan_capabilities_reset_params {
1171 uint32_t request_id;
1172 uint8_t session_id;
1173};
1174
1175/**
1176 * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
1177 * @request_id: request_id
1178 * @session_id: session_id
1179 */
1180struct extscan_bssid_hotlist_reset_params {
1181 uint32_t request_id;
1182 uint8_t session_id;
1183};
1184
1185/**
1186 * struct extscan_stop_req_params - ext scan stop parameter
1187 * @request_id: request_id
1188 * @session_id: session_id
1189 */
1190struct extscan_stop_req_params {
1191 uint32_t request_id;
1192 uint8_t session_id;
1193};
1194
1195/**
1196 * struct ap_threshold_params - ap threshold parameter
1197 * @bssid: mac address
1198 * @low: low threshold
1199 * @high: high threshold
1200 */
1201struct ap_threshold_params {
Govind Singhd7468a52016-03-09 14:32:57 +05301202 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05301203 int32_t low;
1204 int32_t high;
1205};
1206
1207/**
1208 * struct extscan_set_sig_changereq_params - ext scan channel parameter
1209 * @request_id: mac address
1210 * @session_id: low threshold
1211 * @rssi_sample_size: Number of samples for averaging RSSI
1212 * @lostap_sample_size: Number of missed samples to confirm AP loss
1213 * @min_breaching: Number of APs breaching threshold required for firmware
1214 * @num_ap: no of scanned ap
1215 * @ap: ap threshold parameter
1216 */
1217struct extscan_set_sig_changereq_params {
1218 uint32_t request_id;
1219 uint8_t session_id;
1220 uint32_t rssi_sample_size;
1221 uint32_t lostap_sample_size;
1222 uint32_t min_breaching;
1223 uint32_t num_ap;
1224 struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
1225};
1226
1227/**
1228 * struct extscan_cached_result_params - ext scan cached parameter
1229 * @request_id: mac address
1230 * @session_id: low threshold
1231 * @flush: cached results flush
1232 */
1233struct extscan_cached_result_params {
1234 uint32_t request_id;
1235 uint8_t session_id;
1236 bool flush;
1237};
1238
1239#ifdef FEATURE_WLAN_SCAN_PNO
1240/* Set PNO */
1241#define WMI_PNO_MAX_NETW_CHANNELS 26
1242#define WMI_PNO_MAX_NETW_CHANNELS_EX 60
1243#define WMI_PNO_MAX_SUPP_NETWORKS 16
1244
1245/*
1246 * size based of dot11 declaration without extra IEs as we will not carry those
1247 * for PNO
1248 */
1249#define WMI_PNO_MAX_PB_REQ_SIZE 450
1250
1251#define WMI_PNO_24G_DEFAULT_CH 1
1252#define WMI_PNO_5G_DEFAULT_CH 36
1253
1254/**
1255 * enum pno_mode - pno mode types
1256 * @WMI_PNO_MODE_IMMEDIATE: immidiate mode
1257 * @WMI_PNO_MODE_ON_SUSPEND: suspend on mode
1258 * @WMI_PNO_MODE_ON_RESUME: resume on mode
1259 * @WMI_PNO_MODE_MAX: max range
1260 */
1261enum pno_mode {
1262 WMI_PNO_MODE_IMMEDIATE,
1263 WMI_PNO_MODE_ON_SUSPEND,
1264 WMI_PNO_MODE_ON_RESUME,
1265 WMI_PNO_MODE_MAX
1266};
1267
1268/**
1269 * struct pno_nw_type - pno nw type
1270 * @ssid: mac ssid
1271 * @authentication: authentication type
1272 * @encryption: encryption type
1273 * @bcastNetwType: broadcast nw type
1274 * @ucChannelCount: uc channel count
1275 * @aChannels: pno channel
1276 * @rssiThreshold: rssi threshold
1277 */
1278struct pno_nw_type {
1279 struct mac_ssid ssid;
1280 uint32_t authentication;
1281 uint32_t encryption;
1282 uint32_t bcastNetwType;
1283 uint8_t ucChannelCount;
1284 uint8_t aChannels[WMI_PNO_MAX_NETW_CHANNELS_EX];
1285 int32_t rssiThreshold;
1286};
1287
1288/**
1289 * struct pno_scan_req_params - PNO Scan request structure
1290 * @enable: flag to enable or disable
1291 * @modePNO: PNO Mode
1292 * @ucNetworksCount: Number of networks
1293 * @aNetworks: Preferred network list
1294 * @sessionId: Session identifier
1295 * @fast_scan_period: Fast Scan period
1296 * @slow_scan_period: Slow scan period
1297 * @fast_scan_max_cycles: Fast scan max cycles
1298 * @us24GProbeTemplateLen: 2.4G probe template length
1299 * @p24GProbeTemplate: 2.4G probe template
1300 * @us5GProbeTemplateLen: 5G probe template length
1301 * @p5GProbeTemplate: 5G probe template
1302 */
1303struct pno_scan_req_params {
1304 uint8_t enable;
1305 enum pno_mode modePNO;
1306 uint8_t ucNetworksCount;
1307 struct pno_nw_type aNetworks[WMI_PNO_MAX_SUPP_NETWORKS];
1308 uint8_t sessionId;
1309 uint32_t fast_scan_period;
1310 uint32_t slow_scan_period;
1311 uint8_t fast_scan_max_cycles;
1312 uint32_t active_min_time;
1313 uint32_t active_max_time;
1314 uint32_t passive_min_time;
1315 uint32_t passive_max_time;
1316 uint16_t us24GProbeTemplateLen;
1317 uint8_t p24GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
1318 uint16_t us5GProbeTemplateLen;
1319 uint8_t p5GProbeTemplate[WMI_PNO_MAX_PB_REQ_SIZE];
1320#ifdef FEATURE_WLAN_SCAN_PNO
1321 bool pno_channel_prediction;
1322 uint8_t top_k_num_of_channels;
1323 uint8_t stationary_thresh;
1324 uint32_t channel_prediction_full_scan;
1325#endif
1326};
1327
1328#endif /* FEATURE_WLAN_SCAN_PNO */
1329
1330#define WMI_WLAN_EXTSCAN_MAX_CHANNELS 36
1331#define WMI_WLAN_EXTSCAN_MAX_BUCKETS 16
1332#define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS 128
1333#define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS 64
1334#define WMI_EXTSCAN_MAX_HOTLIST_SSIDS 8
1335
1336/**
1337 * struct wifi_scan_channelspec_params - wifi scan channel parameter
1338 * @channel: Frequency in MHz
1339 * @dwellTimeMs: dwell time
1340 * @flush: cached results flush
1341 * @passive: passive scan
1342 * @chnlClass: channel class
1343 */
1344struct wifi_scan_channelspec_params {
1345 uint32_t channel;
1346 uint32_t dwellTimeMs;
1347 bool passive;
1348 uint8_t chnlClass;
1349};
1350
1351/**
1352 * enum wmi_wifi_band - wifi band
1353 * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
1354 * @WMI_WIFI_BAND_BG: 2.4 GHz
1355 * @WMI_WIFI_BAND_A: 5 GHz without DFS
1356 * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
1357 * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
1358 * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
1359 * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
1360 * @WMI_WIFI_BAND_MAX: max range
1361 */
1362enum wmi_wifi_band {
1363 WMI_WIFI_BAND_UNSPECIFIED,
1364 WMI_WIFI_BAND_BG = 1,
1365 WMI_WIFI_BAND_A = 2,
1366 WMI_WIFI_BAND_ABG = 3,
1367 WMI_WIFI_BAND_A_DFS_ONLY = 4,
1368 /* 5 is reserved */
1369 WMI_WIFI_BAND_A_WITH_DFS = 6,
1370 WMI_WIFI_BAND_ABG_WITH_DFS = 7,
1371 /* Keep it last */
1372 WMI_WIFI_BAND_MAX
1373};
1374
1375/**
1376 * struct wifi_scan_bucket_params - wifi scan bucket spec
1377 * @bucket: bucket identifier
1378 * @band: wifi band
1379 * @period: Desired period, in millisecond; if this is too
1380 * low, the firmware should choose to generate results as fast as
1381 * it can instead of failing the command byte
1382 * for exponential backoff bucket this is the min_period
1383 * @reportEvents: 0 => normal reporting (reporting rssi history
1384 * only, when rssi history buffer is % full)
1385 * 1 => same as 0 + report a scan completion event after scanning
1386 * this bucket
1387 * 2 => same as 1 + forward scan results
1388 * (beacons/probe responses + IEs) in real time to HAL
1389 * @max_period: if max_period is non zero or different than period,
1390 * then this bucket is an exponential backoff bucket and
1391 * the scan period will grow exponentially as per formula:
1392 * actual_period(N) = period ^ (N/(step_count+1)) to a
1393 * maximum period of max_period
1394 * @exponent: for exponential back off bucket: multiplier:
1395 * new_period = old_period * exponent
1396 * @step_count: for exponential back off bucket, number of scans performed
1397 * at a given period and until the exponent is applied
1398 * @numChannels: channels to scan; these may include DFS channels
1399 * Note that a given channel may appear in multiple buckets
1400 * @min_dwell_time_active: per bucket minimum active dwell time
1401 * @max_dwell_time_active: per bucket maximum active dwell time
1402 * @min_dwell_time_passive: per bucket minimum passive dwell time
1403 * @max_dwell_time_passive: per bucket maximum passive dwell time
1404 * @channels: Channel list
1405 */
1406struct wifi_scan_bucket_params {
1407 uint8_t bucket;
1408 enum wmi_wifi_band band;
1409 uint32_t period;
1410 uint32_t reportEvents;
1411 uint32_t max_period;
1412 uint32_t exponent;
1413 uint32_t step_count;
1414 uint32_t numChannels;
1415 uint32_t min_dwell_time_active;
1416 uint32_t max_dwell_time_active;
1417 uint32_t min_dwell_time_passive;
1418 uint32_t max_dwell_time_passive;
1419 struct wifi_scan_channelspec_params channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
1420};
1421
1422/**
1423 * struct wifi_scan_cmd_req_params - wifi scan command request params
1424 * @basePeriod: base timer period
1425 * @maxAPperScan: max ap per scan
1426 * @report_threshold_percent: report threshold
1427 * in %, when buffer is this much full, wake up host
1428 * @report_threshold_num_scans: report threshold number of scans
1429 * in number of scans, wake up host after these many scans
1430 * @requestId: request id
1431 * @sessionId: session id
1432 * @numBuckets: number of buckets
1433 * @min_dwell_time_active: per bucket minimum active dwell time
1434 * @max_dwell_time_active: per bucket maximum active dwell time
1435 * @min_dwell_time_passive: per bucket minimum passive dwell time
1436 * @max_dwell_time_passive: per bucket maximum passive dwell time
1437 * @configuration_flags: configuration flags
1438 * @buckets: buckets array
1439 */
1440struct wifi_scan_cmd_req_params {
1441 uint32_t basePeriod;
1442 uint32_t maxAPperScan;
1443
1444 uint32_t report_threshold_percent;
1445 uint32_t report_threshold_num_scans;
1446
1447 uint32_t requestId;
1448 uint8_t sessionId;
1449 uint32_t numBuckets;
1450
1451 uint32_t min_dwell_time_active;
1452 uint32_t max_dwell_time_active;
1453 uint32_t min_dwell_time_passive;
1454 uint32_t max_dwell_time_passive;
1455 uint32_t configuration_flags;
1456 struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
1457};
1458
Govind Singhae855362016-03-07 14:24:22 +05301459#define WMI_CFG_VALID_CHANNEL_LIST_LEN 100
1460
1461/**
1462 * struct plm_req_params - plm req parameter
1463 * @diag_token: Dialog token
1464 * @meas_token: measurement token
1465 * @num_bursts: total number of bursts
1466 * @burst_int: burst interval in seconds
1467 * @meas_duration:in TU's,STA goes off-ch
1468 * @burst_len: no of times the STA should cycle through PLM ch list
1469 * @desired_tx_pwr: desired tx power
1470 * @mac_addr: MC dest addr
1471 * @plm_num_ch: channel numbers
1472 * @plm_ch_list: channel list
1473 * @session_id: session id
1474 * @enable: enable/disable
1475 */
1476struct plm_req_params {
1477 uint16_t diag_token;
1478 uint16_t meas_token;
1479 uint16_t num_bursts;
1480 uint16_t burst_int;
1481 uint16_t meas_duration;
1482 /* no of times the STA should cycle through PLM ch list */
1483 uint8_t burst_len;
1484 int8_t desired_tx_pwr;
Govind Singhd7468a52016-03-09 14:32:57 +05301485 struct qdf_mac_addr mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05301486 /* no of channels */
1487 uint8_t plm_num_ch;
1488 /* channel numbers */
1489 uint8_t plm_ch_list[WMI_CFG_VALID_CHANNEL_LIST_LEN];
1490 uint8_t session_id;
1491 bool enable;
1492};
Naveen Rawatd5ffe152016-04-14 23:42:46 -07001493
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05301494#define MAX_SSID_ALLOWED_LIST 4
1495#define MAX_BSSID_AVOID_LIST 16
1496#define MAX_BSSID_FAVORED 16
Govind Singhae855362016-03-07 14:24:22 +05301497
1498
1499/**
1500 * struct mac_ts_info_tfc - mac ts info parameters
1501 * @burstSizeDefn: burst size
1502 * @reserved: reserved
1503 * @ackPolicy: ack policy
1504 * @psb: psb
1505 * @aggregation: aggregation
1506 * @accessPolicy: access policy
1507 * @direction: direction
1508 * @tsid: direction
1509 * @trafficType: traffic type
1510 */
1511struct mac_ts_info_tfc {
1512#ifndef ANI_LITTLE_BIT_ENDIAN
1513 uint8_t burstSizeDefn:1;
1514 uint8_t reserved:7;
1515#else
1516 uint8_t reserved:7;
1517 uint8_t burstSizeDefn:1;
1518#endif
1519
1520#ifndef ANI_LITTLE_BIT_ENDIAN
1521 uint16_t ackPolicy:2;
1522 uint16_t userPrio:3;
1523 uint16_t psb:1;
1524 uint16_t aggregation:1;
1525 uint16_t accessPolicy:2;
1526 uint16_t direction:2;
1527 uint16_t tsid:4;
1528 uint16_t trafficType:1;
1529#else
1530 uint16_t trafficType:1;
1531 uint16_t tsid:4;
1532 uint16_t direction:2;
1533 uint16_t accessPolicy:2;
1534 uint16_t aggregation:1;
1535 uint16_t psb:1;
1536 uint16_t userPrio:3;
1537 uint16_t ackPolicy:2;
1538#endif
Govind Singhd7468a52016-03-09 14:32:57 +05301539} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05301540
1541/**
1542 * struct mac_ts_info_sch - mac ts info schedule parameters
1543 * @rsvd: reserved
1544 * @schedule: schedule bit
1545 */
1546struct mac_ts_info_sch {
1547#ifndef ANI_LITTLE_BIT_ENDIAN
1548 uint8_t rsvd:7;
1549 uint8_t schedule:1;
1550#else
1551 uint8_t schedule:1;
1552 uint8_t rsvd:7;
1553#endif
Govind Singhd7468a52016-03-09 14:32:57 +05301554} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05301555
1556/**
1557 * struct mac_ts_info_sch - mac ts info schedule parameters
1558 * @traffic: mac tfc parameter
1559 * @schedule: mac schedule parameters
1560 */
1561struct mac_ts_info {
1562 struct mac_ts_info_tfc traffic;
1563 struct mac_ts_info_sch schedule;
Govind Singhd7468a52016-03-09 14:32:57 +05301564} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05301565
1566/**
1567 * struct mac_tspec_ie - mac ts spec
1568 * @type: type
1569 * @length: length
1570 * @tsinfo: tsinfo
1571 * @nomMsduSz: nomMsduSz
1572 * @maxMsduSz: maxMsduSz
1573 * @minSvcInterval: minSvcInterval
1574 * @maxSvcInterval: maxSvcInterval
1575 * @inactInterval: inactInterval
1576 * @suspendInterval: suspendInterval
1577 * @svcStartTime: svcStartTime
1578 * @minDataRate: minDataRate
1579 * @meanDataRate: meanDataRate
1580 * @peakDataRate: peakDataRate
1581 * @maxBurstSz: maxBurstSz
1582 * @delayBound: delayBound
1583 * @minPhyRate: minPhyRate
1584 * @surplusBw: surplusBw
1585 * @mediumTime: mediumTime
1586 */
1587struct mac_tspec_ie {
1588 uint8_t type;
1589 uint8_t length;
1590 struct mac_ts_info tsinfo;
1591 uint16_t nomMsduSz;
1592 uint16_t maxMsduSz;
1593 uint32_t minSvcInterval;
1594 uint32_t maxSvcInterval;
1595 uint32_t inactInterval;
1596 uint32_t suspendInterval;
1597 uint32_t svcStartTime;
1598 uint32_t minDataRate;
1599 uint32_t meanDataRate;
1600 uint32_t peakDataRate;
1601 uint32_t maxBurstSz;
1602 uint32_t delayBound;
1603 uint32_t minPhyRate;
1604 uint16_t surplusBw;
1605 uint16_t mediumTime;
Govind Singhd7468a52016-03-09 14:32:57 +05301606} qdf_packed;
Govind Singhae855362016-03-07 14:24:22 +05301607
1608/**
1609 * struct add_ts_param - ADDTS related parameters
1610 * @staIdx: station index
1611 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
1612 * @tspec: tspec value
1613 * @status: CDF status
1614 * @sessionId: session id
Govind Singhd7468a52016-03-09 14:32:57 +05301615 * @tsm_interval: TSM interval period passed from UMAC to WMI
Govind Singhae855362016-03-07 14:24:22 +05301616 * @setRICparams: RIC parameters
1617 * @sme_session_id: sme session id
1618 */
1619struct add_ts_param {
1620 uint16_t staIdx;
1621 uint16_t tspecIdx;
1622 struct mac_tspec_ie tspec;
Govind Singhd7468a52016-03-09 14:32:57 +05301623 QDF_STATUS status;
Govind Singhae855362016-03-07 14:24:22 +05301624 uint8_t sessionId;
1625#ifdef FEATURE_WLAN_ESE
1626 uint16_t tsm_interval;
1627#endif /* FEATURE_WLAN_ESE */
1628#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1629 uint8_t setRICparams;
1630#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
1631 uint8_t sme_session_id;
1632};
1633
1634/**
1635 * struct delts_req_info - DELTS request parameter
1636 * @tsinfo: ts info
1637 * @tspec: ts spec
1638 * @wmeTspecPresent: wme ts spec flag
1639 * @wsmTspecPresent: wsm ts spec flag
1640 * @lleTspecPresent: lle ts spec flag
1641 */
1642struct delts_req_info {
1643 struct mac_ts_info tsinfo;
1644 struct mac_tspec_ie tspec;
1645 uint8_t wmeTspecPresent:1;
1646 uint8_t wsmTspecPresent:1;
1647 uint8_t lleTspecPresent:1;
1648};
1649
1650/**
1651 * struct del_ts_params - DELTS related parameters
1652 * @staIdx: station index
1653 * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
1654 * @bssId: BSSID
1655 * @sessionId: session id
1656 * @userPrio: user priority
1657 * @delTsInfo: DELTS info
1658 * @setRICparams: RIC parameters
1659 */
1660struct del_ts_params {
1661 uint16_t staIdx;
1662 uint16_t tspecIdx;
Govind Singh8675b862016-03-28 22:09:18 +05301663 uint8_t bssId[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05301664 uint8_t sessionId;
1665 uint8_t userPrio;
1666#ifdef WLAN_FEATURE_ROAM_OFFLOAD
1667 struct delts_req_info delTsInfo;
1668 uint8_t setRICparams;
1669#endif /* WLAN_FEATURE_ROAM_OFFLOAD */
1670};
1671
1672/**
1673 * struct ll_stats_clear_params - ll stats clear parameter
1674 * @req_id: request id
1675 * @sta_id: sta id
1676 * @stats_clear_mask: stats clear mask
1677 * @stop_req: stop request
1678 */
1679struct ll_stats_clear_params {
1680 uint32_t req_id;
1681 uint8_t sta_id;
1682 uint32_t stats_clear_mask;
1683 uint8_t stop_req;
1684};
1685
1686/**
1687 * struct ll_stats_set_params - ll stats get parameter
1688 * @req_id: request id
1689 * @sta_id: sta id
1690 * @mpdu_size_threshold: mpdu sixe threshold
1691 * @aggressive_statistics_gathering: aggressive_statistics_gathering
1692 */
1693struct ll_stats_set_params {
1694 uint32_t req_id;
1695 uint8_t sta_id;
1696 uint32_t mpdu_size_threshold;
1697 uint32_t aggressive_statistics_gathering;
1698};
1699
1700/**
1701 * struct ll_stats_get_params - ll stats parameter
1702 * @req_id: request id
1703 * @sta_id: sta id
1704 * @param_id_mask: param is mask
1705 */
1706struct ll_stats_get_params {
1707 uint32_t req_id;
1708 uint8_t sta_id;
1709 uint32_t param_id_mask;
1710};
1711
1712/**
1713 * struct pe_stats_req - pe stats parameter
1714 * @msg_type: message type is same as the request type
1715 * @msg_len: length of the entire request
1716 * @sta_id: Per STA stats request must contain valid
1717 * @stats_mask: categories of stats requested
1718 * @session_id: wsm ts spec flag
1719 */
1720struct pe_stats_req {
1721 /* Common for all types are requests */
1722 uint16_t msg_type;
1723 uint16_t msg_len;
1724 uint32_t sta_id;
1725 /* categories of stats requested. look at ePEStatsMask */
1726 uint32_t stats_mask;
1727 uint8_t session_id;
1728};
1729
1730/**
1731 * struct link_status_params - link stats parameter
1732 * @msg_type: message type is same as the request type
1733 * @msg_len: length of the entire request
1734 * @link_status: wme ts spec flag
1735 * @session_id: wsm ts spec flag
1736 */
1737struct link_status_params {
1738 uint16_t msg_type;
1739 uint16_t msg_len;
1740 uint8_t link_status;
1741 uint8_t session_id;
1742};
1743
1744/**
1745 * struct dhcp_stop_ind_params - DHCP Stop indication message
1746 * @msgtype: message type is same as the request type
1747 * @msglen: length of the entire request
1748 * @device_mode: Mode of the device(ex:STA, AP)
1749 * @adapter_macaddr: MAC address of the adapter
1750 * @peer_macaddr: MAC address of the connected peer
1751 */
1752struct dhcp_stop_ind_params {
1753 uint16_t msgtype;
1754 uint16_t msglen;
1755 uint8_t device_mode;
Govind Singhd7468a52016-03-09 14:32:57 +05301756 struct qdf_mac_addr adapter_macaddr;
1757 struct qdf_mac_addr peer_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05301758};
1759
1760/**
1761 * struct aggr_add_ts_param - ADDTS parameters
1762 * @staIdx: station index
1763 * @tspecIdx: TSPEC handler uniquely identifying a TSPEC for a STA in a BSS
1764 * @tspec: tspec value
1765 * @status: CDF status
1766 * @sessionId: session id
1767 */
1768struct aggr_add_ts_param {
1769 uint16_t staIdx;
1770 uint16_t tspecIdx;
1771 struct mac_tspec_ie tspec[WMI_QOS_NUM_AC_MAX];
Govind Singhd7468a52016-03-09 14:32:57 +05301772 QDF_STATUS status[WMI_QOS_NUM_AC_MAX];
Govind Singhae855362016-03-07 14:24:22 +05301773 uint8_t sessionId;
1774};
1775
1776#define WMI_MAX_FILTER_TEST_DATA_LEN 8
1777#define WMI_MAX_NUM_MULTICAST_ADDRESS 240
1778#define WMI_MAX_NUM_FILTERS 20
1779#define WMI_MAX_NUM_TESTS_PER_FILTER 10
1780
1781/**
1782 * enum packet_filter_type - packet filter type
1783 * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
1784 * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
1785 * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
1786 * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
1787 */
1788enum packet_filter_type {
1789 WMI_RCV_FILTER_TYPE_INVALID,
1790 WMI_RCV_FILTER_TYPE_FILTER_PKT,
1791 WMI_RCV_FILTER_TYPE_BUFFER_PKT,
1792 WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
1793};
1794
1795/**
1796 * enum packet_protocol_type - packet protocol type
1797 * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
1798 * @WMI_FILTER_HDR_TYPE_MAC: mac type
1799 * @WMI_FILTER_HDR_TYPE_ARP: trp type
1800 * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
1801 * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
1802 * @WMI_FILTER_HDR_TYPE_UDP: udp type
1803 * @WMI_FILTER_HDR_TYPE_MAX: max type
1804 */
1805enum packet_protocol_type {
1806 WMI_FILTER_HDR_TYPE_INVALID,
1807 WMI_FILTER_HDR_TYPE_MAC,
1808 WMI_FILTER_HDR_TYPE_ARP,
1809 WMI_FILTER_HDR_TYPE_IPV4,
1810 WMI_FILTER_HDR_TYPE_IPV6,
1811 WMI_FILTER_HDR_TYPE_UDP,
1812 WMI_FILTER_HDR_TYPE_MAX
1813};
1814
1815/**
1816 * enum packet_filter_comp_type - packet filter comparison type
1817 * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
1818 * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
1819 * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
1820 * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
1821 * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
1822 * @WMI_FILTER_CMP_TYPE_MAX: max type
1823 */
1824enum packet_filter_comp_type {
1825 WMI_FILTER_CMP_TYPE_INVALID,
1826 WMI_FILTER_CMP_TYPE_EQUAL,
1827 WMI_FILTER_CMP_TYPE_MASK_EQUAL,
1828 WMI_FILTER_CMP_TYPE_NOT_EQUAL,
1829 WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
1830 WMI_FILTER_CMP_TYPE_MAX
1831};
1832
1833/**
1834 * struct rcv_pkt_filter_params - recieve packet filter parameters
1835 * @protocolLayer - protocol layer
1836 * @cmpFlag - comparison flag
1837 * @dataLength - data length
1838 * @dataOffset - data offset
1839 * @reserved - resserved
1840 * @compareData - compare data
1841 * @dataMask - data mask
1842 */
1843struct rcv_pkt_filter_params {
1844 enum packet_protocol_type protocolLayer;
1845 enum packet_filter_comp_type cmpFlag;
1846 uint16_t dataLength;
1847 uint8_t dataOffset;
1848 uint8_t reserved;
1849 uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
1850 uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
1851};
1852
1853/**
1854 * struct rcv_pkt_filter_config - recieve packet filter info
1855 * @filterId - filter id
1856 * @filterType - filter type
1857 * @numFieldParams - no of fields
1858 * @coalesceTime - reserved parameter
1859 * @self_macaddr - self mac address
1860 * @bssid - Bssid of the connected AP
1861 * @paramsData - data parameter
1862 */
1863struct rcv_pkt_filter_config {
1864 uint8_t filterId;
1865 enum packet_filter_type filterType;
1866 uint32_t numFieldParams;
1867 uint32_t coalesceTime;
Govind Singhd7468a52016-03-09 14:32:57 +05301868 struct qdf_mac_addr self_macaddr;
1869 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05301870 struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
1871};
1872
1873/**
1874 * struct vdev_ie_info_param - IE info
1875 * @vdev_id - vdev for which the IE is being sent
1876 * @ie_id - ID of the IE
1877 * @length - length of the IE data
1878 * @data - IE data
1879 *
1880 * This structure is used to store the IE information.
1881 */
1882struct vdev_ie_info_param {
1883 uint32_t vdev_id;
1884 uint32_t ie_id;
1885 uint32_t length;
1886 uint8_t *data;
1887};
1888
1889#define WMI_MAX_NUM_FW_SEGMENTS 4
1890
1891/**
1892 * struct fw_dump_seg_req_param - individual segment details
1893 * @seg_id - segment id.
1894 * @seg_start_addr_lo - lower address of the segment.
1895 * @seg_start_addr_hi - higher address of the segment.
1896 * @seg_length - length of the segment.
1897 * @dst_addr_lo - lower address of the destination buffer.
1898 * @dst_addr_hi - higher address of the destination buffer.
1899 *
1900 * This structure carries the information to firmware about the
1901 * individual segments. This structure is part of firmware memory
1902 * dump request.
1903 */
1904struct fw_dump_seg_req_param {
1905 uint8_t seg_id;
1906 uint32_t seg_start_addr_lo;
1907 uint32_t seg_start_addr_hi;
1908 uint32_t seg_length;
1909 uint32_t dst_addr_lo;
1910 uint32_t dst_addr_hi;
1911};
1912
1913/**
1914 * struct fw_dump_req_param - firmware memory dump request details.
1915 * @request_id - request id.
1916 * @num_seg - requested number of segments.
1917 * @fw_dump_seg_req - individual segment information.
1918 *
1919 * This structure carries information about the firmware
1920 * memory dump request.
1921 */
1922struct fw_dump_req_param {
1923 uint32_t request_id;
1924 uint32_t num_seg;
1925 struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
1926};
1927
1928#define WMI_TDLS_MAX_SUPP_CHANNELS 128
1929#define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
1930#define WMI_2_4_GHZ_MAX_FREQ 3000
1931
1932/**
1933 * struct tdls_update_ch_params - channel parameters
1934 * @chanId: ID of the channel
1935 * @pwr: power level
1936 * @dfsSet: is dfs supported or not
1937 * @half_rate: is the channel operating at 10MHz
1938 * @quarter_rate: is the channel operating at 5MHz
1939 */
1940struct tdls_update_ch_params {
1941 uint8_t chanId;
1942 uint8_t pwr;
1943 bool dfsSet;
1944 bool half_rate;
1945 bool quarter_rate;
1946};
1947
1948/**
1949 * struct tdls_peer_cap_params - TDLS peer capablities parameters
1950 * @isPeerResponder: is peer responder or not
1951 * @peerUapsdQueue: peer uapsd queue
1952 * @peerMaxSp: peer max SP value
1953 * @peerBuffStaSupport: peer buffer sta supported or not
1954 * @peerOffChanSupport: peer offchannel support
1955 * @peerCurrOperClass: peer current operating class
1956 * @selfCurrOperClass: self current operating class
1957 * @peerChanLen: peer channel length
1958 * @peerChan: peer channel list
1959 * @peerOperClassLen: peer operating class length
1960 * @peerOperClass: peer operating class
1961 * @prefOffChanNum: peer offchannel number
1962 * @prefOffChanBandwidth: peer offchannel bandwidth
1963 * @opClassForPrefOffChan: operating class for offchannel
1964 */
1965struct tdls_peer_cap_params {
1966 uint8_t isPeerResponder;
1967 uint8_t peerUapsdQueue;
1968 uint8_t peerMaxSp;
1969 uint8_t peerBuffStaSupport;
1970 uint8_t peerOffChanSupport;
1971 uint8_t peerCurrOperClass;
1972 uint8_t selfCurrOperClass;
1973 uint8_t peerChanLen;
1974 struct tdls_update_ch_params peerChan[WMI_TDLS_MAX_SUPP_CHANNELS];
1975 uint8_t peerOperClassLen;
1976 uint8_t peerOperClass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
1977 uint8_t prefOffChanNum;
1978 uint8_t prefOffChanBandwidth;
1979 uint8_t opClassForPrefOffChan;
1980};
1981
1982/**
1983 * struct tdls_peer_state_params - TDLS peer state parameters
1984 * @vdevId: vdev id
1985 * @peerMacAddr: peer mac address
1986 * @peerCap: peer capabality
1987 */
1988struct tdls_peer_state_params {
1989 uint32_t vdevId;
Govind Singh8675b862016-03-28 22:09:18 +05301990 uint8_t peerMacAddr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05301991 uint32_t peerState;
1992 struct tdls_peer_cap_params peerCap;
1993};
1994
1995/**
1996 * struct wmi_tdls_params - TDLS parameters
1997 * @vdev_id: vdev id
1998 * @tdls_state: TDLS state
1999 * @notification_interval_ms: notification inerval
2000 * @tx_discovery_threshold: tx discovery threshold
2001 * @tx_teardown_threshold: tx teardown threashold
2002 * @rssi_teardown_threshold: RSSI teardown threshold
2003 * @rssi_delta: RSSI delta
2004 * @tdls_options: TDLS options
2005 * @peer_traffic_ind_window: raffic indication window
2006 * @peer_traffic_response_timeout: traffic response timeout
2007 * @puapsd_mask: uapsd mask
2008 * @puapsd_inactivity_time: uapsd inactivity time
2009 * @puapsd_rx_frame_threshold: uapsd rx frame threshold
2010 * @teardown_notification_ms: tdls teardown notification interval
2011 * @tdls_peer_kickout_threshold: tdls packet threshold for
2012 * peer kickout operation
2013 */
2014struct wmi_tdls_params {
2015 uint32_t vdev_id;
2016 uint32_t tdls_state;
2017 uint32_t notification_interval_ms;
2018 uint32_t tx_discovery_threshold;
2019 uint32_t tx_teardown_threshold;
2020 int32_t rssi_teardown_threshold;
2021 int32_t rssi_delta;
2022 uint32_t tdls_options;
2023 uint32_t peer_traffic_ind_window;
2024 uint32_t peer_traffic_response_timeout;
2025 uint32_t puapsd_mask;
2026 uint32_t puapsd_inactivity_time;
2027 uint32_t puapsd_rx_frame_threshold;
2028 uint32_t teardown_notification_ms;
2029 uint32_t tdls_peer_kickout_threshold;
2030};
2031
2032/**
2033 * struct tdls_chan_switch_params - channel switch parameter structure
2034 * @vdev_id: vdev ID
2035 * @peer_mac_addr: Peer mac address
2036 * @tdls_off_ch_bw_offset: Target off-channel bandwitdh offset
2037 * @tdls_off_ch: Target Off Channel
2038 * @oper_class: Operating class for target channel
2039 * @is_responder: Responder or initiator
2040 */
2041struct tdls_channel_switch_params {
2042 uint32_t vdev_id;
Govind Singh8675b862016-03-28 22:09:18 +05302043 uint8_t peer_mac_addr[IEEE80211_ADDR_LEN];
Govind Singhae855362016-03-07 14:24:22 +05302044 uint16_t tdls_off_ch_bw_offset;
2045 uint8_t tdls_off_ch;
2046 uint8_t tdls_sw_mode;
2047 uint8_t oper_class;
2048 uint8_t is_responder;
2049};
2050
2051/**
2052 * struct dhcp_offload_info_params - dhcp offload parameters
2053 * @vdev_id: request data length
2054 * @dhcpSrvOffloadEnabled: dhcp offload enabled
2055 * @dhcpClientNum: dhcp client no
2056 * @dhcpSrvIP: dhcp server ip
2057 */
2058struct dhcp_offload_info_params {
2059 uint32_t vdev_id;
2060 uint32_t dhcpSrvOffloadEnabled;
2061 uint32_t dhcpClientNum;
2062 uint32_t dhcpSrvIP;
2063};
2064
2065/**
2066 * struct nan_req_params - NAN request params
2067 * @request_data_len: request data length
2068 * @request_data: request data
2069 */
2070struct nan_req_params {
2071 uint16_t request_data_len;
2072 uint8_t request_data[];
2073};
2074
2075
2076/**
2077 * struct app_type2_params - app type2parameter
2078 * @vdev_id: vdev id
2079 * @rc4_key: rc4 key
2080 * @rc4_key_len: rc4 key length
2081 * @ip_id: NC id
2082 * @ip_device_ip: NC IP addres
2083 * @ip_server_ip: Push server IP address
2084 * @tcp_src_port: NC TCP port
2085 * @tcp_dst_port: Push server TCP port
2086 * @tcp_seq: tcp sequence
2087 * @tcp_ack_seq: tcp ack sequence
2088 * @keepalive_init: Initial ping interval
2089 * @keepalive_min: Minimum ping interval
2090 * @keepalive_max: Maximum ping interval
2091 * @keepalive_inc: Increment of ping interval
2092 * @gateway_mac: gateway mac address
2093 * @tcp_tx_timeout_val: tcp tx timeout value
2094 * @tcp_rx_timeout_val: tcp rx timeout value
2095 */
2096struct app_type2_params {
2097 uint8_t vdev_id;
2098 uint8_t rc4_key[16];
2099 uint32_t rc4_key_len;
2100 /** ip header parameter */
2101 uint32_t ip_id;
2102 uint32_t ip_device_ip;
2103 uint32_t ip_server_ip;
2104 /** tcp header parameter */
2105 uint16_t tcp_src_port;
2106 uint16_t tcp_dst_port;
2107 uint32_t tcp_seq;
2108 uint32_t tcp_ack_seq;
2109 uint32_t keepalive_init;
2110 uint32_t keepalive_min;
2111 uint32_t keepalive_max;
2112 uint32_t keepalive_inc;
Govind Singhd7468a52016-03-09 14:32:57 +05302113 struct qdf_mac_addr gateway_mac;
Govind Singhae855362016-03-07 14:24:22 +05302114 uint32_t tcp_tx_timeout_val;
2115 uint32_t tcp_rx_timeout_val;
2116};
2117
2118/**
2119 * struct app_type1_params - app type1 parameter
2120 * @vdev_id: vdev id
2121 * @wakee_mac_addr: mac address
2122 * @identification_id: identification id
2123 * @password: password
2124 * @id_length: id length
2125 * @pass_length: password length
2126 */
2127struct app_type1_params {
2128 uint8_t vdev_id;
Govind Singhd7468a52016-03-09 14:32:57 +05302129 struct qdf_mac_addr wakee_mac_addr;
Govind Singhae855362016-03-07 14:24:22 +05302130 uint8_t identification_id[8];
2131 uint8_t password[16];
2132 uint32_t id_length;
2133 uint32_t pass_length;
2134};
2135
2136/**
2137 * enum wmi_ext_wow_type - wow type
2138 * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
2139 * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
2140 * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
2141 */
2142enum wmi_ext_wow_type {
2143 WMI_EXT_WOW_TYPE_APP_TYPE1,
2144 WMI_EXT_WOW_TYPE_APP_TYPE2,
2145 WMI_EXT_WOW_TYPE_APP_TYPE1_2,
2146};
2147
2148/**
2149 * struct ext_wow_params - ext wow parameters
2150 * @vdev_id: vdev id
2151 * @type: wow type
2152 * @wakeup_pin_num: wake up gpio no
2153 */
2154struct ext_wow_params {
2155 uint8_t vdev_id;
2156 enum wmi_ext_wow_type type;
2157 uint32_t wakeup_pin_num;
2158};
2159
2160/**
2161 * struct stats_ext_params - ext stats request
2162 * @vdev_id: vdev id
2163 * @request_data_len: request data length
2164 * @request_data: request data
2165 */
2166struct stats_ext_params {
2167 uint32_t vdev_id;
2168 uint32_t request_data_len;
2169 uint8_t request_data[];
2170};
2171
2172#define WMI_PERIODIC_TX_PTRN_MAX_SIZE 1536
2173/**
2174 * struct periodic_tx_pattern - periodic tx pattern
2175 * @mac_address: MAC Address for the adapter
2176 * @ucPtrnId: Pattern ID
2177 * @ucPtrnSize: Pattern size
2178 * @usPtrnIntervalMs: in ms
2179 * @ucPattern: Pattern buffer
2180 */
2181struct periodic_tx_pattern {
Govind Singhd7468a52016-03-09 14:32:57 +05302182 struct qdf_mac_addr mac_address;
Govind Singhae855362016-03-07 14:24:22 +05302183 uint8_t ucPtrnId;
2184 uint16_t ucPtrnSize;
2185 uint32_t usPtrnIntervalMs;
2186 uint8_t ucPattern[WMI_PERIODIC_TX_PTRN_MAX_SIZE];
2187};
2188
2189#define WMI_GTK_OFFLOAD_KEK_BYTES 16
2190#define WMI_GTK_OFFLOAD_KCK_BYTES 16
Siddarth Poddard9221542016-04-01 17:45:06 +05302191#define WMI_GTK_OFFLOAD_ENABLE 0
2192#define WMI_GTK_OFFLOAD_DISABLE 1
Govind Singhae855362016-03-07 14:24:22 +05302193
2194/**
2195 * struct gtk_offload_params - gtk offload parameters
2196 * @ulFlags: optional flags
2197 * @aKCK: Key confirmation key
2198 * @aKEK: key encryption key
2199 * @ullKeyReplayCounter: replay counter
2200 * @bssid: bss id
2201 */
2202struct gtk_offload_params {
2203 uint32_t ulFlags;
2204 uint8_t aKCK[WMI_GTK_OFFLOAD_KCK_BYTES];
2205 uint8_t aKEK[WMI_GTK_OFFLOAD_KEK_BYTES];
2206 uint64_t ullKeyReplayCounter;
Govind Singhd7468a52016-03-09 14:32:57 +05302207 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302208};
2209
2210/**
2211 * struct flashing_req_params - led flashing parameter
2212 * @reqId: request id
2213 * @pattern_id: pattern identifier. 0: disconnected 1: connected
2214 * @led_x0: led flashing parameter0
2215 * @led_x1: led flashing parameter1
2216 */
2217struct flashing_req_params {
2218 uint32_t req_id;
2219 uint32_t pattern_id;
2220 uint32_t led_x0;
2221 uint32_t led_x1;
2222};
2223
2224struct wmi_host_mem_chunk {
2225 uint32_t *vaddr;
2226 uint32_t paddr;
Govind Singhd7468a52016-03-09 14:32:57 +05302227 qdf_dma_mem_context(memctx);
Govind Singhae855362016-03-07 14:24:22 +05302228 uint32_t len;
2229 uint32_t req_id;
2230};
2231
2232struct target_resource_config {
2233 uint32_t num_vdevs;
2234 uint32_t num_peers;
2235 uint32_t num_active_peers;
2236 uint32_t num_offload_peers;
2237 uint32_t num_offload_reorder_buffs;
2238 uint32_t num_peer_keys;
2239 uint32_t num_tids;
2240 uint32_t ast_skid_limit;
2241 uint32_t tx_chain_mask;
2242 uint32_t rx_chain_mask;
2243 uint32_t rx_timeout_pri[4];
2244 uint32_t rx_decap_mode;
2245 uint32_t scan_max_pending_req;
2246 uint32_t bmiss_offload_max_vdev;
2247 uint32_t roam_offload_max_vdev;
2248 uint32_t roam_offload_max_ap_profiles;
2249 uint32_t num_mcast_groups;
2250 uint32_t num_mcast_table_elems;
2251 uint32_t mcast2ucast_mode;
2252 uint32_t tx_dbg_log_size;
2253 uint32_t num_wds_entries;
2254 uint32_t dma_burst_size;
2255 uint32_t mac_aggr_delim;
2256 uint32_t rx_skip_defrag_timeout_dup_detection_check;
2257 uint32_t vow_config;
2258 uint32_t gtk_offload_max_vdev;
2259 uint32_t num_msdu_desc; /* Number of msdu desc */
2260 uint32_t max_frag_entries;
2261 /* End common */
2262
2263 /* Added in MCL */
2264 uint32_t num_tdls_vdevs;
2265 uint32_t num_tdls_conn_table_entries;
2266 uint32_t beacon_tx_offload_max_vdev;
2267 uint32_t num_multicast_filter_entries;
2268 uint32_t num_wow_filters;
2269 uint32_t num_keep_alive_pattern;
2270 uint32_t keep_alive_pattern_size;
2271 uint32_t max_tdls_concurrent_sleep_sta;
2272 uint32_t max_tdls_concurrent_buffer_sta;
2273 uint32_t wmi_send_separate;
2274 uint32_t num_ocb_vdevs;
2275 uint32_t num_ocb_channels;
2276 uint32_t num_ocb_schedules;
2277};
2278
2279/**
2280 * struct wmi_wifi_start_log - Structure to store the params sent to start/
2281 * stop logging
2282 * @name: Attribute which indicates the type of logging like per packet
2283 * statistics, connectivity etc.
2284 * @verbose_level: Verbose level which can be 0,1,2,3
2285 * @flag: Flag field for future use
2286 */
2287struct wmi_wifi_start_log {
2288 uint32_t ring_id;
2289 uint32_t verbose_level;
2290 uint32_t flag;
2291};
2292
2293/**
2294 * struct wmi_pcl_list - Format of PCL
2295 * @pcl_list: List of preferred channels
2296 * @pcl_len: Number of channels in the PCL
2297 */
2298struct wmi_pcl_list {
2299 uint8_t pcl_list[128];
2300 uint32_t pcl_len;
2301};
2302
2303/**
2304 * struct wmi_hw_mode_params - HW mode params
2305 * @mac0_tx_ss: MAC0 Tx spatial stream
2306 * @mac0_rx_ss: MAC0 Rx spatial stream
2307 * @mac1_tx_ss: MAC1 Tx spatial stream
2308 * @mac1_rx_ss: MAC1 Rx spatial stream
2309 * @mac0_bw: MAC0 bandwidth
2310 * @mac1_bw: MAC1 bandwidth
2311 * @dbs_cap: DBS capabality
2312 * @agile_dfs_cap: Agile DFS capabality
2313 */
2314struct wmi_hw_mode_params {
2315 uint8_t mac0_tx_ss;
2316 uint8_t mac0_rx_ss;
2317 uint8_t mac1_tx_ss;
2318 uint8_t mac1_rx_ss;
2319 uint8_t mac0_bw;
2320 uint8_t mac1_bw;
2321 uint8_t dbs_cap;
2322 uint8_t agile_dfs_cap;
2323};
2324
2325/**
2326 * struct wmi_dual_mac_config - Dual MAC configuration
2327 * @scan_config: Scan configuration
2328 * @fw_mode_config: FW mode configuration
2329 * @set_dual_mac_cb: Callback function to be executed on response to the command
2330 */
2331struct wmi_dual_mac_config {
2332 uint32_t scan_config;
2333 uint32_t fw_mode_config;
2334 void *set_dual_mac_cb;
2335};
2336
2337#ifdef WLAN_NS_OFFLOAD
2338/**
2339 * struct ns_offload_req_params - ns offload request paramter
2340 * @srcIPv6Addr: src ipv6 address
2341 * @selfIPv6Addr: self ipv6 address
2342 * @targetIPv6Addr: target ipv6 address
2343 * @self_macaddr: self mac address
2344 * @srcIPv6AddrValid: src ipv6 address valid flag
2345 * @targetIPv6AddrValid: target ipv6 address valid flag
2346 * @slotIdx: slot index
2347 */
2348struct ns_offload_req_params {
2349 uint8_t srcIPv6Addr[WMI_MAC_IPV6_ADDR_LEN];
2350 uint8_t selfIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
2351 uint8_t targetIPv6Addr[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][WMI_MAC_IPV6_ADDR_LEN];
Govind Singhd7468a52016-03-09 14:32:57 +05302352 struct qdf_mac_addr self_macaddr;
Govind Singhae855362016-03-07 14:24:22 +05302353 uint8_t srcIPv6AddrValid;
2354 uint8_t targetIPv6AddrValid[WMI_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA];
2355 uint8_t slotIdx;
2356};
2357#endif /* WLAN_NS_OFFLOAD */
2358
2359/**
2360 * struct host_offload_req_param - arp offload parameter
2361 * @offloadType: offload type
2362 * @enableOrDisable: enable or disable
2363 * @num_ns_offload_count: offload count
2364 */
2365struct host_offload_req_param {
2366 uint8_t offloadType;
2367 uint8_t enableOrDisable;
2368 uint32_t num_ns_offload_count;
2369 union {
2370 uint8_t hostIpv4Addr[WMI_IPV4_ADDR_LEN];
2371 uint8_t hostIpv6Addr[WMI_MAC_IPV6_ADDR_LEN];
2372 } params;
2373#ifdef WLAN_NS_OFFLOAD
2374 struct ns_offload_req_params nsOffloadInfo;
2375#endif /* WLAN_NS_OFFLOAD */
Govind Singhd7468a52016-03-09 14:32:57 +05302376 struct qdf_mac_addr bssid;
Govind Singhae855362016-03-07 14:24:22 +05302377};
2378
2379/**
2380 * struct ssid_hotlist_param - param for SSID Hotlist
2381 * @ssid: SSID which is being hotlisted
2382 * @band: Band in which the given SSID should be scanned
2383 * @rssi_low: Low bound on RSSI
2384 * @rssi_high: High bound on RSSI
2385 */
2386struct ssid_hotlist_param {
2387 struct mac_ssid ssid;
2388 uint8_t band;
2389 int32_t rssi_low;
2390 int32_t rssi_high;
2391};
2392
2393/**
Himanshu Agarwal5f2d0482016-03-09 15:25:44 +05302394 * struct roam_scan_filter_params - Structure holding roaming scan
2395 * parameters
2396 * @len: length
2397 * @op_bitmap: bitmap to determine reason of roaming
2398 * @session_id: vdev id
2399 * @num_bssid_black_list: The number of BSSID's that we should
2400 * avoid connecting to. It is like a
2401 * blacklist of BSSID's.
2402 * @num_ssid_white_list: The number of SSID profiles that are
2403 * in the Whitelist. When roaming, we
2404 * consider the BSSID's with this SSID
2405 * also for roaming apart from the connected one's
2406 * @num_bssid_preferred_list: Number of BSSID's which have a preference over
2407 * others
2408 * @bssid_avoid_list: Blacklist SSID's
2409 * @ssid_allowed_list: Whitelist SSID's
2410 * @bssid_favored: Favorable BSSID's
2411 * @bssid_favored_factor: RSSI to be added to this BSSID to prefer it
2412 *
2413 * This structure holds all the key parameters related to
2414 * initial connection and roaming connections.
2415 */
2416
2417struct roam_scan_filter_params {
2418 uint32_t len;
2419 uint32_t op_bitmap;
2420 uint8_t session_id;
2421 uint32_t num_bssid_black_list;
2422 uint32_t num_ssid_white_list;
2423 uint32_t num_bssid_preferred_list;
2424 struct qdf_mac_addr bssid_avoid_list[MAX_BSSID_AVOID_LIST];
2425 struct mac_ssid ssid_allowed_list[MAX_SSID_ALLOWED_LIST];
2426 struct qdf_mac_addr bssid_favored[MAX_BSSID_FAVORED];
2427 uint8_t bssid_favored_factor[MAX_BSSID_FAVORED];
2428};
2429
2430/**
Govind Singhae855362016-03-07 14:24:22 +05302431 * struct ssid_hotlist_request_params - set SSID hotlist request struct
2432 * @request_id: ID of the request
2433 * @session_id: ID of the session
2434 * @lost_ssid_sample_size: Number of consecutive scans in which the SSID
2435 * must not be seen in order to consider the SSID "lost"
2436 * @ssid_count: Number of valid entries in the @ssids array
2437 * @ssids: Array that defines the SSIDs that are in the hotlist
2438 */
2439struct ssid_hotlist_request_params {
2440 uint32_t request_id;
2441 uint8_t session_id;
2442 uint32_t lost_ssid_sample_size;
2443 uint32_t ssid_count;
2444 struct ssid_hotlist_param ssids[WMI_EXTSCAN_MAX_HOTLIST_SSIDS];
2445};
2446
2447/**
2448 * struct wmi_unit_test_cmd - unit test command parameters
2449 * @vdev_id: vdev id
2450 * @module_id: module id
2451 * @num_args: number of arguments
2452 * @args: arguments
2453 */
2454struct wmi_unit_test_cmd {
2455 uint32_t vdev_id;
2456 WLAN_MODULE_ID module_id;
2457 uint32_t num_args;
2458 uint32_t args[WMI_MAX_NUM_ARGS];
2459};
2460
2461/**
2462 * struct wmi_roam_invoke_cmd - roam invoke command
2463 * @vdev_id: vdev id
2464 * @bssid: mac address
2465 * @channel: channel
2466 */
2467struct wmi_roam_invoke_cmd {
2468 uint32_t vdev_id;
2469 uint8_t bssid[IEEE80211_ADDR_LEN];
2470 uint32_t channel;
2471};
2472
2473/**
2474 * struct ext_scan_setbssi_hotlist_params - set hotlist request
2475 * @requestId: request identifier
2476 * @sessionId: session identifier
2477 * @lost_ap_sample_size: number of samples to confirm AP loss
2478 * @numAp: Number of hotlist APs
2479 * @ap: hotlist APs
2480 */
2481struct ext_scan_setbssi_hotlist_params {
2482 uint32_t requestId;
2483 uint8_t sessionId;
2484
2485 uint32_t lost_ap_sample_size;
2486 uint32_t numAp;
2487 struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
2488};
Govind Singh3ddda1f2016-03-09 11:34:12 +05302489#endif /* _WMI_UNIFIED_PARAM_H_ */
2490