xref: /freebsd/sys/contrib/dev/iwlwifi/fw/api/scan.h (revision a4128aad8503277614f2d214011ef60a19447b83)
1bfcc09ddSBjoern A. Zeeb /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
2bfcc09ddSBjoern A. Zeeb /*
3*a4128aadSBjoern A. Zeeb  * Copyright (C) 2012-2014, 2018-2024 Intel Corporation
4bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
5bfcc09ddSBjoern A. Zeeb  * Copyright (C) 2016-2017 Intel Deutschland GmbH
6bfcc09ddSBjoern A. Zeeb  */
7bfcc09ddSBjoern A. Zeeb #ifndef __iwl_fw_api_scan_h__
8bfcc09ddSBjoern A. Zeeb #define __iwl_fw_api_scan_h__
9bfcc09ddSBjoern A. Zeeb 
10bfcc09ddSBjoern A. Zeeb /* Scan Commands, Responses, Notifications */
11bfcc09ddSBjoern A. Zeeb 
129af1bba4SBjoern A. Zeeb /**
139af1bba4SBjoern A. Zeeb  * enum iwl_scan_subcmd_ids - scan commands
149af1bba4SBjoern A. Zeeb  */
159af1bba4SBjoern A. Zeeb enum iwl_scan_subcmd_ids {
169af1bba4SBjoern A. Zeeb 	/**
17*a4128aadSBjoern A. Zeeb 	 * @CHANNEL_SURVEY_NOTIF: &struct iwl_umac_scan_channel_survey_notif
18*a4128aadSBjoern A. Zeeb 	 */
19*a4128aadSBjoern A. Zeeb 	CHANNEL_SURVEY_NOTIF = 0xFB,
20*a4128aadSBjoern A. Zeeb 	/**
219af1bba4SBjoern A. Zeeb 	 * @OFFLOAD_MATCH_INFO_NOTIF: &struct iwl_scan_offload_match_info
229af1bba4SBjoern A. Zeeb 	 */
239af1bba4SBjoern A. Zeeb 	OFFLOAD_MATCH_INFO_NOTIF = 0xFC,
249af1bba4SBjoern A. Zeeb };
259af1bba4SBjoern A. Zeeb 
26bfcc09ddSBjoern A. Zeeb /* Max number of IEs for direct SSID scans in a command */
27bfcc09ddSBjoern A. Zeeb #define PROBE_OPTION_MAX		20
28bfcc09ddSBjoern A. Zeeb 
29bfcc09ddSBjoern A. Zeeb #define SCAN_SHORT_SSID_MAX_SIZE        8
30bfcc09ddSBjoern A. Zeeb #define SCAN_BSSID_MAX_SIZE             16
31bfcc09ddSBjoern A. Zeeb 
32bfcc09ddSBjoern A. Zeeb /**
33bfcc09ddSBjoern A. Zeeb  * struct iwl_ssid_ie - directed scan network information element
34bfcc09ddSBjoern A. Zeeb  *
35bfcc09ddSBjoern A. Zeeb  * Up to 20 of these may appear in REPLY_SCAN_CMD,
36bfcc09ddSBjoern A. Zeeb  * selected by "type" bit field in struct iwl_scan_channel;
37bfcc09ddSBjoern A. Zeeb  * each channel may select different ssids from among the 20 entries.
38bfcc09ddSBjoern A. Zeeb  * SSID IEs get transmitted in reverse order of entry.
39bfcc09ddSBjoern A. Zeeb  *
40bfcc09ddSBjoern A. Zeeb  * @id: element ID
41bfcc09ddSBjoern A. Zeeb  * @len: element length
42bfcc09ddSBjoern A. Zeeb  * @ssid: element (SSID) data
43bfcc09ddSBjoern A. Zeeb  */
44bfcc09ddSBjoern A. Zeeb struct iwl_ssid_ie {
45bfcc09ddSBjoern A. Zeeb 	u8 id;
46bfcc09ddSBjoern A. Zeeb 	u8 len;
47bfcc09ddSBjoern A. Zeeb 	u8 ssid[IEEE80211_MAX_SSID_LEN];
48bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_DIRECT_SSID_IE_API_S_VER_1 */
49bfcc09ddSBjoern A. Zeeb 
50bfcc09ddSBjoern A. Zeeb /* scan offload */
51bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_MAX_BLACKLIST_LEN	64
52bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_SHORT_BLACKLIST_LEN	16
53bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_MAX_PROFILES		11
54bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_MAX_PROFILES_V2	8
55bfcc09ddSBjoern A. Zeeb #define SCAN_OFFLOAD_PROBE_REQ_SIZE	512
56bfcc09ddSBjoern A. Zeeb #define SCAN_NUM_BAND_PROBE_DATA_V_1	2
57bfcc09ddSBjoern A. Zeeb #define SCAN_NUM_BAND_PROBE_DATA_V_2	3
58bfcc09ddSBjoern A. Zeeb 
59bfcc09ddSBjoern A. Zeeb /* Default watchdog (in MS) for scheduled scan iteration */
60bfcc09ddSBjoern A. Zeeb #define IWL_SCHED_SCAN_WATCHDOG cpu_to_le16(15000)
61bfcc09ddSBjoern A. Zeeb 
62bfcc09ddSBjoern A. Zeeb #define IWL_GOOD_CRC_TH_DEFAULT cpu_to_le16(1)
63bfcc09ddSBjoern A. Zeeb #define CAN_ABORT_STATUS 1
64bfcc09ddSBjoern A. Zeeb 
65bfcc09ddSBjoern A. Zeeb #define IWL_FULL_SCAN_MULTIPLIER 5
66bfcc09ddSBjoern A. Zeeb #define IWL_FAST_SCHED_SCAN_ITERATIONS 3
67bfcc09ddSBjoern A. Zeeb #define IWL_MAX_SCHED_SCAN_PLANS 2
68bfcc09ddSBjoern A. Zeeb 
69*a4128aadSBjoern A. Zeeb #define IWL_MAX_NUM_NOISE_RESULTS 22
70*a4128aadSBjoern A. Zeeb 
71bfcc09ddSBjoern A. Zeeb enum scan_framework_client {
72bfcc09ddSBjoern A. Zeeb 	SCAN_CLIENT_SCHED_SCAN		= BIT(0),
73bfcc09ddSBjoern A. Zeeb 	SCAN_CLIENT_NETDETECT		= BIT(1),
74bfcc09ddSBjoern A. Zeeb 	SCAN_CLIENT_ASSET_TRACKING	= BIT(2),
75bfcc09ddSBjoern A. Zeeb };
76bfcc09ddSBjoern A. Zeeb 
77bfcc09ddSBjoern A. Zeeb /**
78bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_blocklist - SCAN_OFFLOAD_BLACKLIST_S
79bfcc09ddSBjoern A. Zeeb  * @ssid:		MAC address to filter out
80bfcc09ddSBjoern A. Zeeb  * @reported_rssi:	AP rssi reported to the host
81bfcc09ddSBjoern A. Zeeb  * @client_bitmap: clients ignore this entry  - enum scan_framework_client
82bfcc09ddSBjoern A. Zeeb  */
83bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_blocklist {
84bfcc09ddSBjoern A. Zeeb 	u8 ssid[ETH_ALEN];
85bfcc09ddSBjoern A. Zeeb 	u8 reported_rssi;
86bfcc09ddSBjoern A. Zeeb 	u8 client_bitmap;
87bfcc09ddSBjoern A. Zeeb } __packed;
88bfcc09ddSBjoern A. Zeeb 
89bfcc09ddSBjoern A. Zeeb enum iwl_scan_offload_network_type {
90bfcc09ddSBjoern A. Zeeb 	IWL_NETWORK_TYPE_BSS	= 1,
91bfcc09ddSBjoern A. Zeeb 	IWL_NETWORK_TYPE_IBSS	= 2,
92bfcc09ddSBjoern A. Zeeb 	IWL_NETWORK_TYPE_ANY	= 3,
93bfcc09ddSBjoern A. Zeeb };
94bfcc09ddSBjoern A. Zeeb 
95bfcc09ddSBjoern A. Zeeb enum iwl_scan_offload_band_selection {
96bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_OFFLOAD_SELECT_2_4	= 0x4,
97bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_OFFLOAD_SELECT_5_2	= 0x8,
98bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_OFFLOAD_SELECT_ANY	= 0xc,
99bfcc09ddSBjoern A. Zeeb };
100bfcc09ddSBjoern A. Zeeb 
101d9836fb4SBjoern A. Zeeb enum iwl_scan_offload_auth_alg {
102d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_UNSUPPORTED  = 0x00,
103d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_NONE         = 0x01,
104d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_PSK          = 0x02,
105d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_8021X        = 0x04,
106d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_SAE          = 0x08,
107d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_8021X_SHA384 = 0x10,
108d9836fb4SBjoern A. Zeeb 	IWL_AUTH_ALGO_OWE          = 0x20,
109d9836fb4SBjoern A. Zeeb };
110d9836fb4SBjoern A. Zeeb 
111bfcc09ddSBjoern A. Zeeb /**
112bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profile - SCAN_OFFLOAD_PROFILE_S
113bfcc09ddSBjoern A. Zeeb  * @ssid_index:		index to ssid list in fixed part
114bfcc09ddSBjoern A. Zeeb  * @unicast_cipher:	encryption algorithm to match - bitmap
115bfcc09ddSBjoern A. Zeeb  * @auth_alg:		authentication algorithm to match - bitmap
116bfcc09ddSBjoern A. Zeeb  * @network_type:	enum iwl_scan_offload_network_type
117bfcc09ddSBjoern A. Zeeb  * @band_selection:	enum iwl_scan_offload_band_selection
118bfcc09ddSBjoern A. Zeeb  * @client_bitmap:	clients waiting for match - enum scan_framework_client
119bfcc09ddSBjoern A. Zeeb  * @reserved:		reserved
120bfcc09ddSBjoern A. Zeeb  */
121bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile {
122bfcc09ddSBjoern A. Zeeb 	u8 ssid_index;
123bfcc09ddSBjoern A. Zeeb 	u8 unicast_cipher;
124bfcc09ddSBjoern A. Zeeb 	u8 auth_alg;
125bfcc09ddSBjoern A. Zeeb 	u8 network_type;
126bfcc09ddSBjoern A. Zeeb 	u8 band_selection;
127bfcc09ddSBjoern A. Zeeb 	u8 client_bitmap;
128bfcc09ddSBjoern A. Zeeb 	u8 reserved[2];
129bfcc09ddSBjoern A. Zeeb } __packed;
130bfcc09ddSBjoern A. Zeeb 
131bfcc09ddSBjoern A. Zeeb /**
132bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profile_cfg_data
133bfcc09ddSBjoern A. Zeeb  * @blocklist_len:	length of blocklist
134bfcc09ddSBjoern A. Zeeb  * @num_profiles:	num of profiles in the list
135bfcc09ddSBjoern A. Zeeb  * @match_notify:	clients waiting for match found notification
136bfcc09ddSBjoern A. Zeeb  * @pass_match:		clients waiting for the results
137bfcc09ddSBjoern A. Zeeb  * @active_clients:	active clients bitmap - enum scan_framework_client
138bfcc09ddSBjoern A. Zeeb  * @any_beacon_notify:	clients waiting for match notification without match
139bfcc09ddSBjoern A. Zeeb  * @reserved:		reserved
140bfcc09ddSBjoern A. Zeeb  */
141bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile_cfg_data {
142bfcc09ddSBjoern A. Zeeb 	u8 blocklist_len;
143bfcc09ddSBjoern A. Zeeb 	u8 num_profiles;
144bfcc09ddSBjoern A. Zeeb 	u8 match_notify;
145bfcc09ddSBjoern A. Zeeb 	u8 pass_match;
146bfcc09ddSBjoern A. Zeeb 	u8 active_clients;
147bfcc09ddSBjoern A. Zeeb 	u8 any_beacon_notify;
148bfcc09ddSBjoern A. Zeeb 	u8 reserved[2];
149bfcc09ddSBjoern A. Zeeb } __packed;
150bfcc09ddSBjoern A. Zeeb 
151bfcc09ddSBjoern A. Zeeb /**
152*a4128aadSBjoern A. Zeeb  * struct iwl_scan_offload_profile_cfg_v1 - scan offload profile config
153bfcc09ddSBjoern A. Zeeb  * @profiles:	profiles to search for match
154bfcc09ddSBjoern A. Zeeb  * @data:	the rest of the data for profile_cfg
155bfcc09ddSBjoern A. Zeeb  */
156bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile_cfg_v1 {
157bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES];
158bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_offload_profile_cfg_data data;
159bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_1-2*/
160bfcc09ddSBjoern A. Zeeb 
161bfcc09ddSBjoern A. Zeeb /**
162bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profile_cfg
163bfcc09ddSBjoern A. Zeeb  * @profiles:	profiles to search for match
164bfcc09ddSBjoern A. Zeeb  * @data:	the rest of the data for profile_cfg
165bfcc09ddSBjoern A. Zeeb  */
166bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile_cfg {
167bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_offload_profile profiles[IWL_SCAN_MAX_PROFILES_V2];
168bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_offload_profile_cfg_data data;
169bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILES_CFG_API_S_VER_3*/
170bfcc09ddSBjoern A. Zeeb 
171bfcc09ddSBjoern A. Zeeb /**
172bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_schedule_lmac - schedule of scan offload
173bfcc09ddSBjoern A. Zeeb  * @delay:		delay between iterations, in seconds.
174bfcc09ddSBjoern A. Zeeb  * @iterations:		num of scan iterations
175bfcc09ddSBjoern A. Zeeb  * @full_scan_mul:	number of partial scans before each full scan
176bfcc09ddSBjoern A. Zeeb  */
177bfcc09ddSBjoern A. Zeeb struct iwl_scan_schedule_lmac {
178bfcc09ddSBjoern A. Zeeb 	__le16 delay;
179bfcc09ddSBjoern A. Zeeb 	u8 iterations;
180bfcc09ddSBjoern A. Zeeb 	u8 full_scan_mul;
181bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_SCHEDULE_API_S */
182bfcc09ddSBjoern A. Zeeb 
183bfcc09ddSBjoern A. Zeeb enum iwl_scan_offload_complete_status {
184bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_OFFLOAD_COMPLETED	= 1,
185bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_OFFLOAD_ABORTED	= 2,
186bfcc09ddSBjoern A. Zeeb };
187bfcc09ddSBjoern A. Zeeb 
188bfcc09ddSBjoern A. Zeeb enum iwl_scan_ebs_status {
189bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_EBS_SUCCESS,
190bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_EBS_FAILED,
191bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_EBS_CHAN_NOT_FOUND,
192bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_EBS_INACTIVE,
193bfcc09ddSBjoern A. Zeeb };
194bfcc09ddSBjoern A. Zeeb 
195bfcc09ddSBjoern A. Zeeb /**
196bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_req_tx_cmd - SCAN_REQ_TX_CMD_API_S
197bfcc09ddSBjoern A. Zeeb  * @tx_flags: combination of TX_CMD_FLG_*
198bfcc09ddSBjoern A. Zeeb  * @rate_n_flags: rate for *all* Tx attempts, if TX_CMD_FLG_STA_RATE_MSK is
199bfcc09ddSBjoern A. Zeeb  *	cleared. Combination of RATE_MCS_*
200bfcc09ddSBjoern A. Zeeb  * @sta_id: index of destination station in FW station table
201bfcc09ddSBjoern A. Zeeb  * @reserved: for alignment and future use
202bfcc09ddSBjoern A. Zeeb  */
203bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_tx_cmd {
204bfcc09ddSBjoern A. Zeeb 	__le32 tx_flags;
205bfcc09ddSBjoern A. Zeeb 	__le32 rate_n_flags;
206bfcc09ddSBjoern A. Zeeb 	u8 sta_id;
207bfcc09ddSBjoern A. Zeeb 	u8 reserved[3];
208bfcc09ddSBjoern A. Zeeb } __packed;
209bfcc09ddSBjoern A. Zeeb 
210bfcc09ddSBjoern A. Zeeb enum iwl_scan_channel_flags_lmac {
211bfcc09ddSBjoern A. Zeeb 	IWL_UNIFIED_SCAN_CHANNEL_FULL		= BIT(27),
212bfcc09ddSBjoern A. Zeeb 	IWL_UNIFIED_SCAN_CHANNEL_PARTIAL	= BIT(28),
213bfcc09ddSBjoern A. Zeeb };
214bfcc09ddSBjoern A. Zeeb 
215bfcc09ddSBjoern A. Zeeb /**
216bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_channel_cfg_lmac - SCAN_CHANNEL_CFG_S_VER2
217bfcc09ddSBjoern A. Zeeb  * @flags:		bits 1-20: directed scan to i'th ssid
218bfcc09ddSBjoern A. Zeeb  *			other bits &enum iwl_scan_channel_flags_lmac
219bfcc09ddSBjoern A. Zeeb  * @channel_num:	channel number 1-13 etc
220bfcc09ddSBjoern A. Zeeb  * @iter_count:		scan iteration on this channel
221bfcc09ddSBjoern A. Zeeb  * @iter_interval:	interval in seconds between iterations on one channel
222bfcc09ddSBjoern A. Zeeb  */
223bfcc09ddSBjoern A. Zeeb struct iwl_scan_channel_cfg_lmac {
224bfcc09ddSBjoern A. Zeeb 	__le32 flags;
225bfcc09ddSBjoern A. Zeeb 	__le16 channel_num;
226bfcc09ddSBjoern A. Zeeb 	__le16 iter_count;
227bfcc09ddSBjoern A. Zeeb 	__le32 iter_interval;
228bfcc09ddSBjoern A. Zeeb } __packed;
229bfcc09ddSBjoern A. Zeeb 
230d9836fb4SBjoern A. Zeeb /**
231bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_probe_segment - PROBE_SEGMENT_API_S_VER_1
232bfcc09ddSBjoern A. Zeeb  * @offset: offset in the data block
233bfcc09ddSBjoern A. Zeeb  * @len: length of the segment
234bfcc09ddSBjoern A. Zeeb  */
235bfcc09ddSBjoern A. Zeeb struct iwl_scan_probe_segment {
236bfcc09ddSBjoern A. Zeeb 	__le16 offset;
237bfcc09ddSBjoern A. Zeeb 	__le16 len;
238bfcc09ddSBjoern A. Zeeb } __packed;
239bfcc09ddSBjoern A. Zeeb 
240d9836fb4SBjoern A. Zeeb /**
241d9836fb4SBjoern A. Zeeb  * struct iwl_scan_probe_req_v1 - PROBE_REQUEST_FRAME_API_S_VER_2
242bfcc09ddSBjoern A. Zeeb  * @mac_header: first (and common) part of the probe
243bfcc09ddSBjoern A. Zeeb  * @band_data: band specific data
244bfcc09ddSBjoern A. Zeeb  * @common_data: last (and common) part of the probe
245bfcc09ddSBjoern A. Zeeb  * @buf: raw data block
246bfcc09ddSBjoern A. Zeeb  */
247bfcc09ddSBjoern A. Zeeb struct iwl_scan_probe_req_v1 {
248bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment mac_header;
249bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_1];
250bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment common_data;
251bfcc09ddSBjoern A. Zeeb 	u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
252bfcc09ddSBjoern A. Zeeb } __packed;
253bfcc09ddSBjoern A. Zeeb 
254d9836fb4SBjoern A. Zeeb /**
255d9836fb4SBjoern A. Zeeb  * struct iwl_scan_probe_req - PROBE_REQUEST_FRAME_API_S_VER_v2
256bfcc09ddSBjoern A. Zeeb  * @mac_header: first (and common) part of the probe
257bfcc09ddSBjoern A. Zeeb  * @band_data: band specific data
258bfcc09ddSBjoern A. Zeeb  * @common_data: last (and common) part of the probe
259bfcc09ddSBjoern A. Zeeb  * @buf: raw data block
260bfcc09ddSBjoern A. Zeeb  */
261bfcc09ddSBjoern A. Zeeb struct iwl_scan_probe_req {
262bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment mac_header;
263bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment band_data[SCAN_NUM_BAND_PROBE_DATA_V_2];
264bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_segment common_data;
265bfcc09ddSBjoern A. Zeeb 	u8 buf[SCAN_OFFLOAD_PROBE_REQ_SIZE];
266bfcc09ddSBjoern A. Zeeb } __packed;
267bfcc09ddSBjoern A. Zeeb 
268bfcc09ddSBjoern A. Zeeb enum iwl_scan_channel_flags {
269bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_EBS		= BIT(0),
270bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_EBS_ACCURATE	= BIT(1),
271bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_CACHE_ADD		= BIT(2),
272bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_EBS_FRAG		= BIT(3),
273bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_FORCE_EBS         = BIT(4),
274bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_ENABLE_CHAN_ORDER = BIT(5),
275bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_CHANNEL_FLAG_6G_PSC_NO_FILTER  = BIT(6),
276bfcc09ddSBjoern A. Zeeb };
277bfcc09ddSBjoern A. Zeeb 
278d9836fb4SBjoern A. Zeeb /**
279d9836fb4SBjoern A. Zeeb  * struct iwl_scan_channel_opt - CHANNEL_OPTIMIZATION_API_S
280bfcc09ddSBjoern A. Zeeb  * @flags: enum iwl_scan_channel_flags
281bfcc09ddSBjoern A. Zeeb  * @non_ebs_ratio: defines the ratio of number of scan iterations where EBS is
282bfcc09ddSBjoern A. Zeeb  *	involved.
283bfcc09ddSBjoern A. Zeeb  *	1 - EBS is disabled.
284bfcc09ddSBjoern A. Zeeb  *	2 - every second scan will be full scan(and so on).
285bfcc09ddSBjoern A. Zeeb  */
286bfcc09ddSBjoern A. Zeeb struct iwl_scan_channel_opt {
287bfcc09ddSBjoern A. Zeeb 	__le16 flags;
288bfcc09ddSBjoern A. Zeeb 	__le16 non_ebs_ratio;
289bfcc09ddSBjoern A. Zeeb } __packed;
290bfcc09ddSBjoern A. Zeeb 
291bfcc09ddSBjoern A. Zeeb /**
292bfcc09ddSBjoern A. Zeeb  * enum iwl_mvm_lmac_scan_flags - LMAC scan flags
293bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL: pass all beacons and probe responses
294bfcc09ddSBjoern A. Zeeb  *	without filtering.
295bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_PASSIVE: force passive scan on all channels
296bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION: single channel scan
297bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE: send iteration complete notification
298bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS: multiple SSID matching
299bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED: all passive scans will be fragmented
300bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED: insert WFA vendor-specific TPC report
301bfcc09ddSBjoern A. Zeeb  *	and DS parameter set IEs into probe requests.
302bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL: use extended dwell time on channels
303bfcc09ddSBjoern A. Zeeb  *	1, 6 and 11.
304bfcc09ddSBjoern A. Zeeb  * @IWL_MVM_LMAC_SCAN_FLAG_MATCH: Send match found notification on matches
305bfcc09ddSBjoern A. Zeeb  */
306bfcc09ddSBjoern A. Zeeb enum iwl_mvm_lmac_scan_flags {
307bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_PASS_ALL		= BIT(0),
308bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_PASSIVE		= BIT(1),
309bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_PRE_CONNECTION	= BIT(2),
310bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_ITER_COMPLETE	= BIT(3),
311bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_MULTIPLE_SSIDS	= BIT(4),
312bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_FRAGMENTED	= BIT(5),
313bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAGS_RRM_ENABLED	= BIT(6),
314bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_EXTENDED_DWELL	= BIT(7),
315bfcc09ddSBjoern A. Zeeb 	IWL_MVM_LMAC_SCAN_FLAG_MATCH		= BIT(9),
316bfcc09ddSBjoern A. Zeeb };
317bfcc09ddSBjoern A. Zeeb 
318bfcc09ddSBjoern A. Zeeb enum iwl_scan_priority {
319bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_LOW,
320bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_MEDIUM,
321bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_HIGH,
322bfcc09ddSBjoern A. Zeeb };
323bfcc09ddSBjoern A. Zeeb 
324bfcc09ddSBjoern A. Zeeb enum iwl_scan_priority_ext {
325bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_0_LOWEST,
326bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_1,
327bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_2,
328bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_3,
329bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_4,
330bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_5,
331bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_6,
332bfcc09ddSBjoern A. Zeeb 	IWL_SCAN_PRIORITY_EXT_7_HIGHEST,
333bfcc09ddSBjoern A. Zeeb };
334bfcc09ddSBjoern A. Zeeb 
335bfcc09ddSBjoern A. Zeeb /**
336bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_req_lmac - SCAN_REQUEST_CMD_API_S_VER_1
337bfcc09ddSBjoern A. Zeeb  * @reserved1: for alignment and future use
338bfcc09ddSBjoern A. Zeeb  * @n_channels: num of channels to scan
339bfcc09ddSBjoern A. Zeeb  * @active_dwell: dwell time for active channels
340bfcc09ddSBjoern A. Zeeb  * @passive_dwell: dwell time for passive channels
341bfcc09ddSBjoern A. Zeeb  * @fragmented_dwell: dwell time for fragmented passive scan
342bfcc09ddSBjoern A. Zeeb  * @extended_dwell: dwell time for channels 1, 6 and 11 (in certain cases)
343bfcc09ddSBjoern A. Zeeb  * @reserved2: for alignment and future use
344bfcc09ddSBjoern A. Zeeb  * @rx_chain_select: PHY_RX_CHAIN_* flags
345bfcc09ddSBjoern A. Zeeb  * @scan_flags: &enum iwl_mvm_lmac_scan_flags
346bfcc09ddSBjoern A. Zeeb  * @max_out_time: max time (in TU) to be out of associated channel
347bfcc09ddSBjoern A. Zeeb  * @suspend_time: pause scan this long (TUs) when returning to service channel
348bfcc09ddSBjoern A. Zeeb  * @flags: RXON flags
349bfcc09ddSBjoern A. Zeeb  * @filter_flags: RXON filter
350bfcc09ddSBjoern A. Zeeb  * @tx_cmd: tx command for active scan; for 2GHz and for 5GHz
351bfcc09ddSBjoern A. Zeeb  * @direct_scan: list of SSIDs for directed active scan
352bfcc09ddSBjoern A. Zeeb  * @scan_prio: enum iwl_scan_priority
353bfcc09ddSBjoern A. Zeeb  * @iter_num: number of scan iterations
354bfcc09ddSBjoern A. Zeeb  * @delay: delay in seconds before first iteration
355bfcc09ddSBjoern A. Zeeb  * @schedule: two scheduling plans. The first one is finite, the second one can
356bfcc09ddSBjoern A. Zeeb  *	be infinite.
357bfcc09ddSBjoern A. Zeeb  * @channel_opt: channel optimization options, for full and partial scan
358bfcc09ddSBjoern A. Zeeb  * @data: channel configuration and probe request packet.
359bfcc09ddSBjoern A. Zeeb  */
360bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_lmac {
361bfcc09ddSBjoern A. Zeeb 	/* SCAN_REQUEST_FIXED_PART_API_S_VER_7 */
362bfcc09ddSBjoern A. Zeeb 	__le32 reserved1;
363bfcc09ddSBjoern A. Zeeb 	u8 n_channels;
364bfcc09ddSBjoern A. Zeeb 	u8 active_dwell;
365bfcc09ddSBjoern A. Zeeb 	u8 passive_dwell;
366bfcc09ddSBjoern A. Zeeb 	u8 fragmented_dwell;
367bfcc09ddSBjoern A. Zeeb 	u8 extended_dwell;
368bfcc09ddSBjoern A. Zeeb 	u8 reserved2;
369bfcc09ddSBjoern A. Zeeb 	__le16 rx_chain_select;
370bfcc09ddSBjoern A. Zeeb 	__le32 scan_flags;
371bfcc09ddSBjoern A. Zeeb 	__le32 max_out_time;
372bfcc09ddSBjoern A. Zeeb 	__le32 suspend_time;
373bfcc09ddSBjoern A. Zeeb 	/* RX_ON_FLAGS_API_S_VER_1 */
374bfcc09ddSBjoern A. Zeeb 	__le32 flags;
375bfcc09ddSBjoern A. Zeeb 	__le32 filter_flags;
376bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_req_tx_cmd tx_cmd[2];
377bfcc09ddSBjoern A. Zeeb 	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
378bfcc09ddSBjoern A. Zeeb 	__le32 scan_prio;
379bfcc09ddSBjoern A. Zeeb 	/* SCAN_REQ_PERIODIC_PARAMS_API_S */
380bfcc09ddSBjoern A. Zeeb 	__le32 iter_num;
381bfcc09ddSBjoern A. Zeeb 	__le32 delay;
382bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_schedule_lmac schedule[IWL_MAX_SCHED_SCAN_PLANS];
383bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_channel_opt channel_opt[2];
384bfcc09ddSBjoern A. Zeeb 	u8 data[];
385bfcc09ddSBjoern A. Zeeb } __packed;
386bfcc09ddSBjoern A. Zeeb 
387bfcc09ddSBjoern A. Zeeb /**
388bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_results_notif - scan results for one channel -
389bfcc09ddSBjoern A. Zeeb  *	SCAN_RESULT_NTF_API_S_VER_3
390bfcc09ddSBjoern A. Zeeb  * @channel: which channel the results are from
391bfcc09ddSBjoern A. Zeeb  * @band: 0 for 5.2 GHz, 1 for 2.4 GHz
392bfcc09ddSBjoern A. Zeeb  * @probe_status: SCAN_PROBE_STATUS_*, indicates success of probe request
393bfcc09ddSBjoern A. Zeeb  * @num_probe_not_sent: # of request that weren't sent due to not enough time
394bfcc09ddSBjoern A. Zeeb  * @duration: duration spent in channel, in usecs
395bfcc09ddSBjoern A. Zeeb  */
396bfcc09ddSBjoern A. Zeeb struct iwl_scan_results_notif {
397bfcc09ddSBjoern A. Zeeb 	u8 channel;
398bfcc09ddSBjoern A. Zeeb 	u8 band;
399bfcc09ddSBjoern A. Zeeb 	u8 probe_status;
400bfcc09ddSBjoern A. Zeeb 	u8 num_probe_not_sent;
401bfcc09ddSBjoern A. Zeeb 	__le32 duration;
402bfcc09ddSBjoern A. Zeeb } __packed;
403bfcc09ddSBjoern A. Zeeb 
404bfcc09ddSBjoern A. Zeeb /**
405bfcc09ddSBjoern A. Zeeb  * struct iwl_lmac_scan_complete_notif - notifies end of scanning (all channels)
406bfcc09ddSBjoern A. Zeeb  *	SCAN_COMPLETE_NTF_API_S_VER_3
407bfcc09ddSBjoern A. Zeeb  * @scanned_channels: number of channels scanned (and number of valid results)
408bfcc09ddSBjoern A. Zeeb  * @status: one of SCAN_COMP_STATUS_*
409bfcc09ddSBjoern A. Zeeb  * @bt_status: BT on/off status
410bfcc09ddSBjoern A. Zeeb  * @last_channel: last channel that was scanned
411bfcc09ddSBjoern A. Zeeb  * @tsf_low: TSF timer (lower half) in usecs
412bfcc09ddSBjoern A. Zeeb  * @tsf_high: TSF timer (higher half) in usecs
413bfcc09ddSBjoern A. Zeeb  * @results: an array of scan results, only "scanned_channels" of them are valid
414bfcc09ddSBjoern A. Zeeb  */
415bfcc09ddSBjoern A. Zeeb struct iwl_lmac_scan_complete_notif {
416bfcc09ddSBjoern A. Zeeb 	u8 scanned_channels;
417bfcc09ddSBjoern A. Zeeb 	u8 status;
418bfcc09ddSBjoern A. Zeeb 	u8 bt_status;
419bfcc09ddSBjoern A. Zeeb 	u8 last_channel;
420bfcc09ddSBjoern A. Zeeb 	__le32 tsf_low;
421bfcc09ddSBjoern A. Zeeb 	__le32 tsf_high;
422bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_results_notif results[];
423bfcc09ddSBjoern A. Zeeb } __packed;
424bfcc09ddSBjoern A. Zeeb 
425bfcc09ddSBjoern A. Zeeb /**
426*a4128aadSBjoern A. Zeeb  * struct iwl_periodic_scan_complete - PERIODIC_SCAN_COMPLETE_NTF_API_S_VER_2
427bfcc09ddSBjoern A. Zeeb  * @last_schedule_line: last schedule line executed (fast or regular)
428bfcc09ddSBjoern A. Zeeb  * @last_schedule_iteration: last scan iteration executed before scan abort
429bfcc09ddSBjoern A. Zeeb  * @status: &enum iwl_scan_offload_complete_status
430bfcc09ddSBjoern A. Zeeb  * @ebs_status: EBS success status &enum iwl_scan_ebs_status
431bfcc09ddSBjoern A. Zeeb  * @time_after_last_iter: time in seconds elapsed after last iteration
432bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
433bfcc09ddSBjoern A. Zeeb  */
434bfcc09ddSBjoern A. Zeeb struct iwl_periodic_scan_complete {
435bfcc09ddSBjoern A. Zeeb 	u8 last_schedule_line;
436bfcc09ddSBjoern A. Zeeb 	u8 last_schedule_iteration;
437bfcc09ddSBjoern A. Zeeb 	u8 status;
438bfcc09ddSBjoern A. Zeeb 	u8 ebs_status;
439bfcc09ddSBjoern A. Zeeb 	__le32 time_after_last_iter;
440bfcc09ddSBjoern A. Zeeb 	__le32 reserved;
441bfcc09ddSBjoern A. Zeeb } __packed;
442bfcc09ddSBjoern A. Zeeb 
443bfcc09ddSBjoern A. Zeeb /* UMAC Scan API */
444bfcc09ddSBjoern A. Zeeb 
445bfcc09ddSBjoern A. Zeeb /* The maximum of either of these cannot exceed 8, because we use an
446*a4128aadSBjoern A. Zeeb  * 8-bit mask (see enum iwl_scan_status).
447bfcc09ddSBjoern A. Zeeb  */
448*a4128aadSBjoern A. Zeeb #define IWL_MAX_UMAC_SCANS 4
449*a4128aadSBjoern A. Zeeb #define IWL_MAX_LMAC_SCANS 1
450bfcc09ddSBjoern A. Zeeb 
451bfcc09ddSBjoern A. Zeeb enum scan_config_flags {
452bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_ACTIVATE			= BIT(0),
453bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_DEACTIVATE			= BIT(1),
454bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_FORBID_CHUB_REQS		= BIT(2),
455bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_ALLOW_CHUB_REQS		= BIT(3),
456bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_TX_CHAINS			= BIT(8),
457bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_RX_CHAINS			= BIT(9),
458bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_AUX_STA_ID			= BIT(10),
459bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_ALL_TIMES			= BIT(11),
460bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_EFFECTIVE_TIMES		= BIT(12),
461bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_CHANNEL_FLAGS		= BIT(13),
462bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_LEGACY_RATES		= BIT(14),
463bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_MAC_ADDR			= BIT(15),
464bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_FRAGMENTED			= BIT(16),
465bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_CLEAR_FRAGMENTED		= BIT(17),
466bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_CAM_MODE			= BIT(18),
467bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_CLEAR_CAM_MODE			= BIT(19),
468bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_PROMISC_MODE		= BIT(20),
469bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_CLEAR_PROMISC_MODE		= BIT(21),
470bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_SET_LMAC2_FRAGMENTED		= BIT(22),
471bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_FLAG_CLEAR_LMAC2_FRAGMENTED		= BIT(23),
472bfcc09ddSBjoern A. Zeeb 
473bfcc09ddSBjoern A. Zeeb 	/* Bits 26-31 are for num of channels in channel_array */
474bfcc09ddSBjoern A. Zeeb #define SCAN_CONFIG_N_CHANNELS(n) ((n) << 26)
475bfcc09ddSBjoern A. Zeeb };
476bfcc09ddSBjoern A. Zeeb 
477bfcc09ddSBjoern A. Zeeb enum scan_config_rates {
478bfcc09ddSBjoern A. Zeeb 	/* OFDM basic rates */
479bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_6M	= BIT(0),
480bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_9M	= BIT(1),
481bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_12M	= BIT(2),
482bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_18M	= BIT(3),
483bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_24M	= BIT(4),
484bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_36M	= BIT(5),
485bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_48M	= BIT(6),
486bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_54M	= BIT(7),
487bfcc09ddSBjoern A. Zeeb 	/* CCK basic rates */
488bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_1M	= BIT(8),
489bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_2M	= BIT(9),
490bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_5M	= BIT(10),
491bfcc09ddSBjoern A. Zeeb 	SCAN_CONFIG_RATE_11M	= BIT(11),
492bfcc09ddSBjoern A. Zeeb 
493bfcc09ddSBjoern A. Zeeb 	/* Bits 16-27 are for supported rates */
494bfcc09ddSBjoern A. Zeeb #define SCAN_CONFIG_SUPPORTED_RATE(rate)	((rate) << 16)
495bfcc09ddSBjoern A. Zeeb };
496bfcc09ddSBjoern A. Zeeb 
497bfcc09ddSBjoern A. Zeeb enum iwl_channel_flags {
498bfcc09ddSBjoern A. Zeeb 	IWL_CHANNEL_FLAG_EBS				= BIT(0),
499bfcc09ddSBjoern A. Zeeb 	IWL_CHANNEL_FLAG_ACCURATE_EBS			= BIT(1),
500bfcc09ddSBjoern A. Zeeb 	IWL_CHANNEL_FLAG_EBS_ADD			= BIT(2),
501bfcc09ddSBjoern A. Zeeb 	IWL_CHANNEL_FLAG_PRE_SCAN_PASSIVE2ACTIVE	= BIT(3),
502bfcc09ddSBjoern A. Zeeb };
503bfcc09ddSBjoern A. Zeeb 
504bfcc09ddSBjoern A. Zeeb enum iwl_uhb_chan_cfg_flags {
505bfcc09ddSBjoern A. Zeeb 	IWL_UHB_CHAN_CFG_FLAG_UNSOLICITED_PROBE_RES = BIT(24),
506bfcc09ddSBjoern A. Zeeb 	IWL_UHB_CHAN_CFG_FLAG_PSC_CHAN_NO_LISTEN    = BIT(25),
507bfcc09ddSBjoern A. Zeeb 	IWL_UHB_CHAN_CFG_FLAG_FORCE_PASSIVE         = BIT(26),
508bfcc09ddSBjoern A. Zeeb };
509bfcc09ddSBjoern A. Zeeb /**
510bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_dwell
511bfcc09ddSBjoern A. Zeeb  * @active:		default dwell time for active scan
512bfcc09ddSBjoern A. Zeeb  * @passive:		default dwell time for passive scan
513bfcc09ddSBjoern A. Zeeb  * @fragmented:		default dwell time for fragmented scan
514bfcc09ddSBjoern A. Zeeb  * @extended:		default dwell time for channels 1, 6 and 11
515bfcc09ddSBjoern A. Zeeb  */
516bfcc09ddSBjoern A. Zeeb struct iwl_scan_dwell {
517bfcc09ddSBjoern A. Zeeb 	u8 active;
518bfcc09ddSBjoern A. Zeeb 	u8 passive;
519bfcc09ddSBjoern A. Zeeb 	u8 fragmented;
520bfcc09ddSBjoern A. Zeeb 	u8 extended;
521bfcc09ddSBjoern A. Zeeb } __packed;
522bfcc09ddSBjoern A. Zeeb 
523bfcc09ddSBjoern A. Zeeb /**
524d9836fb4SBjoern A. Zeeb  * struct iwl_scan_config_v1 - scan configuration command
525bfcc09ddSBjoern A. Zeeb  * @flags:			enum scan_config_flags
526bfcc09ddSBjoern A. Zeeb  * @tx_chains:			valid_tx antenna - ANT_* definitions
527bfcc09ddSBjoern A. Zeeb  * @rx_chains:			valid_rx antenna - ANT_* definitions
528bfcc09ddSBjoern A. Zeeb  * @legacy_rates:		default legacy rates - enum scan_config_rates
529bfcc09ddSBjoern A. Zeeb  * @out_of_channel_time:	default max out of serving channel time
530bfcc09ddSBjoern A. Zeeb  * @suspend_time:		default max suspend time
531bfcc09ddSBjoern A. Zeeb  * @dwell:			dwells for the scan
532bfcc09ddSBjoern A. Zeeb  * @mac_addr:			default mac address to be used in probes
533bfcc09ddSBjoern A. Zeeb  * @bcast_sta_id:		the index of the station in the fw
534bfcc09ddSBjoern A. Zeeb  * @channel_flags:		default channel flags - enum iwl_channel_flags
535bfcc09ddSBjoern A. Zeeb  *				scan_config_channel_flag
536bfcc09ddSBjoern A. Zeeb  * @channel_array:		default supported channels
537bfcc09ddSBjoern A. Zeeb  */
538bfcc09ddSBjoern A. Zeeb struct iwl_scan_config_v1 {
539bfcc09ddSBjoern A. Zeeb 	__le32 flags;
540bfcc09ddSBjoern A. Zeeb 	__le32 tx_chains;
541bfcc09ddSBjoern A. Zeeb 	__le32 rx_chains;
542bfcc09ddSBjoern A. Zeeb 	__le32 legacy_rates;
543bfcc09ddSBjoern A. Zeeb 	__le32 out_of_channel_time;
544bfcc09ddSBjoern A. Zeeb 	__le32 suspend_time;
545bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_dwell dwell;
546bfcc09ddSBjoern A. Zeeb 	u8 mac_addr[ETH_ALEN];
547bfcc09ddSBjoern A. Zeeb 	u8 bcast_sta_id;
548bfcc09ddSBjoern A. Zeeb 	u8 channel_flags;
549bfcc09ddSBjoern A. Zeeb 	u8 channel_array[];
550bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_CONFIG_DB_CMD_API_S */
551bfcc09ddSBjoern A. Zeeb 
552bfcc09ddSBjoern A. Zeeb #define SCAN_TWO_LMACS 2
553bfcc09ddSBjoern A. Zeeb #define SCAN_LB_LMAC_IDX 0
554bfcc09ddSBjoern A. Zeeb #define SCAN_HB_LMAC_IDX 1
555bfcc09ddSBjoern A. Zeeb 
556d9836fb4SBjoern A. Zeeb /**
557d9836fb4SBjoern A. Zeeb  * struct iwl_scan_config_v2 - scan configuration command
558d9836fb4SBjoern A. Zeeb  * @flags:			enum scan_config_flags
559d9836fb4SBjoern A. Zeeb  * @tx_chains:			valid_tx antenna - ANT_* definitions
560d9836fb4SBjoern A. Zeeb  * @rx_chains:			valid_rx antenna - ANT_* definitions
561d9836fb4SBjoern A. Zeeb  * @legacy_rates:		default legacy rates - enum scan_config_rates
562d9836fb4SBjoern A. Zeeb  * @out_of_channel_time:	default max out of serving channel time
563d9836fb4SBjoern A. Zeeb  * @suspend_time:		default max suspend time
564d9836fb4SBjoern A. Zeeb  * @dwell:			dwells for the scan
565d9836fb4SBjoern A. Zeeb  * @mac_addr:			default mac address to be used in probes
566d9836fb4SBjoern A. Zeeb  * @bcast_sta_id:		the index of the station in the fw
567d9836fb4SBjoern A. Zeeb  * @channel_flags:		default channel flags - enum iwl_channel_flags
568d9836fb4SBjoern A. Zeeb  *				scan_config_channel_flag
569d9836fb4SBjoern A. Zeeb  * @channel_array:		default supported channels
570d9836fb4SBjoern A. Zeeb  */
571bfcc09ddSBjoern A. Zeeb struct iwl_scan_config_v2 {
572bfcc09ddSBjoern A. Zeeb 	__le32 flags;
573bfcc09ddSBjoern A. Zeeb 	__le32 tx_chains;
574bfcc09ddSBjoern A. Zeeb 	__le32 rx_chains;
575bfcc09ddSBjoern A. Zeeb 	__le32 legacy_rates;
576bfcc09ddSBjoern A. Zeeb 	__le32 out_of_channel_time[SCAN_TWO_LMACS];
577bfcc09ddSBjoern A. Zeeb 	__le32 suspend_time[SCAN_TWO_LMACS];
578bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_dwell dwell;
579bfcc09ddSBjoern A. Zeeb 	u8 mac_addr[ETH_ALEN];
580bfcc09ddSBjoern A. Zeeb 	u8 bcast_sta_id;
581bfcc09ddSBjoern A. Zeeb 	u8 channel_flags;
582bfcc09ddSBjoern A. Zeeb 	u8 channel_array[];
583bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_CONFIG_DB_CMD_API_S_2 */
584bfcc09ddSBjoern A. Zeeb 
585bfcc09ddSBjoern A. Zeeb /**
586d9836fb4SBjoern A. Zeeb  * struct iwl_scan_config - scan configuration command
587bfcc09ddSBjoern A. Zeeb  * @enable_cam_mode: whether to enable CAM mode.
588bfcc09ddSBjoern A. Zeeb  * @enable_promiscouos_mode: whether to enable promiscouos mode
589bfcc09ddSBjoern A. Zeeb  * @bcast_sta_id: the index of the station in the fw. Deprecated starting with
590bfcc09ddSBjoern A. Zeeb  *     API version 5.
591bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
592bfcc09ddSBjoern A. Zeeb  * @tx_chains: valid_tx antenna - ANT_* definitions
593bfcc09ddSBjoern A. Zeeb  * @rx_chains: valid_rx antenna - ANT_* definitions
594bfcc09ddSBjoern A. Zeeb  */
595bfcc09ddSBjoern A. Zeeb struct iwl_scan_config {
596bfcc09ddSBjoern A. Zeeb 	u8 enable_cam_mode;
597bfcc09ddSBjoern A. Zeeb 	u8 enable_promiscouos_mode;
598bfcc09ddSBjoern A. Zeeb 	u8 bcast_sta_id;
599bfcc09ddSBjoern A. Zeeb 	u8 reserved;
600bfcc09ddSBjoern A. Zeeb 	__le32 tx_chains;
601bfcc09ddSBjoern A. Zeeb 	__le32 rx_chains;
602bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_CONFIG_DB_CMD_API_S_5 */
603bfcc09ddSBjoern A. Zeeb 
604bfcc09ddSBjoern A. Zeeb /**
605bfcc09ddSBjoern A. Zeeb  * enum iwl_umac_scan_flags - UMAC scan flags
606bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_FLAG_PREEMPTIVE: scan process triggered by this scan request
607bfcc09ddSBjoern A. Zeeb  *	can be preempted by other scan requests with higher priority.
608bfcc09ddSBjoern A. Zeeb  *	The low priority scan will be resumed when the higher proirity scan is
609bfcc09ddSBjoern A. Zeeb  *	completed.
610bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_FLAG_START_NOTIF: notification will be sent to the driver
611bfcc09ddSBjoern A. Zeeb  *	when scan starts.
612bfcc09ddSBjoern A. Zeeb  */
613bfcc09ddSBjoern A. Zeeb enum iwl_umac_scan_flags {
614bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_FLAG_PREEMPTIVE		= BIT(0),
615bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_FLAG_START_NOTIF		= BIT(1),
616bfcc09ddSBjoern A. Zeeb };
617bfcc09ddSBjoern A. Zeeb 
618bfcc09ddSBjoern A. Zeeb enum iwl_umac_scan_uid_offsets {
619bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_UID_TYPE_OFFSET		= 0,
620bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_UID_SEQ_OFFSET		= 8,
621bfcc09ddSBjoern A. Zeeb };
622bfcc09ddSBjoern A. Zeeb 
623bfcc09ddSBjoern A. Zeeb enum iwl_umac_scan_general_flags {
624bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PERIODIC		= BIT(0),
625bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_OVER_BT			= BIT(1),
626bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PASS_ALL		= BIT(2),
627bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PASSIVE			= BIT(3),
628bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PRE_CONNECT		= BIT(4),
629bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_ITER_COMPLETE		= BIT(5),
630bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_MULTIPLE_SSID		= BIT(6),
631bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_FRAGMENTED		= BIT(7),
632bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_RRM_ENABLED		= BIT(8),
633bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_MATCH			= BIT(9),
634bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_EXTENDED_DWELL		= BIT(10),
635bfcc09ddSBjoern A. Zeeb 	/* Extended dwell is obselete when adaptive dwell is used, making this
636bfcc09ddSBjoern A. Zeeb 	 * bit reusable. Hence, probe request defer is used only when adaptive
637bfcc09ddSBjoern A. Zeeb 	 * dwell is supported. */
638bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PROB_REQ_DEFER_SUPP	= BIT(10),
639bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_LMAC2_FRAGMENTED	= BIT(11),
640bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_ADAPTIVE_DWELL		= BIT(13),
641bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_MAX_CHNL_TIME		= BIT(14),
642bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_PROB_REQ_HIGH_TX_RATE	= BIT(15),
643bfcc09ddSBjoern A. Zeeb };
644bfcc09ddSBjoern A. Zeeb 
645bfcc09ddSBjoern A. Zeeb /**
646bfcc09ddSBjoern A. Zeeb  * enum iwl_umac_scan_general_flags2 - UMAC scan general flags #2
647bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL: Whether to send a complete
648bfcc09ddSBjoern A. Zeeb  *	notification per channel or not.
649bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER: Whether to allow channel
650bfcc09ddSBjoern A. Zeeb  *	reorder optimization or not.
651*a4128aadSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS2_COLLECT_CHANNEL_STATS: Enable channel statistics
652*a4128aadSBjoern A. Zeeb  *	collection when #IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE is set.
653bfcc09ddSBjoern A. Zeeb  */
654bfcc09ddSBjoern A. Zeeb enum iwl_umac_scan_general_flags2 {
655bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL		= BIT(0),
656bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER	= BIT(1),
657*a4128aadSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS2_COLLECT_CHANNEL_STATS	= BIT(3),
658bfcc09ddSBjoern A. Zeeb };
659bfcc09ddSBjoern A. Zeeb 
660bfcc09ddSBjoern A. Zeeb /**
661bfcc09ddSBjoern A. Zeeb  * enum iwl_umac_scan_general_flags_v2 - UMAC scan general flags version 2
662bfcc09ddSBjoern A. Zeeb  *
663bfcc09ddSBjoern A. Zeeb  * The FW flags were reordered and hence the driver introduce version 2
664bfcc09ddSBjoern A. Zeeb  *
665bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC: periodic or scheduled
666bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL: pass all probe responses and beacons
667bfcc09ddSBjoern A. Zeeb  *                                       during scan iterations
668bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE: send complete notification
669bfcc09ddSBjoern A. Zeeb  *      on every iteration instead of only once after the last iteration
670bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1: fragmented scan LMAC1
671bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2: fragmented scan LMAC2
672bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH: does this scan check for profile matching
673bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS: use all valid chains for RX
674bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL: works with adaptive dwell
675bfcc09ddSBjoern A. Zeeb  *                                             for active channel
676bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE: can be preempted by other requests
677bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START: send notification of scan start
678bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID: matching on multiple SSIDs
679bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE: all the channels scanned
680bfcc09ddSBjoern A. Zeeb  *                                           as passive
681bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN: at the end of 2.4GHz and
682bfcc09ddSBjoern A. Zeeb  *		5.2Ghz bands scan, trigger scan on 6GHz band to discover
683bfcc09ddSBjoern A. Zeeb  *		the reported collocated APs
684bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN: at the end of 2.4GHz and 5GHz
685bfcc09ddSBjoern A. Zeeb  *      bands scan, if not APs were discovered, allow scan to conitnue and scan
686bfcc09ddSBjoern A. Zeeb  *      6GHz PSC channels in order to discover country information.
687bfcc09ddSBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN_FILTER_IN: in case
688bfcc09ddSBjoern A. Zeeb  *      &IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN is enabled and scan is
689bfcc09ddSBjoern A. Zeeb  *      activated over 6GHz PSC channels, filter in beacons and probe responses.
690d9836fb4SBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_FLAGS_V2_OCE: if set, send probe requests in a minimum
691d9836fb4SBjoern A. Zeeb  *      rate of 5.5Mpbs, filter in broadcast probe responses and set the max
692d9836fb4SBjoern A. Zeeb  *      channel time indication field in the FILS request parameters element
693d9836fb4SBjoern A. Zeeb  *      (if included by the driver in the probe request IEs).
694bfcc09ddSBjoern A. Zeeb  */
695bfcc09ddSBjoern A. Zeeb enum iwl_umac_scan_general_flags_v2 {
696bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_PERIODIC             = BIT(0),
697bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_PASS_ALL             = BIT(1),
698bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_NTFY_ITER_COMPLETE   = BIT(2),
699bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC1     = BIT(3),
700bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_FRAGMENTED_LMAC2     = BIT(4),
701bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_MATCH                = BIT(5),
702bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_USE_ALL_RX_CHAINS    = BIT(6),
703bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_ADAPTIVE_DWELL       = BIT(7),
704bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_PREEMPTIVE           = BIT(8),
705bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_NTF_START            = BIT(9),
706bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_MULTI_SSID           = BIT(10),
707bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE        = BIT(11),
708bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_TRIGGER_UHB_SCAN     = BIT(12),
709bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN    = BIT(13),
710bfcc09ddSBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_6GHZ_PASSIVE_SCAN_FILTER_IN = BIT(14),
711d9836fb4SBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_FLAGS_V2_OCE                  = BIT(15),
712d9836fb4SBjoern A. Zeeb };
713d9836fb4SBjoern A. Zeeb 
714d9836fb4SBjoern A. Zeeb /**
715d9836fb4SBjoern A. Zeeb  * enum iwl_umac_scan_general_params_flags2 - UMAC scan general flags2
716d9836fb4SBjoern A. Zeeb  *
717d9836fb4SBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_LB: scan event scheduling
718d9836fb4SBjoern A. Zeeb  *     should be aware of a P2P GO operation on the 2GHz band.
719d9836fb4SBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_HB: scan event scheduling
720d9836fb4SBjoern A. Zeeb  *     should be aware of a P2P GO operation on the 5GHz or 6GHz band.
7219af1bba4SBjoern A. Zeeb  * @IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_DONT_TOGGLE_ANT: don't toggle between
7229af1bba4SBjoern A. Zeeb  *     valid antennas, and use the same antenna as in previous scan
723d9836fb4SBjoern A. Zeeb  */
724d9836fb4SBjoern A. Zeeb enum iwl_umac_scan_general_params_flags2 {
725d9836fb4SBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_LB = BIT(0),
726d9836fb4SBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_RESPECT_P2P_GO_HB = BIT(1),
7279af1bba4SBjoern A. Zeeb 	IWL_UMAC_SCAN_GEN_PARAMS_FLAGS2_DONT_TOGGLE_ANT   = BIT(2),
728bfcc09ddSBjoern A. Zeeb };
729bfcc09ddSBjoern A. Zeeb 
730bfcc09ddSBjoern A. Zeeb /**
731bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_channel_cfg_umac
732bfcc09ddSBjoern A. Zeeb  * @flags:		bitmap - 0-19:	directed scan to i'th ssid.
733bfcc09ddSBjoern A. Zeeb  * @channel_num:	channel number 1-13 etc.
734bfcc09ddSBjoern A. Zeeb  * @band:		band of channel: 0 for 2GHz, 1 for 5GHz
735bfcc09ddSBjoern A. Zeeb  * @iter_count:		repetition count for the channel.
736bfcc09ddSBjoern A. Zeeb  * @iter_interval:	interval between two scan iterations on one channel.
737bfcc09ddSBjoern A. Zeeb  */
738bfcc09ddSBjoern A. Zeeb struct  iwl_scan_channel_cfg_umac {
7399af1bba4SBjoern A. Zeeb #define IWL_CHAN_CFG_FLAGS_BAND_POS 30
740bfcc09ddSBjoern A. Zeeb 	__le32 flags;
7419af1bba4SBjoern A. Zeeb 
7429af1bba4SBjoern A. Zeeb 	/* All versions are of the same size, so use a union without adjusting
743bfcc09ddSBjoern A. Zeeb 	 * the command size later
744bfcc09ddSBjoern A. Zeeb 	 */
745bfcc09ddSBjoern A. Zeeb 	union {
746bfcc09ddSBjoern A. Zeeb 		struct {
747bfcc09ddSBjoern A. Zeeb 			u8 channel_num;
748bfcc09ddSBjoern A. Zeeb 			u8 iter_count;
749bfcc09ddSBjoern A. Zeeb 			__le16 iter_interval;
750bfcc09ddSBjoern A. Zeeb 		} v1;  /* SCAN_CHANNEL_CONFIG_API_S_VER_1 */
751bfcc09ddSBjoern A. Zeeb 		struct {
752bfcc09ddSBjoern A. Zeeb 			u8 channel_num;
753bfcc09ddSBjoern A. Zeeb 			u8 band;
754bfcc09ddSBjoern A. Zeeb 			u8 iter_count;
755bfcc09ddSBjoern A. Zeeb 			u8 iter_interval;
756bfcc09ddSBjoern A. Zeeb 		 } v2; /* SCAN_CHANNEL_CONFIG_API_S_VER_2
757bfcc09ddSBjoern A. Zeeb 			* SCAN_CHANNEL_CONFIG_API_S_VER_3
758bfcc09ddSBjoern A. Zeeb 			* SCAN_CHANNEL_CONFIG_API_S_VER_4
759bfcc09ddSBjoern A. Zeeb 			*/
7609af1bba4SBjoern A. Zeeb 		struct {
7619af1bba4SBjoern A. Zeeb 			u8 channel_num;
7629af1bba4SBjoern A. Zeeb 			u8 psd_20;
7639af1bba4SBjoern A. Zeeb 			u8 iter_count;
7649af1bba4SBjoern A. Zeeb 			u8 iter_interval;
7659af1bba4SBjoern A. Zeeb 		} v5;  /* SCAN_CHANNEL_CONFIG_API_S_VER_5 */
766bfcc09ddSBjoern A. Zeeb 	};
767bfcc09ddSBjoern A. Zeeb } __packed;
768bfcc09ddSBjoern A. Zeeb 
769bfcc09ddSBjoern A. Zeeb /**
770bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_umac_schedule
771bfcc09ddSBjoern A. Zeeb  * @interval: interval in seconds between scan iterations
772bfcc09ddSBjoern A. Zeeb  * @iter_count: num of scan iterations for schedule plan, 0xff for infinite loop
773bfcc09ddSBjoern A. Zeeb  * @reserved: for alignment and future use
774bfcc09ddSBjoern A. Zeeb  */
775bfcc09ddSBjoern A. Zeeb struct iwl_scan_umac_schedule {
776bfcc09ddSBjoern A. Zeeb 	__le16 interval;
777bfcc09ddSBjoern A. Zeeb 	u8 iter_count;
778bfcc09ddSBjoern A. Zeeb 	u8 reserved;
779bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_SCHED_PARAM_API_S_VER_1 */
780bfcc09ddSBjoern A. Zeeb 
781bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_umac_tail_v1 {
782bfcc09ddSBjoern A. Zeeb 	/* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
783bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
784bfcc09ddSBjoern A. Zeeb 	__le16 delay;
785bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
786bfcc09ddSBjoern A. Zeeb 	/* SCAN_PROBE_PARAMS_API_S_VER_1 */
787bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_req_v1 preq;
788bfcc09ddSBjoern A. Zeeb 	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
789bfcc09ddSBjoern A. Zeeb } __packed;
790bfcc09ddSBjoern A. Zeeb 
791bfcc09ddSBjoern A. Zeeb /**
792*a4128aadSBjoern A. Zeeb  * struct iwl_scan_req_umac_tail_v2 - the rest of the UMAC scan request command
793bfcc09ddSBjoern A. Zeeb  *      parameters following channels configuration array.
794bfcc09ddSBjoern A. Zeeb  * @schedule: two scheduling plans.
795bfcc09ddSBjoern A. Zeeb  * @delay: delay in TUs before starting the first scan iteration
796bfcc09ddSBjoern A. Zeeb  * @reserved: for future use and alignment
797bfcc09ddSBjoern A. Zeeb  * @preq: probe request with IEs blocks
798bfcc09ddSBjoern A. Zeeb  * @direct_scan: list of SSIDs for directed active scan
799bfcc09ddSBjoern A. Zeeb  */
800bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_umac_tail_v2 {
801bfcc09ddSBjoern A. Zeeb 	/* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
802bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
803bfcc09ddSBjoern A. Zeeb 	__le16 delay;
804bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
805bfcc09ddSBjoern A. Zeeb 	/* SCAN_PROBE_PARAMS_API_S_VER_2 */
806bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_req preq;
807bfcc09ddSBjoern A. Zeeb 	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
808bfcc09ddSBjoern A. Zeeb } __packed;
809bfcc09ddSBjoern A. Zeeb 
810bfcc09ddSBjoern A. Zeeb /**
811bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_umac_chan_param
812bfcc09ddSBjoern A. Zeeb  * @flags: channel flags &enum iwl_scan_channel_flags
813bfcc09ddSBjoern A. Zeeb  * @count: num of channels in scan request
814bfcc09ddSBjoern A. Zeeb  * @reserved: for future use and alignment
815bfcc09ddSBjoern A. Zeeb  */
816bfcc09ddSBjoern A. Zeeb struct iwl_scan_umac_chan_param {
817bfcc09ddSBjoern A. Zeeb 	u8 flags;
818bfcc09ddSBjoern A. Zeeb 	u8 count;
819bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
820bfcc09ddSBjoern A. Zeeb } __packed; /*SCAN_CHANNEL_PARAMS_API_S_VER_1 */
821bfcc09ddSBjoern A. Zeeb 
822bfcc09ddSBjoern A. Zeeb /**
823bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_req_umac
824bfcc09ddSBjoern A. Zeeb  * @flags: &enum iwl_umac_scan_flags
825bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
826bfcc09ddSBjoern A. Zeeb  * @ooc_priority: out of channel priority - &enum iwl_scan_priority
827bfcc09ddSBjoern A. Zeeb  * @general_flags: &enum iwl_umac_scan_general_flags
828bfcc09ddSBjoern A. Zeeb  * @scan_start_mac_id: report the scan start TSF time according to this mac TSF
829bfcc09ddSBjoern A. Zeeb  * @extended_dwell: dwell time for channels 1, 6 and 11
830bfcc09ddSBjoern A. Zeeb  * @active_dwell: dwell time for active scan per LMAC
831bfcc09ddSBjoern A. Zeeb  * @passive_dwell: dwell time for passive scan per LMAC
832bfcc09ddSBjoern A. Zeeb  * @fragmented_dwell: dwell time for fragmented passive scan
833bfcc09ddSBjoern A. Zeeb  * @adwell_default_n_aps: for adaptive dwell the default number of APs
834bfcc09ddSBjoern A. Zeeb  *	per channel
835bfcc09ddSBjoern A. Zeeb  * @adwell_default_n_aps_social: for adaptive dwell the default
836bfcc09ddSBjoern A. Zeeb  *	number of APs per social (1,6,11) channel
837bfcc09ddSBjoern A. Zeeb  * @general_flags2: &enum iwl_umac_scan_general_flags2
838bfcc09ddSBjoern A. Zeeb  * @adwell_max_budget: for adaptive dwell the maximal budget of TU to be added
839bfcc09ddSBjoern A. Zeeb  *	to total scan time
840bfcc09ddSBjoern A. Zeeb  * @max_out_time: max out of serving channel time, per LMAC - for CDB there
841bfcc09ddSBjoern A. Zeeb  *	are 2 LMACs
842bfcc09ddSBjoern A. Zeeb  * @suspend_time: max suspend time, per LMAC - for CDB there are 2 LMACs
843bfcc09ddSBjoern A. Zeeb  * @scan_priority: scan internal prioritization &enum iwl_scan_priority
844bfcc09ddSBjoern A. Zeeb  * @num_of_fragments: Number of fragments needed for full coverage per band.
845bfcc09ddSBjoern A. Zeeb  *	Relevant only for fragmented scan.
846bfcc09ddSBjoern A. Zeeb  * @channel: &struct iwl_scan_umac_chan_param
847bfcc09ddSBjoern A. Zeeb  * @reserved: for future use and alignment
848bfcc09ddSBjoern A. Zeeb  * @reserved3: for future use and alignment
849bfcc09ddSBjoern A. Zeeb  * @data: &struct iwl_scan_channel_cfg_umac and
850bfcc09ddSBjoern A. Zeeb  *	&struct iwl_scan_req_umac_tail
851bfcc09ddSBjoern A. Zeeb  */
852bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_umac {
853bfcc09ddSBjoern A. Zeeb 	__le32 flags;
854bfcc09ddSBjoern A. Zeeb 	__le32 uid;
855bfcc09ddSBjoern A. Zeeb 	__le32 ooc_priority;
856bfcc09ddSBjoern A. Zeeb 	__le16 general_flags;
857bfcc09ddSBjoern A. Zeeb 	u8 reserved;
858bfcc09ddSBjoern A. Zeeb 	u8 scan_start_mac_id;
859bfcc09ddSBjoern A. Zeeb 	union {
860bfcc09ddSBjoern A. Zeeb 		struct {
861bfcc09ddSBjoern A. Zeeb 			u8 extended_dwell;
862bfcc09ddSBjoern A. Zeeb 			u8 active_dwell;
863bfcc09ddSBjoern A. Zeeb 			u8 passive_dwell;
864bfcc09ddSBjoern A. Zeeb 			u8 fragmented_dwell;
865bfcc09ddSBjoern A. Zeeb 			__le32 max_out_time;
866bfcc09ddSBjoern A. Zeeb 			__le32 suspend_time;
867bfcc09ddSBjoern A. Zeeb 			__le32 scan_priority;
868bfcc09ddSBjoern A. Zeeb 			struct iwl_scan_umac_chan_param channel;
869bfcc09ddSBjoern A. Zeeb 			u8 data[];
870bfcc09ddSBjoern A. Zeeb 		} v1; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_1 */
871bfcc09ddSBjoern A. Zeeb 		struct {
872bfcc09ddSBjoern A. Zeeb 			u8 extended_dwell;
873bfcc09ddSBjoern A. Zeeb 			u8 active_dwell;
874bfcc09ddSBjoern A. Zeeb 			u8 passive_dwell;
875bfcc09ddSBjoern A. Zeeb 			u8 fragmented_dwell;
876bfcc09ddSBjoern A. Zeeb 			__le32 max_out_time[SCAN_TWO_LMACS];
877bfcc09ddSBjoern A. Zeeb 			__le32 suspend_time[SCAN_TWO_LMACS];
878bfcc09ddSBjoern A. Zeeb 			__le32 scan_priority;
879bfcc09ddSBjoern A. Zeeb 			struct iwl_scan_umac_chan_param channel;
880bfcc09ddSBjoern A. Zeeb 			u8 data[];
881bfcc09ddSBjoern A. Zeeb 		} v6; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_6 */
882bfcc09ddSBjoern A. Zeeb 		struct {
883bfcc09ddSBjoern A. Zeeb 			u8 active_dwell;
884bfcc09ddSBjoern A. Zeeb 			u8 passive_dwell;
885bfcc09ddSBjoern A. Zeeb 			u8 fragmented_dwell;
886bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_n_aps;
887bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_n_aps_social;
888bfcc09ddSBjoern A. Zeeb 			u8 reserved3;
889bfcc09ddSBjoern A. Zeeb 			__le16 adwell_max_budget;
890bfcc09ddSBjoern A. Zeeb 			__le32 max_out_time[SCAN_TWO_LMACS];
891bfcc09ddSBjoern A. Zeeb 			__le32 suspend_time[SCAN_TWO_LMACS];
892bfcc09ddSBjoern A. Zeeb 			__le32 scan_priority;
893bfcc09ddSBjoern A. Zeeb 			struct iwl_scan_umac_chan_param channel;
894bfcc09ddSBjoern A. Zeeb 			u8 data[];
895bfcc09ddSBjoern A. Zeeb 		} v7; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_7 */
896bfcc09ddSBjoern A. Zeeb 		struct {
897bfcc09ddSBjoern A. Zeeb 			u8 active_dwell[SCAN_TWO_LMACS];
898bfcc09ddSBjoern A. Zeeb 			u8 reserved2;
899bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_n_aps;
900bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_n_aps_social;
901bfcc09ddSBjoern A. Zeeb 			u8 general_flags2;
902bfcc09ddSBjoern A. Zeeb 			__le16 adwell_max_budget;
903bfcc09ddSBjoern A. Zeeb 			__le32 max_out_time[SCAN_TWO_LMACS];
904bfcc09ddSBjoern A. Zeeb 			__le32 suspend_time[SCAN_TWO_LMACS];
905bfcc09ddSBjoern A. Zeeb 			__le32 scan_priority;
906bfcc09ddSBjoern A. Zeeb 			u8 passive_dwell[SCAN_TWO_LMACS];
907bfcc09ddSBjoern A. Zeeb 			u8 num_of_fragments[SCAN_TWO_LMACS];
908bfcc09ddSBjoern A. Zeeb 			struct iwl_scan_umac_chan_param channel;
909bfcc09ddSBjoern A. Zeeb 			u8 data[];
910bfcc09ddSBjoern A. Zeeb 		} v8; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_8 */
911bfcc09ddSBjoern A. Zeeb 		struct {
912bfcc09ddSBjoern A. Zeeb 			u8 active_dwell[SCAN_TWO_LMACS];
913bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_hb_n_aps;
914bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_lb_n_aps;
915bfcc09ddSBjoern A. Zeeb 			u8 adwell_default_n_aps_social;
916bfcc09ddSBjoern A. Zeeb 			u8 general_flags2;
917bfcc09ddSBjoern A. Zeeb 			__le16 adwell_max_budget;
918bfcc09ddSBjoern A. Zeeb 			__le32 max_out_time[SCAN_TWO_LMACS];
919bfcc09ddSBjoern A. Zeeb 			__le32 suspend_time[SCAN_TWO_LMACS];
920bfcc09ddSBjoern A. Zeeb 			__le32 scan_priority;
921bfcc09ddSBjoern A. Zeeb 			u8 passive_dwell[SCAN_TWO_LMACS];
922bfcc09ddSBjoern A. Zeeb 			u8 num_of_fragments[SCAN_TWO_LMACS];
923bfcc09ddSBjoern A. Zeeb 			struct iwl_scan_umac_chan_param channel;
924bfcc09ddSBjoern A. Zeeb 			u8 data[];
925bfcc09ddSBjoern A. Zeeb 		} v9; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_9 */
926bfcc09ddSBjoern A. Zeeb 	};
927bfcc09ddSBjoern A. Zeeb } __packed;
928bfcc09ddSBjoern A. Zeeb 
929bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_REQ_UMAC_SIZE_V8 sizeof(struct iwl_scan_req_umac)
930bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_REQ_UMAC_SIZE_V7 48
931bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_REQ_UMAC_SIZE_V6 44
932bfcc09ddSBjoern A. Zeeb #define IWL_SCAN_REQ_UMAC_SIZE_V1 36
933bfcc09ddSBjoern A. Zeeb 
934bfcc09ddSBjoern A. Zeeb /**
935bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_probe_params_v3
936bfcc09ddSBjoern A. Zeeb  * @preq: scan probe request params
937bfcc09ddSBjoern A. Zeeb  * @ssid_num: number of valid SSIDs in direct scan array
938bfcc09ddSBjoern A. Zeeb  * @short_ssid_num: number of valid short SSIDs in short ssid array
939bfcc09ddSBjoern A. Zeeb  * @bssid_num: number of valid bssid in bssids array
940bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
941bfcc09ddSBjoern A. Zeeb  * @direct_scan: list of ssids
942bfcc09ddSBjoern A. Zeeb  * @short_ssid: array of short ssids
943bfcc09ddSBjoern A. Zeeb  * @bssid_array: array of bssids
944bfcc09ddSBjoern A. Zeeb  */
945bfcc09ddSBjoern A. Zeeb struct iwl_scan_probe_params_v3 {
946bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_req preq;
947bfcc09ddSBjoern A. Zeeb 	u8 ssid_num;
948bfcc09ddSBjoern A. Zeeb 	u8 short_ssid_num;
949bfcc09ddSBjoern A. Zeeb 	u8 bssid_num;
950bfcc09ddSBjoern A. Zeeb 	u8 reserved;
951bfcc09ddSBjoern A. Zeeb 	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
952bfcc09ddSBjoern A. Zeeb 	__le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE];
953bfcc09ddSBjoern A. Zeeb 	u8 bssid_array[SCAN_BSSID_MAX_SIZE][ETH_ALEN];
954bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_PROBE_PARAMS_API_S_VER_3 */
955bfcc09ddSBjoern A. Zeeb 
956bfcc09ddSBjoern A. Zeeb /**
957bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_probe_params_v4
958bfcc09ddSBjoern A. Zeeb  * @preq: scan probe request params
959bfcc09ddSBjoern A. Zeeb  * @short_ssid_num: number of valid short SSIDs in short ssid array
960bfcc09ddSBjoern A. Zeeb  * @bssid_num: number of valid bssid in bssids array
961bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
962bfcc09ddSBjoern A. Zeeb  * @direct_scan: list of ssids
963bfcc09ddSBjoern A. Zeeb  * @short_ssid: array of short ssids
964bfcc09ddSBjoern A. Zeeb  * @bssid_array: array of bssids
965bfcc09ddSBjoern A. Zeeb  */
966bfcc09ddSBjoern A. Zeeb struct iwl_scan_probe_params_v4 {
967bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_req preq;
968bfcc09ddSBjoern A. Zeeb 	u8 short_ssid_num;
969bfcc09ddSBjoern A. Zeeb 	u8 bssid_num;
970bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
971bfcc09ddSBjoern A. Zeeb 	struct iwl_ssid_ie direct_scan[PROBE_OPTION_MAX];
972bfcc09ddSBjoern A. Zeeb 	__le32 short_ssid[SCAN_SHORT_SSID_MAX_SIZE];
973bfcc09ddSBjoern A. Zeeb 	u8 bssid_array[SCAN_BSSID_MAX_SIZE][ETH_ALEN];
974bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_PROBE_PARAMS_API_S_VER_4 */
975bfcc09ddSBjoern A. Zeeb 
976bfcc09ddSBjoern A. Zeeb #define SCAN_MAX_NUM_CHANS_V3 67
977bfcc09ddSBjoern A. Zeeb 
978bfcc09ddSBjoern A. Zeeb /**
979bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_channel_params_v4
980bfcc09ddSBjoern A. Zeeb  * @flags: channel flags &enum iwl_scan_channel_flags
981bfcc09ddSBjoern A. Zeeb  * @count: num of channels in scan request
982bfcc09ddSBjoern A. Zeeb  * @num_of_aps_override: override the number of APs the FW uses to calculate
983bfcc09ddSBjoern A. Zeeb  *	dwell time when adaptive dwell is used
984bfcc09ddSBjoern A. Zeeb  * @reserved: for future use and alignment
985bfcc09ddSBjoern A. Zeeb  * @channel_config: array of explicit channel configurations
986bfcc09ddSBjoern A. Zeeb  *                  for 2.4Ghz and 5.2Ghz bands
987bfcc09ddSBjoern A. Zeeb  * @adwell_ch_override_bitmap: when using adaptive dwell, override the number
988bfcc09ddSBjoern A. Zeeb  *	of APs value with &num_of_aps_override for the channel.
989bfcc09ddSBjoern A. Zeeb  *	To cast channel to index, use &iwl_mvm_scan_ch_and_band_to_idx
990bfcc09ddSBjoern A. Zeeb  */
991bfcc09ddSBjoern A. Zeeb struct iwl_scan_channel_params_v4 {
992bfcc09ddSBjoern A. Zeeb 	u8 flags;
993bfcc09ddSBjoern A. Zeeb 	u8 count;
994bfcc09ddSBjoern A. Zeeb 	u8 num_of_aps_override;
995bfcc09ddSBjoern A. Zeeb 	u8 reserved;
996bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3];
997bfcc09ddSBjoern A. Zeeb 	u8 adwell_ch_override_bitmap[16];
998bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_4 also
999bfcc09ddSBjoern A. Zeeb 	       SCAN_CHANNEL_PARAMS_API_S_VER_5 */
1000bfcc09ddSBjoern A. Zeeb 
1001bfcc09ddSBjoern A. Zeeb /**
10029af1bba4SBjoern A. Zeeb  * struct iwl_scan_channel_params_v7
1003bfcc09ddSBjoern A. Zeeb  * @flags: channel flags &enum iwl_scan_channel_flags
1004bfcc09ddSBjoern A. Zeeb  * @count: num of channels in scan request
1005bfcc09ddSBjoern A. Zeeb  * @n_aps_override: override the number of APs the FW uses to calculate dwell
1006bfcc09ddSBjoern A. Zeeb  *	time when adaptive dwell is used.
1007bfcc09ddSBjoern A. Zeeb  *	Channel k will use n_aps_override[i] when BIT(20 + i) is set in
1008bfcc09ddSBjoern A. Zeeb  *	channel_config[k].flags
1009bfcc09ddSBjoern A. Zeeb  * @channel_config: array of explicit channel configurations
1010bfcc09ddSBjoern A. Zeeb  *                  for 2.4Ghz and 5.2Ghz bands
1011bfcc09ddSBjoern A. Zeeb  */
10129af1bba4SBjoern A. Zeeb struct iwl_scan_channel_params_v7 {
1013bfcc09ddSBjoern A. Zeeb 	u8 flags;
1014bfcc09ddSBjoern A. Zeeb 	u8 count;
1015bfcc09ddSBjoern A. Zeeb 	u8 n_aps_override[2];
1016bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_channel_cfg_umac channel_config[SCAN_MAX_NUM_CHANS_V3];
1017bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_CHANNEL_PARAMS_API_S_VER_6 */
1018bfcc09ddSBjoern A. Zeeb 
1019bfcc09ddSBjoern A. Zeeb /**
1020d9836fb4SBjoern A. Zeeb  * struct iwl_scan_general_params_v11
1021d9836fb4SBjoern A. Zeeb  * @flags: &enum iwl_umac_scan_general_flags_v2
1022bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for future
10239af1bba4SBjoern A. Zeeb  * @scan_start_mac_or_link_id: report the scan start TSF time according to this
10249af1bba4SBjoern A. Zeeb  *     mac (up to verion 11) or link (starting with version 12) TSF
1025bfcc09ddSBjoern A. Zeeb  * @active_dwell: dwell time for active scan per LMAC
1026bfcc09ddSBjoern A. Zeeb  * @adwell_default_2g: adaptive dwell default number of APs
1027bfcc09ddSBjoern A. Zeeb  *                        for 2.4GHz channel
1028bfcc09ddSBjoern A. Zeeb  * @adwell_default_5g: adaptive dwell default number of APs
1029bfcc09ddSBjoern A. Zeeb  *                        for 5GHz channels
1030bfcc09ddSBjoern A. Zeeb  * @adwell_default_social_chn: adaptive dwell default number of
1031bfcc09ddSBjoern A. Zeeb  *                             APs per social channel
1032d9836fb4SBjoern A. Zeeb  * @flags2: for version 11 see &enum iwl_umac_scan_general_params_flags2.
1033d9836fb4SBjoern A. Zeeb  *     Otherwise reserved.
1034bfcc09ddSBjoern A. Zeeb  * @adwell_max_budget: the maximal number of TUs that adaptive dwell
1035bfcc09ddSBjoern A. Zeeb  *                     can add to the total scan time
1036bfcc09ddSBjoern A. Zeeb  * @max_out_of_time: max out of serving channel time, per LMAC
1037bfcc09ddSBjoern A. Zeeb  * @suspend_time: max suspend time, per LMAC
1038bfcc09ddSBjoern A. Zeeb  * @scan_priority: priority of the request
1039bfcc09ddSBjoern A. Zeeb  * @passive_dwell: continues dwell time for passive channel
1040bfcc09ddSBjoern A. Zeeb  *                 (without adaptive dwell)
1041bfcc09ddSBjoern A. Zeeb  * @num_of_fragments: number of fragments needed for full fragmented
1042bfcc09ddSBjoern A. Zeeb  *                    scan coverage.
1043bfcc09ddSBjoern A. Zeeb  */
1044d9836fb4SBjoern A. Zeeb struct iwl_scan_general_params_v11 {
1045bfcc09ddSBjoern A. Zeeb 	__le16 flags;
1046bfcc09ddSBjoern A. Zeeb 	u8 reserved;
10479af1bba4SBjoern A. Zeeb 	u8 scan_start_mac_or_link_id;
1048bfcc09ddSBjoern A. Zeeb 	u8 active_dwell[SCAN_TWO_LMACS];
1049bfcc09ddSBjoern A. Zeeb 	u8 adwell_default_2g;
1050bfcc09ddSBjoern A. Zeeb 	u8 adwell_default_5g;
1051bfcc09ddSBjoern A. Zeeb 	u8 adwell_default_social_chn;
1052d9836fb4SBjoern A. Zeeb 	u8 flags2;
1053bfcc09ddSBjoern A. Zeeb 	__le16 adwell_max_budget;
1054bfcc09ddSBjoern A. Zeeb 	__le32 max_out_of_time[SCAN_TWO_LMACS];
1055bfcc09ddSBjoern A. Zeeb 	__le32 suspend_time[SCAN_TWO_LMACS];
1056bfcc09ddSBjoern A. Zeeb 	__le32 scan_priority;
1057bfcc09ddSBjoern A. Zeeb 	u8 passive_dwell[SCAN_TWO_LMACS];
1058bfcc09ddSBjoern A. Zeeb 	u8 num_of_fragments[SCAN_TWO_LMACS];
10599af1bba4SBjoern A. Zeeb } __packed; /* SCAN_GENERAL_PARAMS_API_S_VER_12, *_VER_11  and *_VER_10 */
1060bfcc09ddSBjoern A. Zeeb 
1061bfcc09ddSBjoern A. Zeeb /**
1062bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_periodic_parms_v1
1063bfcc09ddSBjoern A. Zeeb  * @schedule: can scheduling parameter
1064bfcc09ddSBjoern A. Zeeb  * @delay: initial delay of the periodic scan in seconds
1065bfcc09ddSBjoern A. Zeeb  * @reserved: reserved for future
1066bfcc09ddSBjoern A. Zeeb  */
1067bfcc09ddSBjoern A. Zeeb struct iwl_scan_periodic_parms_v1 {
1068bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_umac_schedule schedule[IWL_MAX_SCHED_SCAN_PLANS];
1069bfcc09ddSBjoern A. Zeeb 	__le16 delay;
1070bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
1071bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_PERIODIC_PARAMS_API_S_VER_1 */
1072bfcc09ddSBjoern A. Zeeb 
1073bfcc09ddSBjoern A. Zeeb /**
1074bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_req_params_v12
1075d9836fb4SBjoern A. Zeeb  * @general_params: &struct iwl_scan_general_params_v11
1076bfcc09ddSBjoern A. Zeeb  * @channel_params: &struct iwl_scan_channel_params_v4
1077bfcc09ddSBjoern A. Zeeb  * @periodic_params: &struct iwl_scan_periodic_parms_v1
1078bfcc09ddSBjoern A. Zeeb  * @probe_params: &struct iwl_scan_probe_params_v3
1079bfcc09ddSBjoern A. Zeeb  */
1080bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_params_v12 {
1081d9836fb4SBjoern A. Zeeb 	struct iwl_scan_general_params_v11 general_params;
1082bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_channel_params_v4 channel_params;
1083bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_periodic_parms_v1 periodic_params;
1084bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_params_v3 probe_params;
1085bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_12 */
1086bfcc09ddSBjoern A. Zeeb 
1087bfcc09ddSBjoern A. Zeeb /**
1088*a4128aadSBjoern A. Zeeb  * struct iwl_scan_req_params_v17 - scan request parameters (v17)
1089d9836fb4SBjoern A. Zeeb  * @general_params: &struct iwl_scan_general_params_v11
10909af1bba4SBjoern A. Zeeb  * @channel_params: &struct iwl_scan_channel_params_v7
1091bfcc09ddSBjoern A. Zeeb  * @periodic_params: &struct iwl_scan_periodic_parms_v1
1092bfcc09ddSBjoern A. Zeeb  * @probe_params: &struct iwl_scan_probe_params_v4
1093bfcc09ddSBjoern A. Zeeb  */
10949af1bba4SBjoern A. Zeeb struct iwl_scan_req_params_v17 {
1095d9836fb4SBjoern A. Zeeb 	struct iwl_scan_general_params_v11 general_params;
10969af1bba4SBjoern A. Zeeb 	struct iwl_scan_channel_params_v7 channel_params;
1097bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_periodic_parms_v1 periodic_params;
1098bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_probe_params_v4 probe_params;
10999af1bba4SBjoern A. Zeeb } __packed; /* SCAN_REQUEST_PARAMS_API_S_VER_17 - 14 */
1100bfcc09ddSBjoern A. Zeeb 
1101bfcc09ddSBjoern A. Zeeb /**
1102bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_req_umac_v12
1103bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
1104bfcc09ddSBjoern A. Zeeb  * @ooc_priority: out of channel priority - &enum iwl_scan_priority
1105bfcc09ddSBjoern A. Zeeb  * @scan_params: scan parameters
1106bfcc09ddSBjoern A. Zeeb  */
1107bfcc09ddSBjoern A. Zeeb struct iwl_scan_req_umac_v12 {
1108bfcc09ddSBjoern A. Zeeb 	__le32 uid;
1109bfcc09ddSBjoern A. Zeeb 	__le32 ooc_priority;
1110bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_req_params_v12 scan_params;
1111bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_12 */
1112bfcc09ddSBjoern A. Zeeb 
1113bfcc09ddSBjoern A. Zeeb /**
1114*a4128aadSBjoern A. Zeeb  * struct iwl_scan_req_umac_v17 - scan request command (v17)
1115bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
1116bfcc09ddSBjoern A. Zeeb  * @ooc_priority: out of channel priority - &enum iwl_scan_priority
1117bfcc09ddSBjoern A. Zeeb  * @scan_params: scan parameters
1118bfcc09ddSBjoern A. Zeeb  */
11199af1bba4SBjoern A. Zeeb struct iwl_scan_req_umac_v17 {
1120bfcc09ddSBjoern A. Zeeb 	__le32 uid;
1121bfcc09ddSBjoern A. Zeeb 	__le32 ooc_priority;
11229af1bba4SBjoern A. Zeeb 	struct iwl_scan_req_params_v17 scan_params;
11239af1bba4SBjoern A. Zeeb } __packed; /* SCAN_REQUEST_CMD_UMAC_API_S_VER_17 - 14 */
1124bfcc09ddSBjoern A. Zeeb 
1125bfcc09ddSBjoern A. Zeeb /**
1126bfcc09ddSBjoern A. Zeeb  * struct iwl_umac_scan_abort
1127bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
1128bfcc09ddSBjoern A. Zeeb  * @flags: reserved
1129bfcc09ddSBjoern A. Zeeb  */
1130bfcc09ddSBjoern A. Zeeb struct iwl_umac_scan_abort {
1131bfcc09ddSBjoern A. Zeeb 	__le32 uid;
1132bfcc09ddSBjoern A. Zeeb 	__le32 flags;
1133bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_ABORT_CMD_UMAC_API_S_VER_1 */
1134bfcc09ddSBjoern A. Zeeb 
1135bfcc09ddSBjoern A. Zeeb /**
1136bfcc09ddSBjoern A. Zeeb  * struct iwl_umac_scan_complete
1137bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
1138bfcc09ddSBjoern A. Zeeb  * @last_schedule: last scheduling line
1139bfcc09ddSBjoern A. Zeeb  * @last_iter: last scan iteration number
1140bfcc09ddSBjoern A. Zeeb  * @status: &enum iwl_scan_offload_complete_status
1141bfcc09ddSBjoern A. Zeeb  * @ebs_status: &enum iwl_scan_ebs_status
1142bfcc09ddSBjoern A. Zeeb  * @time_from_last_iter: time elapsed from last iteration
1143bfcc09ddSBjoern A. Zeeb  * @reserved: for future use
1144bfcc09ddSBjoern A. Zeeb  */
1145bfcc09ddSBjoern A. Zeeb struct iwl_umac_scan_complete {
1146bfcc09ddSBjoern A. Zeeb 	__le32 uid;
1147bfcc09ddSBjoern A. Zeeb 	u8 last_schedule;
1148bfcc09ddSBjoern A. Zeeb 	u8 last_iter;
1149bfcc09ddSBjoern A. Zeeb 	u8 status;
1150bfcc09ddSBjoern A. Zeeb 	u8 ebs_status;
1151bfcc09ddSBjoern A. Zeeb 	__le32 time_from_last_iter;
1152bfcc09ddSBjoern A. Zeeb 	__le32 reserved;
1153bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_COMPLETE_NTF_UMAC_API_S_VER_1 */
1154bfcc09ddSBjoern A. Zeeb 
1155bfcc09ddSBjoern A. Zeeb #define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1 5
1156bfcc09ddSBjoern A. Zeeb #define SCAN_OFFLOAD_MATCHING_CHANNELS_LEN    7
1157bfcc09ddSBjoern A. Zeeb 
1158bfcc09ddSBjoern A. Zeeb /**
1159bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profile_match_v1 - match information
1160bfcc09ddSBjoern A. Zeeb  * @bssid: matched bssid
1161bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
1162bfcc09ddSBjoern A. Zeeb  * @channel: channel where the match occurred
1163bfcc09ddSBjoern A. Zeeb  * @energy: energy
1164bfcc09ddSBjoern A. Zeeb  * @matching_feature: feature matches
1165bfcc09ddSBjoern A. Zeeb  * @matching_channels: bitmap of channels that matched, referencing
1166bfcc09ddSBjoern A. Zeeb  *	the channels passed in the scan offload request.
1167bfcc09ddSBjoern A. Zeeb  */
1168bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile_match_v1 {
1169bfcc09ddSBjoern A. Zeeb 	u8 bssid[ETH_ALEN];
1170bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
1171bfcc09ddSBjoern A. Zeeb 	u8 channel;
1172bfcc09ddSBjoern A. Zeeb 	u8 energy;
1173bfcc09ddSBjoern A. Zeeb 	u8 matching_feature;
1174bfcc09ddSBjoern A. Zeeb 	u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN_V1];
1175bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_1 */
1176bfcc09ddSBjoern A. Zeeb 
1177bfcc09ddSBjoern A. Zeeb /**
1178bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profiles_query_v1 - match results query response
1179bfcc09ddSBjoern A. Zeeb  * @matched_profiles: bitmap of matched profiles, referencing the
1180bfcc09ddSBjoern A. Zeeb  *	matches passed in the scan offload request
1181bfcc09ddSBjoern A. Zeeb  * @last_scan_age: age of the last offloaded scan
1182bfcc09ddSBjoern A. Zeeb  * @n_scans_done: number of offloaded scans done
1183bfcc09ddSBjoern A. Zeeb  * @gp2_d0u: GP2 when D0U occurred
1184bfcc09ddSBjoern A. Zeeb  * @gp2_invoked: GP2 when scan offload was invoked
1185bfcc09ddSBjoern A. Zeeb  * @resume_while_scanning: not used
1186bfcc09ddSBjoern A. Zeeb  * @self_recovery: obsolete
1187bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
1188bfcc09ddSBjoern A. Zeeb  * @matches: array of match information, one for each match
1189bfcc09ddSBjoern A. Zeeb  */
1190bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profiles_query_v1 {
1191bfcc09ddSBjoern A. Zeeb 	__le32 matched_profiles;
1192bfcc09ddSBjoern A. Zeeb 	__le32 last_scan_age;
1193bfcc09ddSBjoern A. Zeeb 	__le32 n_scans_done;
1194bfcc09ddSBjoern A. Zeeb 	__le32 gp2_d0u;
1195bfcc09ddSBjoern A. Zeeb 	__le32 gp2_invoked;
1196bfcc09ddSBjoern A. Zeeb 	u8 resume_while_scanning;
1197bfcc09ddSBjoern A. Zeeb 	u8 self_recovery;
1198bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
11999af1bba4SBjoern A. Zeeb 	struct iwl_scan_offload_profile_match_v1 matches[];
1200bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_2 */
1201bfcc09ddSBjoern A. Zeeb 
1202bfcc09ddSBjoern A. Zeeb /**
1203bfcc09ddSBjoern A. Zeeb  * struct iwl_scan_offload_profile_match - match information
1204bfcc09ddSBjoern A. Zeeb  * @bssid: matched bssid
1205bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
1206bfcc09ddSBjoern A. Zeeb  * @channel: channel where the match occurred
1207bfcc09ddSBjoern A. Zeeb  * @energy: energy
1208bfcc09ddSBjoern A. Zeeb  * @matching_feature: feature matches
1209bfcc09ddSBjoern A. Zeeb  * @matching_channels: bitmap of channels that matched, referencing
1210bfcc09ddSBjoern A. Zeeb  *	the channels passed in the scan offload request.
1211bfcc09ddSBjoern A. Zeeb  */
1212bfcc09ddSBjoern A. Zeeb struct iwl_scan_offload_profile_match {
1213bfcc09ddSBjoern A. Zeeb 	u8 bssid[ETH_ALEN];
1214bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
1215bfcc09ddSBjoern A. Zeeb 	u8 channel;
1216bfcc09ddSBjoern A. Zeeb 	u8 energy;
1217bfcc09ddSBjoern A. Zeeb 	u8 matching_feature;
1218bfcc09ddSBjoern A. Zeeb 	u8 matching_channels[SCAN_OFFLOAD_MATCHING_CHANNELS_LEN];
1219bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILE_MATCH_RESULTS_S_VER_2 */
1220bfcc09ddSBjoern A. Zeeb 
1221bfcc09ddSBjoern A. Zeeb /**
12229af1bba4SBjoern A. Zeeb  * struct iwl_scan_offload_match_info - match results information
1223bfcc09ddSBjoern A. Zeeb  * @matched_profiles: bitmap of matched profiles, referencing the
1224bfcc09ddSBjoern A. Zeeb  *	matches passed in the scan offload request
1225bfcc09ddSBjoern A. Zeeb  * @last_scan_age: age of the last offloaded scan
1226bfcc09ddSBjoern A. Zeeb  * @n_scans_done: number of offloaded scans done
1227bfcc09ddSBjoern A. Zeeb  * @gp2_d0u: GP2 when D0U occurred
1228bfcc09ddSBjoern A. Zeeb  * @gp2_invoked: GP2 when scan offload was invoked
1229bfcc09ddSBjoern A. Zeeb  * @resume_while_scanning: not used
1230bfcc09ddSBjoern A. Zeeb  * @self_recovery: obsolete
1231bfcc09ddSBjoern A. Zeeb  * @reserved: reserved
1232bfcc09ddSBjoern A. Zeeb  * @matches: array of match information, one for each match
1233bfcc09ddSBjoern A. Zeeb  */
12349af1bba4SBjoern A. Zeeb struct iwl_scan_offload_match_info {
1235bfcc09ddSBjoern A. Zeeb 	__le32 matched_profiles;
1236bfcc09ddSBjoern A. Zeeb 	__le32 last_scan_age;
1237bfcc09ddSBjoern A. Zeeb 	__le32 n_scans_done;
1238bfcc09ddSBjoern A. Zeeb 	__le32 gp2_d0u;
1239bfcc09ddSBjoern A. Zeeb 	__le32 gp2_invoked;
1240bfcc09ddSBjoern A. Zeeb 	u8 resume_while_scanning;
1241bfcc09ddSBjoern A. Zeeb 	u8 self_recovery;
1242bfcc09ddSBjoern A. Zeeb 	__le16 reserved;
12439af1bba4SBjoern A. Zeeb 	struct iwl_scan_offload_profile_match matches[];
12449af1bba4SBjoern A. Zeeb } __packed; /* SCAN_OFFLOAD_PROFILES_QUERY_RSP_S_VER_3 and
12459af1bba4SBjoern A. Zeeb 	     * SCAN_OFFLOAD_MATCH_INFO_NOTIFICATION_S_VER_1
12469af1bba4SBjoern A. Zeeb 	     */
1247bfcc09ddSBjoern A. Zeeb 
1248bfcc09ddSBjoern A. Zeeb /**
1249bfcc09ddSBjoern A. Zeeb  * struct iwl_umac_scan_iter_complete_notif - notifies end of scanning iteration
1250bfcc09ddSBjoern A. Zeeb  * @uid: scan id, &enum iwl_umac_scan_uid_offsets
1251bfcc09ddSBjoern A. Zeeb  * @scanned_channels: number of channels scanned and number of valid elements in
1252bfcc09ddSBjoern A. Zeeb  *	results array
1253bfcc09ddSBjoern A. Zeeb  * @status: one of SCAN_COMP_STATUS_*
1254bfcc09ddSBjoern A. Zeeb  * @bt_status: BT on/off status
1255bfcc09ddSBjoern A. Zeeb  * @last_channel: last channel that was scanned
1256bfcc09ddSBjoern A. Zeeb  * @start_tsf: TSF timer in usecs of the scan start time for the mac specified
1257bfcc09ddSBjoern A. Zeeb  *	in &struct iwl_scan_req_umac.
1258bfcc09ddSBjoern A. Zeeb  * @results: array of scan results, length in @scanned_channels
1259bfcc09ddSBjoern A. Zeeb  */
1260bfcc09ddSBjoern A. Zeeb struct iwl_umac_scan_iter_complete_notif {
1261bfcc09ddSBjoern A. Zeeb 	__le32 uid;
1262bfcc09ddSBjoern A. Zeeb 	u8 scanned_channels;
1263bfcc09ddSBjoern A. Zeeb 	u8 status;
1264bfcc09ddSBjoern A. Zeeb 	u8 bt_status;
1265bfcc09ddSBjoern A. Zeeb 	u8 last_channel;
1266bfcc09ddSBjoern A. Zeeb 	__le64 start_tsf;
1267bfcc09ddSBjoern A. Zeeb 	struct iwl_scan_results_notif results[];
1268bfcc09ddSBjoern A. Zeeb } __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_2 */
1269bfcc09ddSBjoern A. Zeeb 
1270*a4128aadSBjoern A. Zeeb /**
1271*a4128aadSBjoern A. Zeeb  * struct iwl_umac_scan_channel_survey_notif - data for survey
1272*a4128aadSBjoern A. Zeeb  * @channel: the channel scanned
1273*a4128aadSBjoern A. Zeeb  * @band: band of channel
1274*a4128aadSBjoern A. Zeeb  * @noise: noise floor measurements in negative dBm, invalid 0xff
1275*a4128aadSBjoern A. Zeeb  * @reserved: for future use and alignment
1276*a4128aadSBjoern A. Zeeb  * @active_time: time in ms the radio was turned on (on the channel)
1277*a4128aadSBjoern A. Zeeb  * @busy_time: time in ms the channel was sensed busy, 0 for a clean channel
1278*a4128aadSBjoern A. Zeeb  * @tx_time: time the radio spent transmitting data
1279*a4128aadSBjoern A. Zeeb  * @rx_time: time the radio spent receiving data
1280*a4128aadSBjoern A. Zeeb  */
1281*a4128aadSBjoern A. Zeeb struct iwl_umac_scan_channel_survey_notif {
1282*a4128aadSBjoern A. Zeeb 	__le32 channel;
1283*a4128aadSBjoern A. Zeeb 	__le32 band;
1284*a4128aadSBjoern A. Zeeb 	u8 noise[IWL_MAX_NUM_NOISE_RESULTS];
1285*a4128aadSBjoern A. Zeeb 	u8 reserved[2];
1286*a4128aadSBjoern A. Zeeb 	__le32 active_time;
1287*a4128aadSBjoern A. Zeeb 	__le32 busy_time;
1288*a4128aadSBjoern A. Zeeb 	__le32 tx_time;
1289*a4128aadSBjoern A. Zeeb 	__le32 rx_time;
1290*a4128aadSBjoern A. Zeeb } __packed; /* SCAN_CHANNEL_SURVEY_NTF_API_S_VER_1 */
1291*a4128aadSBjoern A. Zeeb 
1292bfcc09ddSBjoern A. Zeeb #endif /* __iwl_fw_api_scan_h__ */
1293