Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Nov 2004 03:46:42 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 65683 for review
Message-ID:  <200411230346.iAN3kgFA002162@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=65683

Change 65683 by sam@sam_ebb on 2004/11/23 03:46:00

	check for ic_bss being null when handling ioctl to set
	promiscuous mode; this corrects a race that ocurrs when
	the bridge is loaded as a module

Affected files ...

.. //depot/projects/wifi/sys/dev/ath/if_ath.c#26 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ath/if_ath.c#26 (text+ko) ====

@@ -4010,15 +4010,15 @@
 			ath_mode_init(sc);
 		} else if (ifp->if_flags & IFF_UP) {
 			/*
-			 * Beware of being called during detach to
-			 * reset promiscuous mode.  In that case we
+			 * Beware of being called during attach/detach
+			 * to reset promiscuous mode.  In that case we
 			 * will still be marked UP but not RUNNING.
 			 * However trying to re-init the interface
 			 * is the wrong thing to do as we've already
 			 * torn down much of our state.  There's
 			 * probably a better way to deal with this.
 			 */
-			if (!sc->sc_invalid)
+			if (!sc->sc_invalid && ic->ic_bss != NULL)
 				ath_init(ifp);	/* XXX lose error */
 		} else
 			ath_stop_locked(ifp);



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