Date: Fri, 7 Jan 2005 23:57:32 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 68504 for review Message-ID: <200501072357.j07NvWdl077353@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=68504 Change 68504 by sam@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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200501072357.j07NvWdl077353>