Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2005 06:50:23 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 87343 for review
Message-ID:  <200511280650.jAS6oNHj055015@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=87343

Change 87343 by sam@sam_ebb on 2005/11/28 06:50:15

	don't use ic_bmisstimeout; calculate the value directly
	so we use the correct beacon interval

Affected files ...

.. //depot/projects/wifi/sys/dev/ath/if_ath.c#117 edit

Differences ...

==== //depot/projects/wifi/sys/dev/ath/if_ath.c#117 (text+ko) ====

@@ -832,10 +832,12 @@
 	struct ieee80211com *ic = &sc->sc_ic;
 	u_int64_t lastrx = sc->sc_lastrx;
 	u_int64_t tsf = ath_hal_gettsf64(sc->sc_ah);
+	u_int bmisstimeout =
+		ic->ic_bmissthreshold * ic->ic_bss->ni_intval * 1024;
 
 	DPRINTF(sc, ATH_DEBUG_BEACON,
 	    "%s: tsf %llu lastrx %lld (%llu) bmiss %u\n",
-	    __func__, tsf, tsf - lastrx, lastrx, ic->ic_bmisstimeout*1024);
+	    __func__, tsf, tsf - lastrx, lastrx, bmisstimeout);
 
 	/*
 	 * Workaround phantom bmiss interrupts by sanity-checking
@@ -844,7 +846,7 @@
 	 * truly a bmiss we'll get another interrupt soon and that'll
 	 * be dispatched up for processing.
 	 */
-	if (tsf - lastrx > ic->ic_bmisstimeout*1024)
+	if (tsf - lastrx > bmisstimeout)
 		ieee80211_beacon_miss(&sc->sc_ic);
 	else
 		sc->sc_stats.ast_bmiss_phantom++;
@@ -2643,12 +2645,10 @@
 #endif
 		/*
 		 * Calculate the number of consecutive beacons to miss
-		 * before taking a BMISS interrupt.  The configuration
-		 * is specified in ms, so we need to convert that to
-		 * TU's and then calculate based on the beacon interval.
+		 * before taking a BMISS interrupt.
 		 * Note that we clamp the result to at most 10 beacons.
 		 */
-		bs.bs_bmissthreshold = howmany(ic->ic_bmisstimeout, intval);
+		bs.bs_bmissthreshold = ic->ic_bmissthreshold;
 		if (bs.bs_bmissthreshold > 10)
 			bs.bs_bmissthreshold = 10;
 		else if (bs.bs_bmissthreshold <= 0)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511280650.jAS6oNHj055015>