Skip to contentSkip to conversation

ath9k: Futher fix for mesh beaconing.

PATCH New Fabrice Deyber 2 participants 4 messages May 23, 2011 – May 24, 2011 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ath9k: Futher fix for mesh beaconing.

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.

---
 drivers/net/wireless/ath/ath9k/beacon.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/beacon.c +2 -0
index d4d8cec..ffb3d81 100644
@@ -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);
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 1/1 ath9k: Futher fix for mesh beaconing.

Quoted 14 lines · Fabrice Deyber

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.

---
  drivers/net/wireless/ath/ath9k/beacon.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/wireless/ath/ath9k/beacon.c +0 -0
index d4d8cec..ffb3d81 100644

drivers/net/wireless/ath/ath9k/beacon.c static void ath_beacon_config_adhoc(struct ath_softc *sc, · line 673

Quoted 5 lines
drivers/net/wireless/ath/ath9k/beacon.c +2 -0
@@ -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

#2 lore raw

PATCH 1/1 ath9k: Futher fix for mesh beaconing.

Yes Felix,
you're right that makes sense.
Should I submit a new patch?
?
--Fabrice

Quoted 21 lines · Felix Fietkau
Quoted 20 lines · Fabrice Deyber

? ?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.

---
? ?drivers/net/wireless/ath/ath9k/beacon.c |? ? 2 ++ ? ?1 files changed, 2 insertions(+), 0 deletions(-)

drivers/net/wireless/ath/ath9k/beacon.c +0 -0
index d4d8cec..ffb3d81 100644
@@ -669,6 +669,8 @@ static void ath_beacon_config_adhoc(struct ath_softc
 *sc,
 ? ? ? ? ? ? ? ? ? ?nexttbtt = tsf + intval - (delta % intval);
 ? ? ? ? ? ?}
 
Quoted 8 lines

drivers/net/wireless/ath/ath9k/beacon.c static void ath_beacon_config_adhoc(struct ath_softc · line 674

Quoted 2 lines
drivers/net/wireless/ath/ath9k/beacon.c +2 -0
+? ? ? ? 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

#3 lore raw

PATCH 1/1 ath9k: Futher fix for mesh beaconing.

Quoted 5 lines · Fabrice Deyber

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