aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2022-02-17 00:15:56 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2022-02-17 00:15:56 +0000
commitcc4e78d51351d6362b0536e326280c1e230648d5 (patch)
tree2f93e810886155018024b3b42cf99a41b2033995
parent3d09d310d9981dde1d6e51fed6ecf9576480b9f7 (diff)
downloadsrc-cc4e78d51351d6362b0536e326280c1e230648d5.tar.gz
src-cc4e78d51351d6362b0536e326280c1e230648d5.zip
LinuxKPI: 802.11 advertise full offload scanning based on hw_scan only
We disabled hw_scan for drivers not advertising SINGLE_SCAN_ON_ALL_BANDS. Do not depend on this hw flag to set IEEE80211_FEXT_SCAN_OFFLOAD for net80211 as otherwise scanning will never work. Long-term we probably want to re-think how we do/integrate hw_scan better in net80211. Sponsored by: The FreeBSD Foundation MFC after: 3 days
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 5aaae47a3e41..b5fde7e10781 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -2879,9 +2879,14 @@ linuxkpi_ieee80211_ifattach(struct ieee80211_hw *hw)
/* Scanning is a different kind of beast to re-work. */
ic->ic_caps |= IEEE80211_C_BGSCAN;
#endif
- if (lhw->ops->hw_scan &&
- ieee80211_hw_check(hw, SINGLE_SCAN_ON_ALL_BANDS)) {
- /* Advertise full-offload scanning */
+ if (lhw->ops->hw_scan) {
+ /*
+ * Advertise full-offload scanning.
+ *
+ * Not limiting to SINGLE_SCAN_ON_ALL_BANDS here as otherwise
+ * we essentially disable hw_scan for all drivers not setting
+ * the flag.
+ */
ic->ic_flags_ext |= IEEE80211_FEXT_SCAN_OFFLOAD;
}