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/a002b97388c1
branches:  trunk
changeset: 947965:a002b97388c1
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 8b21e8661e5e -r a002b97388c1 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