aboutsummaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2009-01-25 07:31:51 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2009-01-25 07:31:51 +0000
commit8d9b29f35b461bf59350c413efa0aa9fe150f389 (patch)
tree010c30ae9f139f0791538fd75048897fab44b04d /sys/net80211/ieee80211_ioctl.c
parent11b763df199bb1fe19dade98a3b14429740ed2ac (diff)
downloadsrc-8d9b29f35b461bf59350c413efa0aa9fe150f389.tar.gz
src-8d9b29f35b461bf59350c413efa0aa9fe150f389.zip
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.
Notes
Notes: svn path=/head/; revision=187678
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r--sys/net80211/ieee80211_ioctl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c
index dc810dc0ec67..d3b3683854ca 100644
--- a/sys/net80211/ieee80211_ioctl.c
+++ b/sys/net80211/ieee80211_ioctl.c
@@ -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_long cmd, caddr_t data)
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: