svn commit: r188448 - in projects/vap7/sys: . contrib/pf dev
dev/ath dev/ath/ath_hal dev/ath/ath_hal/ar5210
dev/ath/ath_hal/ar5211 dev/ath/ath_hal/ar5212
dev/ath/ath_hal/ar5312 dev/ath/ath_hal/ar54...
Sam Leffler
sam at FreeBSD.org
Tue Feb 10 11:37:39 PST 2009
Author: sam
Date: Tue Feb 10 19:37:38 2009
New Revision: 188448
URL: http://svn.freebsd.org/changeset/base/188448
Log:
merge r188444: consolidate conditional code
merge r188445: fix resume when ah_curchan is NULL
merge r188446: add hw.ath.bstuck to control the stuck beacon threshold
merge r188447: fix keycache leak
Modified:
projects/vap7/sys/ (props changed)
projects/vap7/sys/contrib/pf/ (props changed)
projects/vap7/sys/dev/ (props changed)
projects/vap7/sys/dev/ath/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5210/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5211/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c
projects/vap7/sys/dev/ath/ath_hal/ar5312/ (props changed)
projects/vap7/sys/dev/ath/ath_hal/ar5416/ (props changed)
projects/vap7/sys/dev/ath/if_ath.c
projects/vap7/sys/dev/cxgb/ (props changed)
projects/vap7/sys/dev/usb2/ (props changed)
projects/vap7/sys/i386/conf/USB2 (props changed)
projects/vap7/sys/modules/usb2/ (props changed)
projects/vap7/sys/net80211/ (props changed)
Modified: projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c
==============================================================================
--- projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Tue Feb 10 19:27:50 2009 (r188447)
+++ projects/vap7/sys/dev/ath/ath_hal/ar5212/ar5212_ani.c Tue Feb 10 19:37:38 2009 (r188448)
@@ -278,14 +278,12 @@ ar5212AniControl(struct ath_hal *ah, HAL
if (on) {
OS_REG_SET_BIT(ah, AR_PHY_SFCORR_LOW,
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
+ ahp->ah_stats.ast_ani_ofdmon++;
} else {
OS_REG_CLR_BIT(ah, AR_PHY_SFCORR_LOW,
AR_PHY_SFCORR_LOW_USE_SELF_CORR_LOW);
- }
- if (on)
- ahp->ah_stats.ast_ani_ofdmon++;
- else
ahp->ah_stats.ast_ani_ofdmoff++;
+ }
aniState->ofdmWeakSigDetectOff = !on;
break;
}
Modified: projects/vap7/sys/dev/ath/if_ath.c
==============================================================================
--- projects/vap7/sys/dev/ath/if_ath.c Tue Feb 10 19:27:50 2009 (r188447)
+++ projects/vap7/sys/dev/ath/if_ath.c Tue Feb 10 19:37:38 2009 (r188448)
@@ -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 */
@@ -1201,7 +1205,9 @@ ath_resume(struct ath_softc *sc)
* Must reset the chip before we reload the
* keycache as we were powered down on suspend.
*/
- ath_hal_reset(ah, sc->sc_opmode, sc->sc_curchan, AH_FALSE, &status);
+ ath_hal_reset(ah, sc->sc_opmode,
+ sc->sc_curchan != NULL ? sc->sc_curchan : ic->ic_curchan,
+ AH_FALSE, &status);
ath_reset_keycache(sc);
if (sc->sc_resume_up) {
if (ic->ic_opmode == IEEE80211_M_STA) {
@@ -3116,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;
}
@@ -6087,6 +6093,8 @@ ath_setup_stationkey(struct ieee80211_no
/* XXX locking? */
ni->ni_ucastkey.wk_keyix = keyix;
ni->ni_ucastkey.wk_rxkeyix = rxkeyix;
+ /* NB: must mark device key to get called back on delete */
+ ni->ni_ucastkey.wk_flags |= IEEE80211_KEY_DEVKEY;
IEEE80211_ADDR_COPY(ni->ni_ucastkey.wk_macaddr, ni->ni_macaddr);
/* NB: this will create a pass-thru key entry */
ath_keyset(sc, &ni->ni_ucastkey, vap->iv_bss);
@@ -7610,7 +7618,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;
}
More information about the svn-src-projects
mailing list