From 5ff8092143b1cc1f8f374c893b7c6c470f12dc90 Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Sat, 13 Aug 2005 17:50:21 +0000 Subject: [PATCH] revert 1.64: we cannot use the channel characteristics to decide when to do 11g erp sta accounting because b/g channels show up as false positives when operating in 11b. Noticed by: Michal Mertl --- sys/net80211/ieee80211_node.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index eca1241f04ff..d4f59ef709cc 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -2027,8 +2027,7 @@ ieee80211_node_join(struct ieee80211com *ic, struct ieee80211_node *ni, int resp IEEE80211_AID_SET(ni->ni_associd, ic->ic_aid_bitmap); ic->ic_sta_assoc++; newassoc = 1; - if (ic->ic_curmode == IEEE80211_MODE_11G || - ic->ic_curmode == IEEE80211_MODE_TURBO_G) + if (ic->ic_curmode == IEEE80211_MODE_11G) ieee80211_node_join_11g(ic, ni); } else newassoc = 0; @@ -2062,7 +2061,7 @@ static void ieee80211_node_leave_11g(struct ieee80211com *ic, struct ieee80211_node *ni) { - KASSERT(IEEE80211_IS_CHAN_ANYG(ni->ni_chan), + KASSERT(ic->ic_curmode == IEEE80211_MODE_11G, ("not in 11g, bss %u:0x%x, curmode %u", ni->ni_chan->ic_freq, ni->ni_chan->ic_flags, ic->ic_curmode)); @@ -2152,7 +2151,7 @@ ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) ni->ni_associd = 0; ic->ic_sta_assoc--; - if (IEEE80211_IS_CHAN_ANYG(ic->ic_bss->ni_chan)) + if (ic->ic_curmode == IEEE80211_MODE_11G) ieee80211_node_leave_11g(ic, ni); /* * Cleanup station state. In particular clear various