Index: ieee80211_ioctl.c =================================================================== RCS file: /home/ncvs/src/sys/net80211/ieee80211_ioctl.c,v retrieving revision 1.60 diff -u -p -r1.60 ieee80211_ioctl.c --- ieee80211_ioctl.c 11 May 2008 23:36:58 -0000 1.60 +++ ieee80211_ioctl.c 19 May 2008 23:03:47 -0000 @@ -3123,7 +3123,7 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon { struct ieee80211vap *vap; struct ieee80211com *ic; - int error = 0; + int error = 0, n; struct ifreq *ifr; struct ifaddr *ifa; /* XXX */ @@ -3164,6 +3164,11 @@ ieee80211_ioctl(struct ifnet *ifp, u_lon ieee80211_stop_locked(vap); } IEEE80211_UNLOCK(ic); + /* Wait for the parent to initialise if the vap has been UP'd */ + n = 50; + while (n-- && (ic->ic_ifp->if_flags & IFF_UP) && + !(ic->ic_ifp->if_drv_flags & IFF_DRV_RUNNING)) + pause("vapioctl", hz/10); break; case SIOCADDMULTI: case SIOCDELMULTI: