summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_rum.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/if_rum.c')
-rw-r--r--sys/dev/usb/if_rum.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 58472d16067..00e6e30e32e 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.46 2006/12/03 16:16:58 damien Exp $ */
+/* $OpenBSD: if_rum.c,v 1.47 2006/12/03 16:39:13 damien Exp $ */
/*-
* Copyright (c) 2005, 2006 Damien Bergamini <damien.bergamini@free.fr>
@@ -343,7 +343,8 @@ USB_ATTACH(rum)
if (sc->rf_rev == RT2573_RF_5225 || sc->rf_rev == RT2573_RF_5226) {
/* set supported .11a rates */
- ic->ic_sup_rates[IEEE80211_MODE_11A] = ieee80211_std_rateset_11a;
+ ic->ic_sup_rates[IEEE80211_MODE_11A] =
+ ieee80211_std_rateset_11a;
/* set supported .11a channels */
for (i = 34; i <= 46; i += 4) {
@@ -1349,7 +1350,9 @@ rum_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = ieee80211_ioctl(ifp, cmd, data);
if (error == ENETRESET &&
ic->ic_opmode == IEEE80211_M_MONITOR) {
- rum_set_chan(sc, ic->ic_ibss_chan);
+ if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) ==
+ (IFF_UP | IFF_RUNNING))
+ rum_set_chan(sc, ic->ic_ibss_chan);
error = 0;
}
break;