diff options
author | 2006-12-03 16:39:13 +0000 | |
---|---|---|
committer | 2006-12-03 16:39:13 +0000 | |
commit | ed3bbfa7d562e104b5598ba989aa16d6820c2d32 (patch) | |
tree | 90f9167ea9d06248738406f3a0b41ea007b9f6f5 /sys/dev/usb/if_ral.c | |
parent | Clean frame buffer attachment code: (diff) | |
download | wireguard-openbsd-ed3bbfa7d562e104b5598ba989aa16d6820c2d32.tar.xz wireguard-openbsd-ed3bbfa7d562e104b5598ba989aa16d6820c2d32.zip |
fix handling of the SIOCS80211CHANNEL ioctl in monitor mode:
don't call xxx_set_chan() if the interface is not up&running.
patch from Steffen Schuetz (st dot sch at gmx dot net) with
minor modifications by me.
closes kernel/5313
Diffstat (limited to 'sys/dev/usb/if_ral.c')
-rw-r--r-- | sys/dev/usb/if_ral.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c index b1668ee2541..fd2a75ba08e 100644 --- a/sys/dev/usb/if_ral.c +++ b/sys/dev/usb/if_ral.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ral.c,v 1.85 2006/12/03 16:16:58 damien Exp $ */ +/* $OpenBSD: if_ral.c,v 1.86 2006/12/03 16:39:13 damien Exp $ */ /*- * Copyright (c) 2005, 2006 @@ -1356,7 +1356,9 @@ ural_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) { - ural_set_chan(sc, ic->ic_ibss_chan); + if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) == + (IFF_UP | IFF_RUNNING)) + ural_set_chan(sc, ic->ic_ibss_chan); error = 0; } break; |