All of lore.kernel.org
 help / color / mirror / Atom feed
* [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing.
@ 2011-05-23 17:22 Fabrice Deyber
  2011-05-23 21:53 ` Felix Fietkau
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Deyber @ 2011-05-23 17:22 UTC (permalink / raw)
  To: ath9k-devel

 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 <fabricedeyber@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);
+
 	ath_dbg(common, ATH_DBG_BEACON,
 		"IBSS nexttbtt %u intval %u (%u)\n",
 		nexttbtt, intval, conf->beacon_interval);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing.
  2011-05-23 17:22 [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing Fabrice Deyber
@ 2011-05-23 21:53 ` Felix Fietkau
  2011-05-23 23:26   ` Fabrice Deyber
  0 siblings, 1 reply; 4+ messages in thread
From: Felix Fietkau @ 2011-05-23 21:53 UTC (permalink / raw)
  To: ath9k-devel

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<fabricedeyber@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing.
  2011-05-23 21:53 ` Felix Fietkau
@ 2011-05-23 23:26   ` Fabrice Deyber
  2011-05-24  0:07     ` Felix Fietkau
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Deyber @ 2011-05-23 23:26 UTC (permalink / raw)
  To: ath9k-devel

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 <nbd@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<fabricedeyber@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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20110524/fed6430e/attachment.htm 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing.
  2011-05-23 23:26   ` Fabrice Deyber
@ 2011-05-24  0:07     ` Felix Fietkau
  0 siblings, 0 replies; 4+ messages in thread
From: Felix Fietkau @ 2011-05-24  0:07 UTC (permalink / raw)
  To: ath9k-devel

On 2011-05-24 1:26 AM, Fabrice Deyber wrote:
> Yes Felix,
>
> you're right that makes sense.
>
> Should I submit a new patch?
Yes, and please also Cc linux-wireless at vger.kernel.org and 
lrodriguez at atheros.com when submitting it.

- Felix

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-05-24  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-23 17:22 [ath9k-devel] [PATCH] ath9k: Futher fix for mesh beaconing Fabrice Deyber
2011-05-23 21:53 ` Felix Fietkau
2011-05-23 23:26   ` Fabrice Deyber
2011-05-24  0:07     ` Felix Fietkau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.