PERFORCE change 68504 for review
Sam Leffler
sam at FreeBSD.org
Fri Jan 7 15:57:33 PST 2005
http://perforce.freebsd.org/chv.cgi?CH=68504
Change 68504 by sam at sam_ebb on 2005/01/07 23:56:54
beacon interval must be kept in TU's, not ms's; adjust here
and net80211 later
Affected files ...
.. //depot/projects/wifi/sys/dev/ath/if_ath.c#57 edit
Differences ...
==== //depot/projects/wifi/sys/dev/ath/if_ath.c#57 (text+ko) ====
@@ -1993,7 +1993,7 @@
nexttbtt = (LE_READ_4(ni->ni_tstamp.data + 4) << 22) |
(LE_READ_4(ni->ni_tstamp.data) >> 10);
- intval = MS_TO_TU(ni->ni_intval) & HAL_BEACON_PERIOD;
+ intval = ni->ni_intval & HAL_BEACON_PERIOD;
if (nexttbtt == 0) /* e.g. for ap mode */
nexttbtt = intval;
else if (intval) /* NB: can be 0 for monitor mode */
@@ -2002,7 +2002,6 @@
__func__, nexttbtt, intval, ni->ni_intval);
if (ic->ic_opmode == IEEE80211_M_STA) {
HAL_BEACON_STATE bs;
- u_int32_t bmisstime;
/* NB: no PCF support right now */
memset(&bs, 0, sizeof(bs));
@@ -2025,8 +2024,7 @@
* TU's and then calculate based on the beacon interval.
* Note that we clamp the result to at most 10 beacons.
*/
- bmisstime = MS_TO_TU(ic->ic_bmisstimeout);
- bs.bs_bmissthreshold = howmany(bmisstime, intval);
+ bs.bs_bmissthreshold = howmany(ic->ic_bmisstimeout, intval);
if (bs.bs_bmissthreshold > 10)
bs.bs_bmissthreshold = 10;
else if (bs.bs_bmissthreshold <= 0)
More information about the p4-projects
mailing list