aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAndrew Thompson <thompsa@FreeBSD.org>2008-12-06 21:19:26 +0000
committerAndrew Thompson <thompsa@FreeBSD.org>2008-12-06 21:19:26 +0000
commit5622c31582422e1487b6bd229588d0d90eae9920 (patch)
tree8a13cc57657c9516df5a60345859ebf565ea4db0 /sys/dev
parente0d315046b8c3cdfc3bd2bb54a81f5c4b580e1eb (diff)
Notes
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_ural.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 5415492b3e81..459576197b57 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1544,11 +1544,11 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
struct ural_softc *sc = ifp->if_softc;
struct ieee80211com *ic = ifp->if_l2com;
struct ifreq *ifr = (struct ifreq *) data;
- int error = 0, startall = 1;
+ int error = 0, startall = 0;
- RAL_LOCK(sc);
switch (cmd) {
case SIOCSIFFLAGS:
+ RAL_LOCK(sc);
if (ifp->if_flags & IFF_UP) {
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0) {
ural_init_locked(sc);
@@ -1559,6 +1559,9 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
if (ifp->if_drv_flags & IFF_DRV_RUNNING)
ural_stop(sc);
}
+ RAL_UNLOCK(sc);
+ if (startall)
+ ieee80211_start_all(ic);
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA:
@@ -1568,10 +1571,6 @@ ural_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ether_ioctl(ifp, cmd, data);
break;
}
- RAL_UNLOCK(sc);
-
- if (startall)
- ieee80211_start_all(ic);
return error;
}