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.
This commit is contained in:
Andrew Thompson 2009-01-25 07:31:51 +00:00
parent 11b763df19
commit 8d9b29f35b

View File

@ -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: