Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src-draft/trunk]: src/sys/net80211 Set channel flags for 11NA and 11NG accor...



details:   https://anonhg.NetBSD.org/src-all/rev/fc221b1c5c19
branches:  trunk
changeset: 361668:fc221b1c5c19
user:      Nathanial Sloss <nat%netbsd.org@localhost>
date:      Tue May 12 07:08:48 2020 +1000

description:
Set channel flags for 11NA and 11NG accordingly.

diffstat:

 sys/net80211/ieee80211_regdomain.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r 634f2b165dd9 -r fc221b1c5c19 sys/net80211/ieee80211_regdomain.c
--- a/sys/net80211/ieee80211_regdomain.c        Tue May 12 04:26:41 2020 +1000
+++ b/sys/net80211/ieee80211_regdomain.c        Tue May 12 07:08:48 2020 +1000
@@ -139,10 +139,11 @@
 {
        struct ieee80211_channel *chans = ic->ic_channels;
        int *nchans = &ic->ic_nchans;
-       int ht40;
+       int ht40 = 0;
 
-       /* XXX just do something for now */
-       ht40 = !!(ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40);
+       if (isset(bands, IEEE80211_MODE_11NG) || isset(bands, IEEE80211_MODE_11NA))
+               ht40 =| (ic->ic_htcaps & IEEE80211_HTCAP_CHWIDTH40) ?
+                   IEEE80211_CHAN_HT : IEEE80211_CHAN_HT20;
        *nchans = 0;
        if (isset(bands, IEEE80211_MODE_11B) ||
            isset(bands, IEEE80211_MODE_11G) ||



Home | Main Index | Thread Index | Old Index