diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-30 11:20:21 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2006-08-30 11:20:21 +0000 |
commit | 6801f874a7c94efe6b519fcab6bf43c716aaf521 (patch) | |
tree | eb03d46b9d68fbb8fad47f5c94b097c80a09c3f1 /sys/dev/ic/atw.c | |
parent | 622e1480dce1988956031622baa7b5faa6937d0b (diff) |
Return from channel tuning code if we get IEEE80211_CHAN_ANY
as per other drivers instead of doing panics.
Should workaround PR 5206 which I could never manage
to reproduce, though we really shouldn't be getting
IEEE80211_CHAN_ANY here.
ok deraadt@
Diffstat (limited to 'sys/dev/ic/atw.c')
-rw-r--r-- | sys/dev/ic/atw.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ic/atw.c b/sys/dev/ic/atw.c index 2adea26dd3f..24c48e9667e 100644 --- a/sys/dev/ic/atw.c +++ b/sys/dev/ic/atw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: atw.c,v 1.47 2006/06/23 06:27:11 miod Exp $ */ +/* $OpenBSD: atw.c,v 1.48 2006/08/30 11:20:20 jsg Exp $ */ /* $NetBSD: atw.c,v 1.69 2004/07/23 07:07:55 dyoung Exp $ */ /*- @@ -1527,8 +1527,8 @@ atw_tune(struct atw_softc *sc) struct ieee80211com *ic = &sc->sc_ic; chan = ieee80211_chan2ieee(ic, ic->ic_bss->ni_chan); - if (chan == IEEE80211_CHAN_ANY) - panic("%s: chan == IEEE80211_CHAN_ANY", __func__); + if (chan == 0 || chan == IEEE80211_CHAN_ANY) + return 0; if (chan == sc->sc_cur_chan) return 0; |