2012-04-13 07:45:48

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH 1/2] ath9k: fix ibss fair beacon distribution for AR9462

Update AR9462 initval to fix unbalance beacon distribution
in Ad-Hoc network.

Signed-off-by: Rajkumar Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h b/drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h
index b39870c..1d6658e 100644
--- a/drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h
+++ b/drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h
@@ -1115,9 +1115,9 @@ static const u32 ar9462_2p0_mac_core[][2] = {
{0x000081f8, 0x00000000},
{0x000081fc, 0x00000000},
{0x00008240, 0x00100000},
- {0x00008244, 0x0010f400},
+ {0x00008244, 0x0010f424},
{0x00008248, 0x00000800},
- {0x0000824c, 0x0001e800},
+ {0x0000824c, 0x0001e848},
{0x00008250, 0x00000000},
{0x00008254, 0x00000000},
{0x00008258, 0x00000000},
--
1.7.10



2012-04-13 07:45:55

by Rajkumar Manoharan

[permalink] [raw]
Subject: [PATCH 2/2] ath9k: fix ibss beacon next tbtt

Sync-up ibss beacon timer with the beacon frame's timestamp. When the
node acts as joiner, it has to sync with the received beacon timestamp
instead of reading tsf from hw. As the hw tsf wont wont be update till
bssid is configured. This patch programs hw tsf with the received beacon
timestamp if beacon timers are yet to be configured.

Signed-off-by: Rajkumar Manoharan <[email protected]>
---
drivers/net/wireless/ath/ath9k/beacon.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 6264182..719a271 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -650,6 +650,8 @@ static void ath_beacon_config_adhoc(struct ath_softc *sc,
u32 tsf, intval, nexttbtt;

ath9k_reset_beacon_status(sc);
+ if (!(sc->sc_flags & SC_OP_BEACONS))
+ ath9k_hw_settsf64(ah, sc->beacon.bc_tstamp);

intval = TU_TO_USEC(conf->beacon_interval);
tsf = roundup(ath9k_hw_gettsf32(ah) + TU_TO_USEC(FUDGE), intval);
--
1.7.10