Date: Mon, 16 Feb 2004 14:53:42 -0800 (PST) From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 47064 for review Message-ID: <200402162253.i1GMrgRY071485@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=47064 Change 47064 by sam@sam_ebb on 2004/02/16 14:53:19 o ieee80211_node_leave moved elsewhere o add port authorization for station mode operation Affected files ... .. //depot/projects/netperf+sockets/sys/net80211/ieee80211_proto.c#9 edit Differences ... ==== //depot/projects/netperf+sockets/sys/net80211/ieee80211_proto.c#9 (text+ko) ==== @@ -334,66 +334,6 @@ #undef N } -/* - * Handle bookkeeping for station deauthentication/disassociation - * when operating as an ap. - */ -void -ieee80211_node_leave(struct ieee80211com *ic, struct ieee80211_node *ni) -{ - KASSERT(ic->ic_opmode == IEEE80211_M_HOSTAP, - ("not in ap mode, mode %u", ic->ic_opmode)); - - /* - * If a long slot station do the slot time bookkeeping. - */ - if ((ni->ni_capinfo & IEEE80211_CAPINFO_SHORT_SLOTTIME) == 0) { - KASSERT(ic->ic_longslotsta > 0, - ("bogus long slot station count %d", ic->ic_longslotsta)); - ic->ic_longslotsta--; - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC, - ("long slot time station %s leaves, count now %d\n", - ether_sprintf(ni->ni_macaddr), ic->ic_longslotsta)); - /* XXX auto mode? */ - if (ic->ic_longslotsta == 0 && - ic->ic_curmode == IEEE80211_MODE_11G) { - /* - * Re-enable use of short slot time if supported - * and not operating in IBSS mode (per spec). - */ - if ((ic->ic_caps & IEEE80211_C_SHSLOT) && - ic->ic_opmode != IEEE80211_M_IBSS) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC, - ("re-enable use of short slot time\n")); - ic->ic_flags |= IEEE80211_F_SHSLOT; - } - } - } - /* - * If a non-ERP station do the protection-related bookkeeping. - */ - if ((ni->ni_flags & IEEE80211_NODE_ERP) == 0) { - KASSERT(ic->ic_nonerpsta > 0, - ("bogus non-ERP station count %d", ic->ic_nonerpsta)); - ic->ic_nonerpsta--; - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC, - ("non-ERP station %s leaves, count now %d\n", - ether_sprintf(ni->ni_macaddr), ic->ic_nonerpsta)); - if (ic->ic_nonerpsta == 0) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC, - ("disable use of protection\n")); - ic->ic_flags &= ~IEEE80211_F_USEPROT; - /* XXX verify mode? */ - if (ic->ic_caps & IEEE80211_C_SHPREAMBLE) { - IEEE80211_DPRINTF(ic, IEEE80211_MSG_ASSOC, - ("re-enable use of short preamble\n")); - ic->ic_flags |= IEEE80211_F_SHPREAMBLE; - ic->ic_flags &= ~IEEE80211_F_USEBARKER; - } - } - } -} - static int ieee80211_newstate(struct ieee80211com *ic, enum ieee80211_state nstate, int mgt) { @@ -555,6 +495,12 @@ } break; } + /* + * When 802.1x is not in use mark the port + * authorized at this point so traffic can flow. + */ + if (ni->ni_authmode != IEEE80211_AUTH_8021X) + ieee80211_node_authorize(ic, ni); break; case IEEE80211_S_ASSOC: switch (ostate) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200402162253.i1GMrgRY071485>