From owner-p4-projects@FreeBSD.ORG Mon Feb 16 14:53:43 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 346C516A4D4; Mon, 16 Feb 2004 14:53:43 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A09B116A509 for ; Mon, 16 Feb 2004 14:53:42 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79B6A43D31 for ; Mon, 16 Feb 2004 14:53:42 -0800 (PST) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.10/8.12.10) with ESMTP id i1GMrgGe071488 for ; Mon, 16 Feb 2004 14:53:42 -0800 (PST) (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.10/8.12.10/Submit) id i1GMrgRY071485 for perforce@freebsd.org; Mon, 16 Feb 2004 14:53:42 -0800 (PST) (envelope-from sam@freebsd.org) Date: Mon, 16 Feb 2004 14:53:42 -0800 (PST) Message-Id: <200402162253.i1GMrgRY071485@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Subject: PERFORCE change 47064 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2004 22:53:43 -0000 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) {