1 /******************************************************************************
3 * This file is provided under a dual BSD/GPLv2 license. When using or
4 * redistributing this file, you may do so under either license.
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
10 * Copyright(c) 2016 Intel Deutschland GmbH
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of version 2 of the GNU General Public License as
14 * published by the Free Software Foundation.
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110,
26 * The full GNU General Public License is included in this distribution
27 * in the file called COPYING.
29 * Contact Information:
30 * Intel Linux Wireless <linuxwifi@intel.com>
31 * Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
35 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
36 * Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
37 * All rights reserved.
39 * Redistribution and use in source and binary forms, with or without
40 * modification, are permitted provided that the following conditions
43 * * Redistributions of source code must retain the above copyright
44 * notice, this list of conditions and the following disclaimer.
45 * * Redistributions in binary form must reproduce the above copyright
46 * notice, this list of conditions and the following disclaimer in
47 * the documentation and/or other materials provided with the
49 * * Neither the name Intel Corporation nor the names of its
50 * contributors may be used to endorse or promote products derived
51 * from this software without specific prior written permission.
53 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
54 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
55 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
56 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
57 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
58 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
59 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
60 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
61 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
62 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
63 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
65 *****************************************************************************/
67 #ifndef __fw_api_scan_h__
68 #define __fw_api_scan_h__
72 /* Scan Commands, Responses, Notifications */
74 /* Max number of IEs for direct SSID scans in a command */
75 #define PROBE_OPTION_MAX 20
78 * struct iwl_ssid_ie - directed scan network information element
80 * Up to 20 of these may appear in REPLY_SCAN_CMD,
81 * selected by "type" bit field in struct iwl_scan_channel;
82 * each channel may select different ssids from among the 20 entries.
83 * SSID IEs get transmitted in reverse order of entry.
88 u8 ssid[IEEE80211_MAX_SSID_LEN];
89 } __packed; /* SCAN_DIRECT_SSID_IE_API_S_VER_1 */
92 #define IWL_SCAN_MAX_BLACKLIST_LEN 64
93 #define IWL_SCAN_SHORT_BLACKLIST_LEN 16
94 #define IWL_SCAN_MAX_PROFILES 11
95 #define SCAN_OFFLOAD_PROBE_REQ_SIZE 512
97 /* Default watchdog (in MS) for scheduled scan iteration */
98 #define IWL_SCHED_SCAN_WATCHDOG cpu_to_le16(15000)
100 #define IWL_GOOD_CRC_TH_DEFAULT cpu_to_le16(1)
101 #define CAN_ABORT_STATUS 1
103 #define IWL_FULL_SCAN_MULTIPLIER 5
104 #define IWL_FAST_SCHED_SCAN_ITERATIONS 3
105 #define IWL_MAX_SCHED_SCAN_PLANS 2
107 enum scan_framework_client {
108 SCAN_CLIENT_SCHED_SCAN = BIT(0),
109 SCAN_CLIENT_NETDETECT = BIT(1),
110 SCAN_CLIENT_ASSET_TRACKING = BIT(2),
114 * iwl_scan_offload_blacklist - SCAN_OFFLOAD_BLACKLIST_S
115 * @ssid: MAC address to filter out
116 * @reported_rssi: AP rssi reported to the host
117 * @client_bitmap: clients ignore this entry - enum scan_framework_client
119 struct iwl_scan_offload_blacklist {
125 enum iwl_scan_offload_network_type {
126 IWL_NETWORK_TYPE_BSS = 1,
127 IWL_NETWORK_TYPE_IBSS = 2,
128 IWL_NETWORK_TYPE_ANY = 3,
131 enum iwl_scan_offload_band_selection {
132 IWL_SCAN_OFFLOAD_SELECT_2_4 = 0x4,
133 IWL_SCAN_OFFLOAD_SELECT_5_2 = 0x8,
134 IWL_SCAN_OFFLOAD_SELECT_ANY = 0xc,
138 * iwl_scan_offload_profile - SCAN_OFFLOAD_PROFILE_S
139 * @ssid_index: index to ssid list in fixed part
140 * @unicast_cipher: encryption algorithm to match - bitmap
141 * @aut_alg: authentication algorithm to match - bitmap
142 * @network_type: enum iwl_scan_offload_network_type
143 * @band_selection: enum iwl_scan_offload_band_selection
144 * @client_bitmap: clients waiting for match - enum scan_framework_client
146 struct iwl_scan_offload_profile {
157 * iwl_scan_offload_profile_cfg - SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1
158 * @blaclist: AP list to filter off from scan results
159 * @profiles: profiles to search for match
160 * @blacklist_len: length of blacklist
161 * @num_profiles: num of profiles in the list
162 * @match_notify: clients waiting for match found notification
163 * @pass_match: clients waiting for the results
164 * @active_clients: active clients bitmap - enum scan_framework_client
165 * @any_beacon_notify: clients waiting for match notification without match
167 struct iwl_scan_offload_profile_cfg {
168 struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES];
174 u8 any_beacon_notify;
179 * iwl_scan_schedule_lmac - schedule of scan offload
180 * @delay: delay between iterations, in seconds.
181 * @iterations: num of scan iterations
182 * @full_scan_mul: number of partial scans before each full scan
184 struct iwl_scan_schedule_lmac {
188 } __packed; /* SCAN_SCHEDULE_API_S */
190 enum iwl_scan_offload_complete_status {
191 IWL_SCAN_OFFLOAD_COMPLETED = 1,
192 IWL_SCAN_OFFLOAD_ABORTED = 2,
195 enum iwl_scan_ebs_status {
196 IWL_SCAN_EBS_SUCCESS,
198 IWL_SCAN_EBS_CHAN_NOT_FOUND,
199 IWL_SCAN_EBS_INACTIVE,
203 * iwl_scan_req_tx_cmd - SCAN_REQ_TX_CMD_API_S
204 * @tx_flags: combination of TX_CMD_FLG_*
205 * @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is
206 * cleared. Combination of RATE_MCS_*
207 * @sta_id: index of destination station in FW station table
208 * @reserved: for alignment and future use
210 struct iwl_scan_req_tx_cmd {
217 enum iwl_scan_channel_flags_lmac {
218 IWL_UNIFIED_SCAN_CHANNEL_FULL = BIT(27),
219 IWL_UNIFIED_SCAN_CHANNEL_PARTIAL = BIT(28),
223 * iwl_scan_channel_cfg_lmac - SCAN_CHANNEL_CFG_S_VER2
224 * @flags: bits 1-20: directed scan to i'th ssid
225 * other bits &enum iwl_scan_channel_flags_lmac
226 * @channel_number: channel number 1-13 etc
227 * @iter_count: scan iteration on this channel
228 * @iter_interval: interval in seconds between iterations on one channel
230 struct iwl_scan_channel_cfg_lmac {
234 __le32 iter_interval;
238 * iwl_scan_probe_segment - PROBE_SEGMENT_API_S_VER_1
239 * @offset: offset in the data block
240 * @len: length of the segment
242 struct iwl_scan_probe_segment {
247 /* iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_2
248 * @mac_header: first (and common) part of the probe
249 * @band_data: band specific data
250 * @common_data: last (and common) part of the probe
251 * @buf: raw data block
253 struct iwl_scan_probe_req {
254 struct iwl_scan_probe_segment mac_header;
255 struct iwl_scan_probe_segment band_data[2];
256 struct iwl_scan_probe_segment common_data;
257 u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
260 enum iwl_scan_channel_flags {
261 IWL_SCAN_CHANNEL_FLAG_EBS = BIT(0),
262 IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE = BIT(1),
263 IWL_SCAN_CHANNEL_FLAG_CACHE_ADD = BIT(2),
266 /* iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
267 * @flags: enum iwl_scan_channel_flags
268 * @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
270 * 1 - EBS is disabled.
271 * 2 - every second scan will be full scan(and so on).
273 struct iwl_scan_channel_opt {
275 __le16 non_ebs_ratio;
279 * iwl_mvm_lmac_scan_flags
280 * @IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
282 * @IWL_MVM_LMAC_SCAN_FLAG_PASSIVE: force passive scan on all channels
283 * @IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION: single channel scan
284 * @IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE: send iteration complete notification
285 * @IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS multiple SSID matching
286 * @IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented
287 * @IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report
288 * and DS parameter set IEs into probe requests.
289 * @IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL: use extended dwell time on channels
291 * @IWL_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
293 enum iwl_mvm_lmac_scan_flags {
294 IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL = BIT(0),
295 IWL_MVM_LMAC_SCAN_FLAG_PASSIVE = BIT(1),
296 IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION = BIT(2),
297 IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE = BIT(3),
298 IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS = BIT(4),
299 IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED = BIT(5),
300 IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED = BIT(6),
301 IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL = BIT(7),
302 IWL_MVM_LMAC_SCAN_FLAG_MATCH = BIT(9),
305 enum iwl_scan_priority {
306 IWL_SCAN_PRIORITY_LOW,
307 IWL_SCAN_PRIORITY_MEDIUM,
308 IWL_SCAN_PRIORITY_HIGH,
311 enum iwl_scan_priority_ext {
312 IWL_SCAN_PRIORITY_EXT_0_LOWEST,
313 IWL_SCAN_PRIORITY_EXT_1,
314 IWL_SCAN_PRIORITY_EXT_2,
315 IWL_SCAN_PRIORITY_EXT_3,
316 IWL_SCAN_PRIORITY_EXT_4,
317 IWL_SCAN_PRIORITY_EXT_5,
318 IWL_SCAN_PRIORITY_EXT_6,
319 IWL_SCAN_PRIORITY_EXT_7_HIGHEST,
323 * iwl_scan_req_lmac - SCAN_REQUEST_CMD_API_S_VER_1
324 * @reserved1: for alignment and future use
325 * @channel_num: num of channels to scan
326 * @active-dwell: dwell time for active channels
327 * @passive-dwell: dwell time for passive channels
328 * @fragmented-dwell: dwell time for fragmented passive scan
329 * @extended_dwell: dwell time for channels 1, 6 and 11 (in certain cases)
330 * @reserved2: for alignment and future use
331 * @rx_chain_selct: PHY_RX_CHAIN_* flags
332 * @scan_flags: &enum iwl_mvm_lmac_scan_flags
333 * @max_out_time: max time (in TU) to be out of associated channel
334 * @suspend_time: pause scan this long (TUs) when returning to service channel
336 * @filter_flags: RXON filter
337 * @tx_cmd: tx command for active scan; for 2GHz and for 5GHz
338 * @direct_scan: list of SSIDs for directed active scan
339 * @scan_prio: enum iwl_scan_priority
340 * @iter_num: number of scan iterations
341 * @delay: delay in seconds before first iteration
342 * @schedule: two scheduling plans. The first one is finite, the second one can
344 * @channel_opt: channel optimization options, for full and partial scan
345 * @data: channel configuration and probe request packet.
347 struct iwl_scan_req_lmac {
348 /* SCAN_REQUEST_FIXED_PART_API_S_VER_7 */
356 __le16 rx_chain_select;
360 /* RX_ON_FLAGS_API_S_VER_1 */
363 struct iwl_scan_req_tx_cmd tx_cmd[2];
364 struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
366 /* SCAN_REQ_PERIODIC_PARAMS_API_S */
369 struct iwl_scan_schedule_lmac schedule[IWL_MAX_SCHED_SCAN_PLANS];
370 struct iwl_scan_channel_opt channel_opt[2];
375 * struct iwl_scan_results_notif - scan results for one channel -
376 * SCAN_RESULT_NTF_API_S_VER_3
377 * @channel: which channel the results are from
378 * @band: 0 for 5.2 GHz, 1 for 2.4 GHz
379 * @probe_status: SCAN_PROBE_STATUS_*, indicates success of probe request
380 * @num_probe_not_sent: # of request that weren't sent due to not enough time
381 * @duration: duration spent in channel, in usecs
383 struct iwl_scan_results_notif {
387 u8 num_probe_not_sent;
392 * struct iwl_lmac_scan_complete_notif - notifies end of scanning (all channels)
393 * SCAN_COMPLETE_NTF_API_S_VER_3
394 * @scanned_channels: number of channels scanned (and number of valid results)
395 * @status: one of SCAN_COMP_STATUS_*
396 * @bt_status: BT on/off status
397 * @last_channel: last channel that was scanned
398 * @tsf_low: TSF timer (lower half) in usecs
399 * @tsf_high: TSF timer (higher half) in usecs
400 * @results: an array of scan results, only "scanned_channels" of them are valid
402 struct iwl_lmac_scan_complete_notif {
409 struct iwl_scan_results_notif results[];
413 * iwl_scan_offload_complete - PERIODIC_SCAN_COMPLETE_NTF_API_S_VER_2
414 * @last_schedule_line: last schedule line executed (fast or regular)
415 * @last_schedule_iteration: last scan iteration executed before scan abort
416 * @status: enum iwl_scan_offload_complete_status
417 * @ebs_status: EBS success status &enum iwl_scan_ebs_status
418 * @time_after_last_iter; time in seconds elapsed after last iteration
420 struct iwl_periodic_scan_complete {
421 u8 last_schedule_line;
422 u8 last_schedule_iteration;
425 __le32 time_after_last_iter;
431 /* The maximum of either of these cannot exceed 8, because we use an
432 * 8-bit mask (see IWL_MVM_SCAN_MASK in mvm.h).
434 #define IWL_MVM_MAX_UMAC_SCANS 8
435 #define IWL_MVM_MAX_LMAC_SCANS 1
437 enum scan_config_flags {
438 SCAN_CONFIG_FLAG_ACTIVATE = BIT(0),
439 SCAN_CONFIG_FLAG_DEACTIVATE = BIT(1),
440 SCAN_CONFIG_FLAG_FORBID_CHUB_REQS = BIT(2),
441 SCAN_CONFIG_FLAG_ALLOW_CHUB_REQS = BIT(3),
442 SCAN_CONFIG_FLAG_SET_TX_CHAINS = BIT(8),
443 SCAN_CONFIG_FLAG_SET_RX_CHAINS = BIT(9),
444 SCAN_CONFIG_FLAG_SET_AUX_STA_ID = BIT(10),
445 SCAN_CONFIG_FLAG_SET_ALL_TIMES = BIT(11),
446 SCAN_CONFIG_FLAG_SET_EFFECTIVE_TIMES = BIT(12),
447 SCAN_CONFIG_FLAG_SET_CHANNEL_FLAGS = BIT(13),
448 SCAN_CONFIG_FLAG_SET_LEGACY_RATES = BIT(14),
449 SCAN_CONFIG_FLAG_SET_MAC_ADDR = BIT(15),
450 SCAN_CONFIG_FLAG_SET_FRAGMENTED = BIT(16),
451 SCAN_CONFIG_FLAG_CLEAR_FRAGMENTED = BIT(17),
452 SCAN_CONFIG_FLAG_SET_CAM_MODE = BIT(18),
453 SCAN_CONFIG_FLAG_CLEAR_CAM_MODE = BIT(19),
454 SCAN_CONFIG_FLAG_SET_PROMISC_MODE = BIT(20),
455 SCAN_CONFIG_FLAG_CLEAR_PROMISC_MODE = BIT(21),
457 /* Bits 26-31 are for num of channels in channel_array */
458 #define SCAN_CONFIG_N_CHANNELS(n) ((n) << 26)
461 enum scan_config_rates {
462 /* OFDM basic rates */
463 SCAN_CONFIG_RATE_6M = BIT(0),
464 SCAN_CONFIG_RATE_9M = BIT(1),
465 SCAN_CONFIG_RATE_12M = BIT(2),
466 SCAN_CONFIG_RATE_18M = BIT(3),
467 SCAN_CONFIG_RATE_24M = BIT(4),
468 SCAN_CONFIG_RATE_36M = BIT(5),
469 SCAN_CONFIG_RATE_48M = BIT(6),
470 SCAN_CONFIG_RATE_54M = BIT(7),
471 /* CCK basic rates */
472 SCAN_CONFIG_RATE_1M = BIT(8),
473 SCAN_CONFIG_RATE_2M = BIT(9),
474 SCAN_CONFIG_RATE_5M = BIT(10),
475 SCAN_CONFIG_RATE_11M = BIT(11),
477 /* Bits 16-27 are for supported rates */
478 #define SCAN_CONFIG_SUPPORTED_RATE(rate) ((rate) << 16)
481 enum iwl_channel_flags {
482 IWL_CHANNEL_FLAG_EBS = BIT(0),
483 IWL_CHANNEL_FLAG_ACCURATE_EBS = BIT(1),
484 IWL_CHANNEL_FLAG_EBS_ADD = BIT(2),
485 IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE = BIT(3),
489 * struct iwl_scan_config
490 * @flags: enum scan_config_flags
491 * @tx_chains: valid_tx antenna - ANT_* definitions
492 * @rx_chains: valid_rx antenna - ANT_* definitions
493 * @legacy_rates: default legacy rates - enum scan_config_rates
494 * @out_of_channel_time: default max out of serving channel time
495 * @suspend_time: default max suspend time
496 * @dwell_active: default dwell time for active scan
497 * @dwell_passive: default dwell time for passive scan
498 * @dwell_fragmented: default dwell time for fragmented scan
499 * @dwell_extended: default dwell time for channels 1, 6 and 11
500 * @mac_addr: default mac address to be used in probes
501 * @bcast_sta_id: the index of the station in the fw
502 * @channel_flags: default channel flags - enum iwl_channel_flags
503 * scan_config_channel_flag
504 * @channel_array: default supported channels
506 struct iwl_scan_config {
511 __le32 out_of_channel_time;
517 u8 mac_addr[ETH_ALEN];
521 } __packed; /* SCAN_CONFIG_DB_CMD_API_S */
524 * iwl_umac_scan_flags
525 *@IWL_UMAC_SCAN_FLAG_PREEMPTIVE: scan process triggered by this scan request
526 * can be preempted by other scan requests with higher priority.
527 * The low priority scan will be resumed when the higher proirity scan is
529 *@IWL_UMAC_SCAN_FLAG_START_NOTIF: notification will be sent to the driver
532 enum iwl_umac_scan_flags {
533 IWL_UMAC_SCAN_FLAG_PREEMPTIVE = BIT(0),
534 IWL_UMAC_SCAN_FLAG_START_NOTIF = BIT(1),
537 enum iwl_umac_scan_uid_offsets {
538 IWL_UMAC_SCAN_UID_TYPE_OFFSET = 0,
539 IWL_UMAC_SCAN_UID_SEQ_OFFSET = 8,
542 enum iwl_umac_scan_general_flags {
543 IWL_UMAC_SCAN_GEN_FLAGS_PERIODIC = BIT(0),
544 IWL_UMAC_SCAN_GEN_FLAGS_OVER_BT = BIT(1),
545 IWL_UMAC_SCAN_GEN_FLAGS_PASS_ALL = BIT(2),
546 IWL_UMAC_SCAN_GEN_FLAGS_PASSIVE = BIT(3),
547 IWL_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT = BIT(4),
548 IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE = BIT(5),
549 IWL_UMAC_SCAN_GEN_FLAGS_MULTIPLE_SSID = BIT(6),
550 IWL_UMAC_SCAN_GEN_FLAGS_FRAGMENTED = BIT(7),
551 IWL_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED = BIT(8),
552 IWL_UMAC_SCAN_GEN_FLAGS_MATCH = BIT(9),
553 IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL = BIT(10),
557 * struct iwl_scan_channel_cfg_umac
558 * @flags: bitmap - 0-19: directed scan to i'th ssid.
559 * @channel_num: channel number 1-13 etc.
560 * @iter_count: repetition count for the channel.
561 * @iter_interval: interval between two scan iterations on one channel.
563 struct iwl_scan_channel_cfg_umac {
567 __le16 iter_interval;
568 } __packed; /* SCAN_CHANNEL_CFG_S_VER2 */
571 * struct iwl_scan_umac_schedule
572 * @interval: interval in seconds between scan iterations
573 * @iter_count: num of scan iterations for schedule plan, 0xff for infinite loop
574 * @reserved: for alignment and future use
576 struct iwl_scan_umac_schedule {
580 } __packed; /* SCAN_SCHED_PARAM_API_S_VER_1 */
583 * struct iwl_scan_req_umac_tail - the rest of the UMAC scan request command
584 * parameters following channels configuration array.
585 * @schedule: two scheduling plans.
586 * @delay: delay in TUs before starting the first scan iteration
587 * @reserved: for future use and alignment
588 * @preq: probe request with IEs blocks
589 * @direct_scan: list of SSIDs for directed active scan
591 struct iwl_scan_req_umac_tail {
592 /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
593 struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
596 /* SCAN_PROBE_PARAMS_API_S_VER_1 */
597 struct iwl_scan_probe_req preq;
598 struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
602 * struct iwl_scan_req_umac
603 * @flags: &enum iwl_umac_scan_flags
604 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
605 * @ooc_priority: out of channel priority - &enum iwl_scan_priority
606 * @general_flags: &enum iwl_umac_scan_general_flags
607 * @reserved2: for future use and alignment
608 * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
609 * @extended_dwell: dwell time for channels 1, 6 and 11
610 * @active_dwell: dwell time for active scan
611 * @passive_dwell: dwell time for passive scan
612 * @fragmented_dwell: dwell time for fragmented passive scan
613 * @max_out_time: max out of serving channel time
614 * @suspend_time: max suspend time
615 * @scan_priority: scan internal prioritization &enum iwl_scan_priority
616 * @channel_flags: &enum iwl_scan_channel_flags
617 * @n_channels: num of channels in scan request
618 * @reserved: for future use and alignment
619 * @data: &struct iwl_scan_channel_cfg_umac and
620 * &struct iwl_scan_req_umac_tail
622 struct iwl_scan_req_umac {
626 /* SCAN_GENERAL_PARAMS_API_S_VER_4 */
627 __le16 general_flags;
629 u8 scan_start_mac_id;
636 __le32 scan_priority;
637 /* SCAN_CHANNEL_PARAMS_API_S_VER_4 */
642 } __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
645 * struct iwl_umac_scan_abort
646 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
649 struct iwl_umac_scan_abort {
652 } __packed; /* SCAN_ABORT_CMD_UMAC_API_S_VER_1 */
655 * struct iwl_umac_scan_complete
656 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
657 * @last_schedule: last scheduling line
658 * @last_iter: last scan iteration number
659 * @scan status: &enum iwl_scan_offload_complete_status
660 * @ebs_status: &enum iwl_scan_ebs_status
661 * @time_from_last_iter: time elapsed from last iteration
662 * @reserved: for future use
664 struct iwl_umac_scan_complete {
670 __le32 time_from_last_iter;
672 } __packed; /* SCAN_COMPLETE_NTF_UMAC_API_S_VER_1 */
674 #define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN 5
676 * struct iwl_scan_offload_profile_match - match information
677 * @bssid: matched bssid
678 * @channel: channel where the match occurred
681 * @matching_channels: bitmap of channels that matched, referencing
682 * the channels passed in tue scan offload request
684 struct iwl_scan_offload_profile_match {
690 u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN];
691 } __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */
694 * struct iwl_scan_offload_profiles_query - match results query response
695 * @matched_profiles: bitmap of matched profiles, referencing the
696 * matches passed in the scan offload request
697 * @last_scan_age: age of the last offloaded scan
698 * @n_scans_done: number of offloaded scans done
699 * @gp2_d0u: GP2 when D0U occurred
700 * @gp2_invoked: GP2 when scan offload was invoked
701 * @resume_while_scanning: not used
702 * @self_recovery: obsolete
703 * @reserved: reserved
704 * @matches: array of match information, one for each match
706 struct iwl_scan_offload_profiles_query {
707 __le32 matched_profiles;
708 __le32 last_scan_age;
712 u8 resume_while_scanning;
715 struct iwl_scan_offload_profile_match matches[IWL_SCAN_MAX_PROFILES];
716 } __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */
719 * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration
720 * @uid: scan id, &enum iwl_umac_scan_uid_offsets
721 * @scanned_channels: number of channels scanned and number of valid elements in
723 * @status: one of SCAN_COMP_STATUS_*
724 * @bt_status: BT on/off status
725 * @last_channel: last channel that was scanned
726 * @start_tsf: TSF timer in usecs of the scan start time for the mac specified
727 * in &struct iwl_scan_req_umac.
728 * @results: array of scan results, only "scanned_channels" of them are valid
730 struct iwl_umac_scan_iter_complete_notif {
737 struct iwl_scan_results_notif results[];
738 } __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_2 */