aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Chadd <adrian@FreeBSD.org>2024-12-04 05:39:22 +0000
committerAdrian Chadd <adrian@FreeBSD.org>2024-12-07 07:14:20 +0000
commitf6f03d156ba78f15612fd0b1dce935feb63b9aad (patch)
tree367e8d2c718937425ee1741fcdefaad551cfba1f
parentb811e5a5effed0a3f8fa017606e2f37649047537 (diff)
rtwn: add VHT awareness to rtwn_chan2centieee()
Since we're not doing 80+80 yet, this is easy - just use the freq1 centre. Differential Revision: https://reviews.freebsd.org/D47900
-rw-r--r--sys/dev/rtwn/if_rtwnreg.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/dev/rtwn/if_rtwnreg.h b/sys/dev/rtwn/if_rtwnreg.h
index 9762f0482b1c..f1c0a7a6ff55 100644
--- a/sys/dev/rtwn/if_rtwnreg.h
+++ b/sys/dev/rtwn/if_rtwnreg.h
@@ -158,6 +158,9 @@ rtwn_chan2centieee(const struct ieee80211_channel *c)
{
int chan;
+ if (IEEE80211_IS_CHAN_VHT(c))
+ return c->ic_vht_ch_freq1;
+
chan = c->ic_ieee;
if (c->ic_extieee != 0)
chan = (chan + c->ic_extieee) / 2;