* [PATCH v2] ath9k: Fix bug in retrieving average beacon rssi
@ 2009-08-20 8:11 Vasanthakumar Thiagarajan
2009-08-20 14:56 ` Luis R. Rodriguez
0 siblings, 1 reply; 2+ messages in thread
From: Vasanthakumar Thiagarajan @ 2009-08-20 8:11 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Luis.Rodriguez, Jouni.Malinen, ath9k-devel
Currently the beacon rssi that LPF gives is divided and rounded
up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi
in ANI. Having correct rssi in ANI fixes the connection stability at
< 30dB rssi range. This patch removes the unncessary computation of average
rssi over already valid average rssi. Also removes the redundant macros to
find average rssi.
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
---
Added more description in commit msg, no code change over v1
drivers/net/wireless/ath/ath9k/ani.h | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h
index 1199245..6273fd0 100644
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
@@ -18,15 +18,10 @@
#define ANI_H
#define HAL_PROCESS_ANI 0x00000001
-#define ATH9K_RSSI_EP_MULTIPLIER (1<<7)
#define DO_ANI(ah) (((ah)->proc_phyerr & HAL_PROCESS_ANI))
-#define HAL_EP_RND(x, mul) \
- ((((x)%(mul)) >= ((mul)/2)) ? ((x) + ((mul) - 1)) / (mul) : (x)/(mul))
-#define BEACON_RSSI(ahp) \
- HAL_EP_RND(ahp->stats.ast_nodestats.ns_avgbrssi, \
- ATH9K_RSSI_EP_MULTIPLIER)
+#define BEACON_RSSI(ahp) (ahp->stats.ast_nodestats.ns_avgbrssi)
#define ATH9K_ANI_OFDM_TRIG_HIGH 500
#define ATH9K_ANI_OFDM_TRIG_LOW 200
--
1.5.5.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] ath9k: Fix bug in retrieving average beacon rssi
2009-08-20 8:11 [PATCH v2] ath9k: Fix bug in retrieving average beacon rssi Vasanthakumar Thiagarajan
@ 2009-08-20 14:56 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2009-08-20 14:56 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan, John W. Linville
Cc: linux-wireless, Luis.Rodriguez, Jouni.Malinen, ath9k-devel
On Thu, Aug 20, 2009 at 1:11 AM, Vasanthakumar
Thiagarajan<vasanth@atheros.com> wrote:
> Currently the beacon rssi that LPF gives is divided and rounded
> up by ATH_RSSI_EP_MULTIPLIER twice. This will leave the incorrect rssi
> in ANI. Having correct rssi in ANI fixes the connection stability at
> < 30dB rssi range. This patch removes the unncessary computation of average
> rssi over already valid average rssi. Also removes the redundant macros to
> find average rssi.
>
> Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Thanks Vasanth, John, this has a better description, if its not too
much trouble can you revert 6b82e95960c858e6babf1def7276847e8da8cc25
in favor for this one?
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-20 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-20 8:11 [PATCH v2] ath9k: Fix bug in retrieving average beacon rssi Vasanthakumar Thiagarajan
2009-08-20 14:56 ` Luis R. Rodriguez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox