summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_ht.c
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-09-21 22:24:07 +0000
committersam <sam@FreeBSD.org>2008-09-21 22:24:07 +0000
commit50dd888a5f6605eebf5956acf6ab3c87e4e8a81e (patch)
treee6f8ed9c3a85bfa01cae30d312c5ce10e2d357aa /sys/net80211/ieee80211_ht.c
parent662f17f3f0a1ea7ea40718490d29cfb3b812af14 (diff)
downloadFreeBSD-src-50dd888a5f6605eebf5956acf6ab3c87e4e8a81e.zip
FreeBSD-src-50dd888a5f6605eebf5956acf6ab3c87e4e8a81e.tar.gz
Always update ic_lastnonht so we track overlapping legacy bss
properly; was doing this only on a change in the protection mode so the advertised protection mode in the beacon would oscillate. Submitted by: Chris Zimmermann
Diffstat (limited to 'sys/net80211/ieee80211_ht.c')
-rw-r--r--sys/net80211/ieee80211_ht.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c
index 2304bc4..5356a66 100644
--- a/sys/net80211/ieee80211_ht.c
+++ b/sys/net80211/ieee80211_ht.c
@@ -1080,22 +1080,21 @@ void
ieee80211_htprot_update(struct ieee80211com *ic, int protmode)
{
#define OPMODE(x) SM(x, IEEE80211_HTINFO_OPMODE)
- if (protmode == ic->ic_curhtprotmode)
- return;
- if (OPMODE(ic->ic_curhtprotmode) == IEEE80211_HTINFO_OPMODE_MIXED &&
- OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT)
- return;
-
IEEE80211_LOCK(ic);
+
/* track non-HT station presence */
KASSERT(protmode & IEEE80211_HTINFO_NONHT_PRESENT,
- ("missing NONHT_PRESENT"));
+ ("protmode 0x%x", protmode));
ic->ic_flags_ext |= IEEE80211_FEXT_NONHT_PR;
ic->ic_lastnonht = ticks;
- /* push beacon update */
- ic->ic_curhtprotmode = protmode;
- htinfo_notify(ic);
+ if (protmode != ic->ic_curhtprotmode &&
+ (OPMODE(ic->ic_curhtprotmode) != IEEE80211_HTINFO_OPMODE_MIXED ||
+ OPMODE(protmode) == IEEE80211_HTINFO_OPMODE_PROTOPT)) {
+ /* push beacon update */
+ ic->ic_curhtprotmode = protmode;
+ htinfo_notify(ic);
+ }
IEEE80211_UNLOCK(ic);
#undef OPMODE
}
OpenPOWER on IntegriCloud