git: f6f03d156ba7 - main - rtwn: add VHT awareness to rtwn_chan2centieee()

From: Adrian Chadd <adrian_at_FreeBSD.org>
Date: Sat, 07 Dec 2024 07:14:58 UTC
The branch main has been updated by adrian:

URL: https://cgit.FreeBSD.org/src/commit/?id=f6f03d156ba78f15612fd0b1dce935feb63b9aad

commit f6f03d156ba78f15612fd0b1dce935feb63b9aad
Author:     Adrian Chadd <adrian@FreeBSD.org>
AuthorDate: 2024-12-04 05:39:22 +0000
Commit:     Adrian Chadd <adrian@FreeBSD.org>
CommitDate: 2024-12-07 07:14:20 +0000

    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
---
 sys/dev/rtwn/if_rtwnreg.h | 3 +++
 1 file changed, 3 insertions(+)

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;