wifi: cfg80211: fix CQM for non-range use
PATCH 1/1 wifi: cfg80211: fix CQM for non-range use
From: Johannes Berg <[email protected]>
Commit 7e7efdda6adb385fbdfd6f819d76bc68c923c394 upstream.
My prior race fix here broke CQM when ranges aren't used, as the reporting worker now requires the cqm_config to be set in the wdev, but isn't set when there's no range configured.
Rather than continuing to special-case the range version, set the cqm_config always and configure accordingly, also tracking if range was used or not to be able to clear the configuration appropriately with the same API, which was actually not right if both were implemented by a driver for some reason, as is the case with mac80211 (though there the implementations are equivalent so it doesn't matter.)
Also, the original multiple-RSSI commit lost checking for the callback, so might have potentially crashed if a driver had neither implementation, and userspace tried to use it despite not being advertised as supported.
--- net/wireless/core.h | 1 + net/wireless/nl80211.c | 50 ++++++++++++++++++++++++++---------------- 2 files changed, 32 insertions(+), 19 deletions(-)
net/wireless/core.h +1 -0
@@ -297,6 +297,7 @@ struct cfg80211_cqm_config {u32 rssi_hyst;s32 last_rssi_event_value;enum nl80211_cqm_rssi_threshold_event last_rssi_event_type; +bool use_range_api;int n_rssi_thresholds;s32 rssi_thresholds[]; };
net/wireless/nl80211.c +31 -19
88 lines not on this page · raw message
Signature · 1 line
2.43.0
kernel test robot
build botFYI: kernel test robot notices the stable kernel rule is not satisfied.
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 6.1,6.6] wifi: cfg80211: fix CQM for non-range use
Please ignore this mail if the patch is not relevant for upstream.
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Quoted 9 lines
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 6.1,6.6] wifi: cfg80211: fix CQM for non-range use
OK, so I spelled it "Commit" and not "commit" ...?
johannes
Quoted 11 lines · Johannes Berg
Quoted 9 lines
FYI: kernel test robot notices the stable kernel rule is not satisfied.
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html#option-3
Rule: The upstream commit ID must be specified with a separate line above the commit text.
Subject: [PATCH 6.1,6.6] wifi: cfg80211: fix CQM for non-range useOK, so I spelled it "Commit" and not "commit" ...?
No, it just doesn't know to ignore messages like this. It's all good, I'll take it as-is, thanks!
greg k-h