|
1 | 1 | /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
|
2 | 2 | /*
|
3 |
| - * Copyright (C) 2012-2014, 2018-2023 Intel Corporation |
| 3 | + * Copyright (C) 2012-2014, 2018-2024 Intel Corporation |
4 | 4 | * Copyright (C) 2013-2015 Intel Mobile Communications GmbH
|
5 | 5 | * Copyright (C) 2016-2017 Intel Deutschland GmbH
|
6 | 6 | */
|
|
13 | 13 | * enum iwl_scan_subcmd_ids - scan commands
|
14 | 14 | */
|
15 | 15 | enum iwl_scan_subcmd_ids {
|
| 16 | + /** |
| 17 | + * @CHANNEL_SURVEY_NOTIF: &struct iwl_umac_scan_channel_survey_notif |
| 18 | + */ |
| 19 | + CHANNEL_SURVEY_NOTIF = 0xFB, |
16 | 20 | /**
|
17 | 21 | * @OFFLOAD_MATCH_INFO_NOTIF: &struct iwl_scan_offload_match_info
|
18 | 22 | */
|
@@ -62,6 +66,8 @@ struct iwl_ssid_ie {
|
62 | 66 | #define IWL_FAST_SCHED_SCAN_ITERATIONS 3
|
63 | 67 | #define IWL_MAX_SCHED_SCAN_PLANS 2
|
64 | 68 |
|
| 69 | +#define IWL_MAX_NUM_NOISE_RESULTS 22 |
| 70 | + |
65 | 71 | enum scan_framework_client {
|
66 | 72 | SCAN_CLIENT_SCHED_SCAN = BIT(0),
|
67 | 73 | SCAN_CLIENT_NETDETECT = BIT(1),
|
@@ -642,10 +648,13 @@ enum iwl_umac_scan_general_flags {
|
642 | 648 | * notification per channel or not.
|
643 | 649 | * @IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER: Whether to allow channel
|
644 | 650 | * reorder optimization or not.
|
| 651 | + * @IWL_UMAC_SCAN_GEN_FLAGS2_COLLECT_CHANNEL_STATS: Enable channel statistics |
| 652 | + * collection when #IWL_UMAC_SCAN_GEN_FLAGS_V2_FORCE_PASSIVE is set. |
645 | 653 | */
|
646 | 654 | enum iwl_umac_scan_general_flags2 {
|
647 | 655 | IWL_UMAC_SCAN_GEN_FLAGS2_NOTIF_PER_CHNL = BIT(0),
|
648 | 656 | IWL_UMAC_SCAN_GEN_FLAGS2_ALLOW_CHNL_REORDER = BIT(1),
|
| 657 | + IWL_UMAC_SCAN_GEN_FLAGS2_COLLECT_CHANNEL_STATS = BIT(3), |
649 | 658 | };
|
650 | 659 |
|
651 | 660 | /**
|
@@ -1258,4 +1267,26 @@ struct iwl_umac_scan_iter_complete_notif {
|
1258 | 1267 | struct iwl_scan_results_notif results[];
|
1259 | 1268 | } __packed; /* SCAN_ITER_COMPLETE_NTF_UMAC_API_S_VER_2 */
|
1260 | 1269 |
|
| 1270 | +/** |
| 1271 | + * struct iwl_umac_scan_channel_survey_notif - data for survey |
| 1272 | + * @channel: the channel scanned |
| 1273 | + * @band: band of channel |
| 1274 | + * @noise: noise floor measurements in negative dBm, invalid 0xff |
| 1275 | + * @reserved: for future use and alignment |
| 1276 | + * @active_time: time in ms the radio was turned on (on the channel) |
| 1277 | + * @busy_time: time in ms the channel was sensed busy, 0 for a clean channel |
| 1278 | + * @tx_time: time the radio spent transmitting data |
| 1279 | + * @rx_time: time the radio spent receiving data |
| 1280 | + */ |
| 1281 | +struct iwl_umac_scan_channel_survey_notif { |
| 1282 | + __le32 channel; |
| 1283 | + __le32 band; |
| 1284 | + u8 noise[IWL_MAX_NUM_NOISE_RESULTS]; |
| 1285 | + u8 reserved[2]; |
| 1286 | + __le32 active_time; |
| 1287 | + __le32 busy_time; |
| 1288 | + __le32 tx_time; |
| 1289 | + __le32 rx_time; |
| 1290 | +} __packed; /* SCAN_CHANNEL_SURVEY_NTF_API_S_VER_1 */ |
| 1291 | + |
1261 | 1292 | #endif /* __iwl_fw_api_scan_h__ */
|
0 commit comments