svn commit: r187678 - head/sys/net80211

Andrew Thompson thompsa at FreeBSD.org
Sat Jan 24 23:31:51 PST 2009


Author: thompsa
Date: Sun Jan 25 07:31:51 2009
New Revision: 187678
URL: http://svn.freebsd.org/changeset/base/187678

Log:
  If the parent up/down task was queued then sync with it before returning from
  the vap ioctl. This means that the parent interface should hopefully be up
  before we return to userland, it does not depend on the parent init succeeding,
  just that it was run.
  
  This fixes wpa_supplicant with ndis and USB where the parent interfaces can be
  slow to init.

Modified:
  head/sys/net80211/ieee80211_ioctl.c

Modified: head/sys/net80211/ieee80211_ioctl.c
==============================================================================
--- head/sys/net80211/ieee80211_ioctl.c	Sun Jan 25 07:24:34 2009	(r187677)
+++ head/sys/net80211/ieee80211_ioctl.c	Sun Jan 25 07:31:51 2009	(r187678)
@@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/socket.h>
 #include <sys/sockio.h>
 #include <sys/systm.h>
+#include <sys/taskqueue.h>
  
 #include <net/if.h>
 #include <net/if_dl.h>
@@ -3233,6 +3234,8 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon
 			ieee80211_stop_locked(vap);
 		}
 		IEEE80211_UNLOCK(ic);
+		/* Wait for parent ioctl handler if it was queued */
+		taskqueue_drain(taskqueue_thread, &ic->ic_parent_task);
 		break;
 	case SIOCADDMULTI:
 	case SIOCDELMULTI:


More information about the svn-src-head mailing list