Don't use ic_curmode to decide when to do 11g station accounting,
use the station channel properties. Fixes assert failure/bogus operation when an ap is operating in 11a and has associated stations then switches to 11g. Noticed by: Michal Mertl Reviewed by: avatar MFC after: 2 weeks
This commit is contained in:
parent
31c8e3fbec
commit
efefac4077
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148941
@ -152,6 +152,8 @@ struct ieee80211_channel {
|
||||
(((_c)->ic_flags & IEEE80211_CHAN_PUREG) == IEEE80211_CHAN_PUREG)
|
||||
#define IEEE80211_IS_CHAN_G(_c) \
|
||||
(((_c)->ic_flags & IEEE80211_CHAN_G) == IEEE80211_CHAN_G)
|
||||
#define IEEE80211_IS_CHAN_ANYG(_c) \
|
||||
(IEEE80211_IS_CHAN_PUREG(_c) || IEEE80211_IS_CHAN_G(_c))
|
||||
#define IEEE80211_IS_CHAN_T(_c) \
|
||||
(((_c)->ic_flags & IEEE80211_CHAN_T) == IEEE80211_CHAN_T)
|
||||
#define IEEE80211_IS_CHAN_108G(_c) \
|
||||
|
@ -2062,9 +2062,9 @@ static void
|
||||
ieee80211_node_leave_11g(struct ieee80211com *ic, struct ieee80211_node *ni)
|
||||
{
|
||||
|
||||
KASSERT(ic->ic_curmode == IEEE80211_MODE_11G ||
|
||||
ic->ic_curmode == IEEE80211_MODE_TURBO_G,
|
||||
("not in 11g, curmode %x", ic->ic_curmode));
|
||||
KASSERT(IEEE80211_IS_CHAN_ANYG(ni->ni_chan),
|
||||
("not in 11g, bss %u:0x%x, curmode %u", ni->ni_chan->ic_freq,
|
||||
ni->ni_chan->ic_flags, ic->ic_curmode));
|
||||
|
||||
/*
|
||||
* If a long slot station do the slot time bookkeeping.
|
||||
@ -2152,8 +2152,7 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni)
|
||||
ni->ni_associd = 0;
|
||||
ic->ic_sta_assoc--;
|
||||
|
||||
if (ic->ic_curmode == IEEE80211_MODE_11G ||
|
||||
ic->ic_curmode == IEEE80211_MODE_TURBO_G)
|
||||
if (IEEE80211_IS_CHAN_ANYG(ic->ic_bss->ni_chan))
|
||||
ieee80211_node_leave_11g(ic, ni);
|
||||
/*
|
||||
* Cleanup station state. In particular clear various
|
||||
|
Loading…
Reference in New Issue
Block a user