summaryrefslogtreecommitdiffstats
path: root/sys/net80211/ieee80211_ioctl.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2009-01-25 07:31:51 +0000
committerthompsa <thompsa@FreeBSD.org>2009-01-25 07:31:51 +0000
commit63e5efcb881d21dcf1d5659711998289f9b6f3de (patch)
tree010c30ae9f139f0791538fd75048897fab44b04d /sys/net80211/ieee80211_ioctl.c
parent3688ae744109819893ee15d42ca4797b199641b2 (diff)
downloadFreeBSD-src-63e5efcb881d21dcf1d5659711998289f9b6f3de.zip
FreeBSD-src-63e5efcb881d21dcf1d5659711998289f9b6f3de.tar.gz
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.
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 dc810dc..d3b3683 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:
OpenPOWER on IntegriCloud