aboutsummaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2025-04-11 01:44:50 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2025-06-10 23:37:22 +0000
commitccdd6285df5dfa81c22e36685bab9be184a4e733 (patch)
tree41619d6ae05038ca52a9c23b45a7721fa67de237 /sys/compat
parentb53120be165637066b06203f246364a128041a2f (diff)
net80211: fix VHT160 and VHT80P80 selection and enable in LinuxKPI 802.11
Between 802.11ac-2013 and 802.11-2020 some fields were deprecated and the way VHT160 and VHT80P80 are selected has changed. In order to get onto VHT160 with modern APs adopt and support both the deprecated as well as the new logic. For simplicity of blocks we pull out the non-HT40 handling early on, followed by the "use HT", followed by the deprectaed options and then the 80Mhz channel width. In all cases keep checking (a) what is locally supported, (b) what the user has locally allowed (FVHT flags, [-]vht160 [-]vht80p80 [-]vht80 [-]vht40), as well as (c) what is announced. Provide possible fallbacks to lower channel widths in all cases (but VHT20, which means VHT is disabled). With this enable VHT160 and VHT80P80 in the LinuxKPI 802.11 driver compat code as well. Sponsored by: The FreeBSD Foundation Reviewed by: thj Differential Revision: https://reviews.freebsd.org/D49773 (cherry picked from commit 4bf049bfeefd988fed93149138c422b05d38251b)
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/linuxkpi/common/src/linux_80211.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c
index 82eaa64790b4..da4342b0c479 100644
--- a/sys/compat/linuxkpi/common/src/linux_80211.c
+++ b/sys/compat/linuxkpi/common/src/linux_80211.c
@@ -547,19 +547,15 @@ lkpi_sta_sync_vht_from_ni(struct ieee80211_vif *vif, struct ieee80211_sta *sta,
width = (sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK);
switch (width) {
-#if 0
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ:
case IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ:
sta->deflink.bandwidth = IEEE80211_STA_RX_BW_160;
break;
-#endif
default:
/* Check if we do support 160Mhz somehow after all. */
-#if 0
if ((sta->deflink.vht_cap.cap & IEEE80211_VHT_CAP_EXT_NSS_BW_MASK) != 0)
sta->deflink.bandwidth = IEEE80211_STA_RX_BW_160;
else
-#endif
sta->deflink.bandwidth = IEEE80211_STA_RX_BW_80;
}
skip_bw:
@@ -2112,14 +2108,11 @@ lkpi_sta_scan_to_auth(struct ieee80211vap *vap, enum ieee80211_state nstate, int
#endif
#ifdef LKPI_80211_VHT
if (IEEE80211_IS_CHAN_VHT_5GHZ(ni->ni_chan)) {
-#ifdef __notyet__
if (IEEE80211_IS_CHAN_VHT80P80(ni->ni_chan))
chanctx_conf->def.width = NL80211_CHAN_WIDTH_80P80;
else if (IEEE80211_IS_CHAN_VHT160(ni->ni_chan))
chanctx_conf->def.width = NL80211_CHAN_WIDTH_160;
- else
-#endif
- if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan))
+ else if (IEEE80211_IS_CHAN_VHT80(ni->ni_chan))
chanctx_conf->def.width = NL80211_CHAN_WIDTH_80;
}
#endif