diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-24 20:09:20 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2010-02-24 20:09:20 +0000 |
commit | 8f577eefa353f8445e7dc876f532894002dc6c52 (patch) | |
tree | b0257193310e8b55c86c33595dcb863b9c036e44 /sys/dev/ic | |
parent | fd3b0b111c42854de582c577544c5265160b4597 (diff) |
- properly maintain sc->curchan
- return 1 in athn_intr for the gpio intr too
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/athn.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index 30b08296919..ea01087e4e9 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.27 2010/02/24 19:39:43 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.28 2010/02/24 20:09:19 damien Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -853,7 +853,7 @@ athn_intr(void *xsc) /* Turn the interface down. */ ifp->if_flags &= ~IFF_UP; athn_stop(ifp, 1); - return (0); + return (1); } AR_WRITE(sc, AR_INTR_SYNC_CAUSE, sync); @@ -4196,11 +4196,12 @@ athn_hw_reset(struct athn_softc *sc, struct ieee80211_channel *c, AR_WRITE(sc, AR_RSSI_THR, SM(AR_RSSI_THR_BM_THR, 7)); - error = ops->set_synth(sc, c, extc); - if (error != 0) { + if ((error = ops->set_synth(sc, c, extc)) != 0) { printf("%s: could not set channel\n", sc->sc_dev.dv_xname); return (error); } + sc->curchan = c; + sc->curchanext = extc; for (i = 0; i < AR_NUM_DCU; i++) AR_WRITE(sc, AR_DQCUMASK(i), 1 << i); @@ -4644,8 +4645,8 @@ athn_init(struct ifnet *ifp) struct ieee80211_channel *c, *extc; int i, error; - c = sc->curchan = ic->ic_bss->ni_chan = ic->ic_ibss_chan; - extc = sc->curchanext = NULL; + c = ic->ic_bss->ni_chan = ic->ic_ibss_chan; + extc = NULL; /* In case a new MAC address has been configured. */ IEEE80211_ADDR_COPY(ic->ic_myaddr, LLADDR(ifp->if_sadl)); |