Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Jan 2009 07:31:51 +0000 (UTC)
From:      Andrew Thompson <thompsa@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r187678 - head/sys/net80211
Message-ID:  <200901250731.n0P7VphH009817@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



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