From: Benjamin Berg Newer firmware versions will start reporting a separate RX time value that represents for how long the channel was busy with Wi-Fi frames. Previously the reported value for RX time was equal to the busy time. As such, report the information as it will be useful in the future. Signed-off-by: Benjamin Berg Signed-off-by: Miri Korenblit --- drivers/net/wireless/intel/iwlwifi/mld/scan.c | 5 ++++- drivers/net/wireless/intel/iwlwifi/mld/scan.h | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mld/scan.c b/drivers/net/wireless/intel/iwlwifi/mld/scan.c index e44b24904c19..b942ac1e7ccc 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/scan.c +++ b/drivers/net/wireless/intel/iwlwifi/mld/scan.c @@ -2273,6 +2273,7 @@ void iwl_mld_handle_channel_survey_notif(struct iwl_mld *mld, /* Times are all in ms */ info->time = le32_to_cpu(notif->active_time); info->time_busy = le32_to_cpu(notif->busy_time); + info->time_rx = le32_to_cpu(notif->rx_time); info->noise = iwl_average_neg_dbm(notif->noise, ARRAY_SIZE(notif->noise)); } @@ -2321,9 +2322,11 @@ int iwl_mld_mac80211_get_survey(struct ieee80211_hw *hw, int idx, /* Found (the next) channel to report */ survey->channel = &sband->channels[per_band_idx]; survey->filled = SURVEY_INFO_TIME | - SURVEY_INFO_TIME_BUSY; + SURVEY_INFO_TIME_BUSY | + SURVEY_INFO_TIME_RX; survey->time = info->time; survey->time_busy = info->time_busy; + survey->time_rx = info->time_rx; survey->noise = info->noise; if (survey->noise < 0) survey->filled |= SURVEY_INFO_NOISE_DBM; diff --git a/drivers/net/wireless/intel/iwlwifi/mld/scan.h b/drivers/net/wireless/intel/iwlwifi/mld/scan.h index dc299fe2f999..74ebe8296693 100644 --- a/drivers/net/wireless/intel/iwlwifi/mld/scan.h +++ b/drivers/net/wireless/intel/iwlwifi/mld/scan.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2024-2025 Intel Corporation + * Copyright (C) 2024-2026 Intel Corporation */ #ifndef __iwl_mld_scan_h__ #define __iwl_mld_scan_h__ @@ -151,11 +151,13 @@ struct iwl_mld_scan { * * @time: time in ms the radio was on the channel * @time_busy: time in ms the channel was sensed busy + * @time_rx: time in ms the channel was sensed to carry Wi-Fi frames * @noise: channel noise in dBm */ struct iwl_mld_survey_channel { u32 time; u32 time_busy; + u32 time_rx; s8 noise; }; -- 2.34.1