From owner-svn-src-all@FreeBSD.ORG Tue Feb 10 19:26:42 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B358C1065672; Tue, 10 Feb 2009 19:26:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0C7F8FC29; Tue, 10 Feb 2009 19:26:42 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1AJQgCj002111; Tue, 10 Feb 2009 19:26:42 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1AJQgcD002109; Tue, 10 Feb 2009 19:26:42 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902101926.n1AJQgcD002109@svn.freebsd.org> From: Sam Leffler Date: Tue, 10 Feb 2009 19:26:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188446 - head/sys/dev/ath X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Feb 2009 19:26:43 -0000 Author: sam Date: Tue Feb 10 19:26:42 2009 New Revision: 188446 URL: http://svn.freebsd.org/changeset/base/188446 Log: add hw.ath.bstuck to control the stuck beacon threshold Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Feb 10 19:25:11 2009 (r188445) +++ head/sys/dev/ath/if_ath.c Tue Feb 10 19:26:42 2009 (r188446) @@ -283,6 +283,10 @@ SYSCTL_INT(_hw_ath, OID_AUTO, txbuf, CTL 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 *s 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; }