summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2005-07-19 23:04:38 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2005-07-19 23:04:38 +0000
commitbb09fb393ae18d07406c703d96829b7e7e4af92d (patch)
tree7a44014dba5b1a28c7c9e6665e0d0ed1f402fe14 /sys
parent5dd1ba212d815b5d52bffb582c4db660bb285d77 (diff)
- the self linked hardware rx descriptor list does not work in hostap
mode, use the normal behaviour with rx overrun interrupts for now. this prevents the hostap from locking under heavy load (like ping -f) and it works more reliable. - run ath_calibrate in splnet() context (from netbsd)
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ic/ath.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c
index c1f0443932b..17bc87e7411 100644
--- a/sys/dev/ic/ath.c
+++ b/sys/dev/ic/ath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ath.c,v 1.30 2005/07/18 02:43:26 fgsch Exp $ */
+/* $OpenBSD: ath.c,v 1.31 2005/07/19 23:04:37 reyk Exp $ */
/* $NetBSD: ath.c,v 1.37 2004/08/18 21:59:39 dyoung Exp $ */
/*-
@@ -1780,6 +1780,7 @@ int
ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)
{
struct ath_hal *ah = sc->sc_ah;
+ struct ieee80211com *ic = &sc->sc_ic;
int error;
struct mbuf *m;
struct ath_desc *ds;
@@ -1836,8 +1837,8 @@ ath_rxbuf_init(struct ath_softc *sc, struct ath_buf *bf)
*/
ds = bf->bf_desc;
bzero(ds, sizeof(struct ath_desc));
-
- ds->ds_link = bf->bf_daddr; /* link to self */
+ if (ic->ic_opmode != IEEE80211_M_HOSTAP)
+ ds->ds_link = bf->bf_daddr; /* link to self */
ds->ds_data = bf->bf_segs[0].ds_addr;
ath_hal_setup_rx_desc(ah, ds
, m->m_len /* buffer size */
@@ -1901,7 +1902,7 @@ ath_rx_proc(void *arg, int npending)
* a self-linked list to avoid rx overruns.
*/
status = ath_hal_proc_rx_desc(ah, ds,
- bf->bf_daddr, PA2DESC(sc, ds->ds_link));
+ bf->bf_daddr, PA2DESC(sc, ds->ds_link));
#ifdef AR_DEBUG
if (ath_debug & ATH_DEBUG_RECV_DESC)
ath_printrxbuf(bf, status == HAL_OK);
@@ -2751,6 +2752,7 @@ ath_calibrate(void *arg)
struct ieee80211com *ic = &sc->sc_ic;
struct ieee80211_channel *c;
HAL_CHANNEL hchan;
+ int s;
sc->sc_stats.ast_per_cal++;
@@ -2762,6 +2764,7 @@ ath_calibrate(void *arg)
hchan.channel = c->ic_freq;
hchan.channelFlags = ath_chan2flags(ic, c);
+ s = splnet();
DPRINTF(ATH_DEBUG_CALIBRATE,
("%s: channel %u/%x\n", __func__, c->ic_freq, c->ic_flags));
@@ -2780,6 +2783,7 @@ ath_calibrate(void *arg)
sc->sc_stats.ast_per_calfail++;
}
timeout_add(&sc->sc_cal_to, hz * ath_calinterval);
+ splx(s);
}
HAL_LED_STATE