summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2009-02-10 19:26:42 +0000
committersam <sam@FreeBSD.org>2009-02-10 19:26:42 +0000
commit80e7762b02c8c49ab3eb24ad765e567f8f7eb572 (patch)
treeb5b1bba3962f6c235a08d29bd0d0c25014af277c /sys/dev/ath
parent22d9ca334e731876b47b0536329c8895386012a3 (diff)
downloadFreeBSD-src-80e7762b02c8c49ab3eb24ad765e567f8f7eb572.zip
FreeBSD-src-80e7762b02c8c49ab3eb24ad765e567f8f7eb572.tar.gz
add hw.ath.bstuck to control the stuck beacon threshold
Diffstat (limited to 'sys/dev/ath')
-rw-r--r--sys/dev/ath/if_ath.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/dev/ath/if_ath.c b/sys/dev/ath/if_ath.c
index d4656ae..dc981c4 100644
--- a/sys/dev/ath/if_ath.c
+++ b/sys/dev/ath/if_ath.c
@@ -283,6 +283,10 @@ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTLFLAG_RW, &ath_txbuf,
0, "tx buffers allocated");
TUNABLE_INT("hw.ath.txbuf", &ath_txbuf);
+static int ath_bstuck_threshold = 4; /* max missed beacons */
+SYSCTL_INT(_hw_ath, OID_AUTO, bstuck, CTLFLAG_RW, &ath_bstuck_threshold,
+ 0, "max missed beacon xmits before chip reset");
+
#ifdef ATH_DEBUG
enum {
ATH_DEBUG_XMIT = 0x00000001, /* basic xmit operation */
@@ -3118,7 +3122,7 @@ ath_beacon_proc(void *arg, int pending)
DPRINTF(sc, ATH_DEBUG_BEACON,
"%s: missed %u consecutive beacons\n",
__func__, sc->sc_bmisscount);
- if (sc->sc_bmisscount > 3) /* NB: 3 is a guess */
+ if (sc->sc_bmisscount >= ath_bstuck_threshold)
taskqueue_enqueue(sc->sc_tq, &sc->sc_bstucktask);
return;
}
@@ -7612,7 +7616,7 @@ ath_tdma_beacon_send(struct ath_softc *sc, struct ieee80211vap *vap)
DPRINTF(sc, ATH_DEBUG_BEACON,
"%s: missed %u consecutive beacons\n",
__func__, sc->sc_bmisscount);
- if (sc->sc_bmisscount > 3) /* NB: 3 is a guess */
+ if (sc->sc_bmisscount >= ath_bstuck_threshold)
taskqueue_enqueue(sc->sc_tq, &sc->sc_bstucktask);
return;
}
OpenPOWER on IntegriCloud