aboutsummaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorSam Leffler <sam@FreeBSD.org>2009-02-10 19:26:42 +0000
committerSam Leffler <sam@FreeBSD.org>2009-02-10 19:26:42 +0000
commita32ac9d3a94eba3f64c92a22a393b1cac2c2dbf9 (patch)
treeb5b1bba3962f6c235a08d29bd0d0c25014af277c /sys/dev
parent054d7b697918ca6596d8a1597297490fccff84cb (diff)
downloadsrc-a32ac9d3a94eba3f64c92a22a393b1cac2c2dbf9.tar.gz
src-a32ac9d3a94eba3f64c92a22a393b1cac2c2dbf9.zip
add hw.ath.bstuck to control the stuck beacon threshold
Notes
Notes: svn path=/head/; revision=188446
Diffstat (limited to 'sys/dev')
-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 d4656ae3df63..dc981c4dd8c6 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;
}