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 | |
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')
-rw-r--r-- | sys/dev/ic/atw.c | 6 | ||||
-rw-r--r-- | sys/dev/ic/rtw.c | 6 |
2 files changed, 6 insertions, 6 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; diff --git a/sys/dev/ic/rtw.c b/sys/dev/ic/rtw.c index 5e91dfa13ce..587f53678d2 100644 --- a/sys/dev/ic/rtw.c +++ b/sys/dev/ic/rtw.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtw.c,v 1.54 2006/03/25 22:41:43 djm Exp $ */ +/* $OpenBSD: rtw.c,v 1.55 2006/08/30 11:20:20 jsg Exp $ */ /* $NetBSD: rtw.c,v 1.29 2004/12/27 19:49:16 dyoung Exp $ */ /*- @@ -2158,8 +2158,8 @@ rtw_tune(struct rtw_softc *sc) KASSERT(ic->ic_bss->ni_chan != NULL); 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) { RTW_DPRINTF(RTW_DEBUG_TUNE, |