Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Jul 2009 15:37:02 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r195849 - head/sys/net80211
Message-ID:  <200907241537.n6OFb2m5014192@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Fri Jul 24 15:37:02 2009
New Revision: 195849
URL: http://svn.freebsd.org/changeset/base/195849

Log:
  revert OACTIVE part of r195845; instead fix the comment so it does not refer
  to the old hack removed in r193312
  
  Approved by:	re (implicit)

Modified:
  head/sys/net80211/ieee80211_output.c

Modified: head/sys/net80211/ieee80211_output.c
==============================================================================
--- head/sys/net80211/ieee80211_output.c	Fri Jul 24 15:31:22 2009	(r195848)
+++ head/sys/net80211/ieee80211_output.c	Fri Jul 24 15:37:02 2009	(r195849)
@@ -382,10 +382,22 @@ ieee80211_output(struct ifnet *ifp, stru
 {
 #define senderr(e) do { error = (e); goto bad;} while (0)
 	struct ieee80211_node *ni = NULL;
-	struct ieee80211vap *vap = ifp->if_softc;
+	struct ieee80211vap *vap;
 	struct ieee80211_frame *wh;
 	int error;
 
+	if (ifp->if_drv_flags & IFF_DRV_OACTIVE) {
+		/*
+		 * Short-circuit requests if the vap is marked OACTIVE
+		 * as this can happen because a packet came down through
+		 * ieee80211_start before the vap entered RUN state in
+		 * which case it's ok to just drop the frame.  This
+		 * should not be necessary but callers of if_output don't
+		 * check OACTIVE.
+		 */
+		senderr(ENETDOWN);
+	}
+	vap = ifp->if_softc;
 	/*
 	 * Hand to the 802.3 code if not tagged as
 	 * a raw 802.11 frame.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907241537.n6OFb2m5014192>