On 2011-05-23 7:22 PM, Fabrice Deyber wrote: > This fix ensure the timers to be set at beacon interval boundaries. Without > this change timers can > be set improperly resulting in absence of beacons. > > > Signed-off-by: Fabrice Deyber<fabricedey...@agilemesh.com> > --- > drivers/net/wireless/ath/ath9k/beacon.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath9k/beacon.c > b/drivers/net/wireless/ath/ath9k/beacon.c > index d4d8cec..ffb3d81 100644 > --- a/drivers/net/wireless/ath/ath9k/beacon.c > +++ b/drivers/net/wireless/ath/ath9k/beacon.c > @@ -669,6 +669,8 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc, > nexttbtt = tsf + intval - (delta % intval); > } > > + nexttbtt = roundup(nexttbtt, intval); > + If you're placing the nexttbtt boundary that way, you can easily also simplify the previous code to not calculate the delta between the last timestamp and the current one, but instead just round up tsf + TU_TO_USEC(FUDGE) to intval, making the code easier to read.
- Felix _______________________________________________ ath9k-devel mailing list ath9k-devel@lists.ath9k.org https://lists.ath9k.org/mailman/listinfo/ath9k-devel