aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2024-12-15 22:43:04 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2025-01-03 01:18:16 +0000
commit2be951a526cb2ac20346b96173e553af6031a38c (patch)
treef7727f6b2bc010c0beb67a6623079b748231faf5
parent925e1016b163701268a4298d1eca4b2484a81526 (diff)
rtwn: enable VHT if it's configured in the device
If the driver attach path adds the VHT flag then add the 20/40/80 MHz VHT channels. This is a no-op right now as nothing is enabling it. Differential Revision: https://reviews.freebsd.org/D48097 Reviewed by: bz
-rw-r--r--sys/dev/rtwn/if_rtwn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/rtwn/if_rtwn.c b/sys/dev/rtwn/if_rtwn.c
index d7dd97a3fe18..ed84950b1a94 100644
--- a/sys/dev/rtwn/if_rtwn.c
+++ b/sys/dev/rtwn/if_rtwn.c
@@ -1621,6 +1621,14 @@ rtwn_getradiocaps(struct ieee80211com *ic,
/* XXX workaround add_channel_list() limitations */
setbit(bands, IEEE80211_MODE_11A);
setbit(bands, IEEE80211_MODE_11NA);
+
+ if (IEEE80211_CONF_VHT(ic)) {
+ setbit(bands, IEEE80211_MODE_VHT_5GHZ);
+ /* Only enable VHT80 if HT40/VHT40 is available */
+ if (sc->sc_ht40)
+ cbw_flags |= NET80211_CBW_FLAG_VHT80;
+ }
+
for (i = 0; i < nitems(sc->chan_num_5ghz); i++) {
if (sc->chan_num_5ghz[i] == 0)
continue;