Yes Felix,
you're right that makes sense.
Should I submit a new patch?
--Fabrice
On May 23, 2011 at 11:53 PM Felix Fietkau <n...@openwrt.org> wrote:
> 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
_______________________________________________
Devel mailing list
Devel@lists.open80211s.org
http://open80211s.com/mailman/listinfo/devel