svn commit: r309253 - head/sys/dev/ath
Adrian Chadd
adrian at FreeBSD.org
Mon Nov 28 17:06:36 UTC 2016
Author: adrian
Date: Mon Nov 28 17:06:35 2016
New Revision: 309253
URL: https://svnweb.freebsd.org/changeset/base/309253
Log:
[ath] revert the previous commit, after reading the 802.11-2012 spec a bit more.
The 802.11-2012 spec talks about this - section 10.1.3.2 - Beacon Generation
in Infrastructure Networks. So yes, we should be expecting beacons to be
going out in multiples of intval.
Silly adrian.
So:
* fix the FreeBSD APs that are sending beacons at incorrect TBTTs (target
beacon transmit time); and
* yes indeed we will have to wake up out of network sleep until we sync
a beacon.
Modified:
head/sys/dev/ath/if_ath_beacon.c
Modified: head/sys/dev/ath/if_ath_beacon.c
==============================================================================
--- head/sys/dev/ath/if_ath_beacon.c Mon Nov 28 16:25:05 2016 (r309252)
+++ head/sys/dev/ath/if_ath_beacon.c Mon Nov 28 17:06:35 2016 (r309253)
@@ -965,9 +965,9 @@ ath_beacon_config(struct ath_softc *sc,
intval = ni->ni_intval & HAL_BEACON_PERIOD;
}
-
/*
- * Note: rounding up to the next intval can cause problems.
+ * Note: rounding up to the next intval can cause problems with
+ * bad APs when we're in powersave mode.
*
* In STA mode with powersave enabled, beacons are only received
* whenever the beacon timer fires to wake up the hardware.
@@ -975,17 +975,14 @@ ath_beacon_config(struct ath_softc *sc,
* that the AP has started transmitting beacons at TSF values that
* are multiples of intval, versus say being 25 TU off.
*
- * I'm not sure why nexttbtt is rounded up to the intval.
- * If we sync against a beacon that is way out, we should
- * take a beacon miss and re-sync against the next beacon.
- *
- * So for now - don't round up if we're in STA mode.
- * Maybe later (when someone eventually does powersave+IBSS,
- * powersave+MBSS) this can be flipped on for those too.
+ * The specification (802.11-2012 10.1.3.2 - Beacon Generation in
+ * Infrastructure Networks) requires APs be beaconing at a
+ * mutiple of intval. So, if bintval=100, then we shouldn't
+ * get beacons at intervals other than around multiples of 100.
*/
if (nexttbtt == 0) /* e.g. for ap mode */
nexttbtt = intval;
- else if ((ic->ic_opmode != IEEE80211_M_STA) && intval) /* NB: can be 0 for monitor mode */
+ else
nexttbtt = roundup(nexttbtt, intval);
DPRINTF(sc, ATH_DEBUG_BEACON, "%s: nexttbtt %u intval %u (%u)\n",
More information about the svn-src-all
mailing list