From 6801f874a7c94efe6b519fcab6bf43c716aaf521 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Wed, 30 Aug 2006 11:20:21 +0000 Subject: 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@ --- sys/dev/ic/atw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/ic/atw.c') 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; -- cgit v1.2.3