* [PATCH] ath9k: Fix enabling OFDM weak signal detection @ 2009-07-09 21:12 Steven Luo 2009-07-10 18:02 ` [ath9k-devel] " Luis R. Rodriguez 2009-07-11 15:26 ` Nick Kossifidis 0 siblings, 2 replies; 8+ messages in thread From: Steven Luo @ 2009-07-09 21:12 UTC (permalink / raw) To: John W. Linville Cc: Luis R. Rodriguez, Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan, Senthil Balasubramanian, linux-wireless, ath9k-devel From: Steven Luo <steven@steven676.net> It seems that OFDM weak signal detection should be enabled after an ANI state reset, as indicated by the initial setting of ofdmWeakSigDetectOff and what the open Atheros HAL does. Unfortunately, the reversed sense of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) seems to have resulted in a mixup here, causing weak signal detection to be disabled. This patch significantly improves reception and throughput from distant stations for my AR5416-based AP running compat-wireless 2009-06-25. Signed-off-by: Steven Luo <steven@steven676.net> Cc: stable@kernel.org --- --- a/drivers/net/wireless/ath/ath9k/ani.c 2009-06-24 21:14:00.000000000 -0700 +++ b/drivers/net/wireless/ath/ath9k/ani.c 2009-07-06 02:45:57.000000000 -0700 @@ -482,7 +482,7 @@ void ath9k_ani_reset(struct ath_hw *ah) ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, - !ATH9K_ANI_USE_OFDM_WEAK_SIG); + ATH9K_ANI_USE_OFDM_WEAK_SIG); ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, ATH9K_ANI_CCK_WEAK_SIG_THR); ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ath9k-devel] [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-09 21:12 [PATCH] ath9k: Fix enabling OFDM weak signal detection Steven Luo @ 2009-07-10 18:02 ` Luis R. Rodriguez 2009-07-11 15:23 ` Nick Kossifidis 2009-07-14 18:03 ` Luis R. Rodriguez 2009-07-11 15:26 ` Nick Kossifidis 1 sibling, 2 replies; 8+ messages in thread From: Luis R. Rodriguez @ 2009-07-10 18:02 UTC (permalink / raw) To: Steven Luo, Bennyam Malavazi Cc: John W. Linville, linux-wireless, Jouni Malinen, Senthil Balasubramanian, ath9k-devel, Vasanthakumar Thiagarajan On Thu, Jul 9, 2009 at 2:12 PM, Steven Luo<steven@steven676.net> wrote: > From: Steven Luo <steven@steven676.net> > > It seems that OFDM weak signal detection should be enabled after an ANI > state reset, as indicated by the initial setting of ofdmWeakSigDetectOff > and what the open Atheros HAL does. Unfortunately, the reversed sense > of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) > seems to have resulted in a mixup here, causing weak signal detection to > be disabled. > > This patch significantly improves reception and throughput from distant > stations for my AR5416-based AP running compat-wireless 2009-06-25. > > Signed-off-by: Steven Luo <steven@steven676.net> > Cc: stable@kernel.org > --- NACK for now, please give us a chance to review this -- this may actually be correct. Luis > --- a/drivers/net/wireless/ath/ath9k/ani.c 2009-06-24 21:14:00.000000000 -0700 > +++ b/drivers/net/wireless/ath/ath9k/ani.c 2009-07-06 02:45:57.000000000 -0700 > @@ -482,7 +482,7 @@ void ath9k_ani_reset(struct ath_hw *ah) > ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); > ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); > ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, > - !ATH9K_ANI_USE_OFDM_WEAK_SIG); > + ATH9K_ANI_USE_OFDM_WEAK_SIG); > ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, > ATH9K_ANI_CCK_WEAK_SIG_THR); > > > _______________________________________________ > ath9k-devel mailing list > ath9k-devel@lists.ath9k.org > https://lists.ath9k.org/mailman/listinfo/ath9k-devel > ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ath9k-devel] [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-10 18:02 ` [ath9k-devel] " Luis R. Rodriguez @ 2009-07-11 15:23 ` Nick Kossifidis 2009-07-14 18:03 ` Luis R. Rodriguez 1 sibling, 0 replies; 8+ messages in thread From: Nick Kossifidis @ 2009-07-11 15:23 UTC (permalink / raw) To: Luis R. Rodriguez Cc: Steven Luo, Bennyam Malavazi, John W. Linville, linux-wireless, Jouni Malinen, Senthil Balasubramanian, ath9k-devel, Vasanthakumar Thiagarajan 2009/7/10 Luis R. Rodriguez <mcgrof@gmail.com>: > On Thu, Jul 9, 2009 at 2:12 PM, Steven Luo<steven@steven676.net> wrote: >> From: Steven Luo <steven@steven676.net> >> >> It seems that OFDM weak signal detection should be enabled after an ANI >> state reset, as indicated by the initial setting of ofdmWeakSigDetectOff >> and what the open Atheros HAL does. Unfortunately, the reversed sense >> of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) >> seems to have resulted in a mixup here, causing weak signal detection to >> be disabled. >> >> This patch significantly improves reception and throughput from distant >> stations for my AR5416-based AP running compat-wireless 2009-06-25. >> >> Signed-off-by: Steven Luo <steven@steven676.net> >> Cc: stable@kernel.org >> --- > > NACK for now, please give us a chance to review this -- this may > actually be correct. > > Luis > >> --- a/drivers/net/wireless/ath/ath9k/ani.c 2009-06-24 21:14:00.000000000 -0700 >> +++ b/drivers/net/wireless/ath/ath9k/ani.c 2009-07-06 02:45:57.000000000 -0700 >> @@ -482,7 +482,7 @@ void ath9k_ani_reset(struct ath_hw *ah) >> ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); >> ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); >> ath9k_hw_ani_control(ah, ATH9K_ANI_OFDM_WEAK_SIGNAL_DETECTION, >> - !ATH9K_ANI_USE_OFDM_WEAK_SIG); >> + ATH9K_ANI_USE_OFDM_WEAK_SIG); >> ath9k_hw_ani_control(ah, ATH9K_ANI_CCK_WEAK_SIGNAL_THR, >> ATH9K_ANI_CCK_WEAK_SIG_THR); >> >> Does your AP operate on 2.4GHz band or 5GHz ? -- GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ath9k-devel] [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-10 18:02 ` [ath9k-devel] " Luis R. Rodriguez 2009-07-11 15:23 ` Nick Kossifidis @ 2009-07-14 18:03 ` Luis R. Rodriguez 2009-07-14 18:11 ` Luis R. Rodriguez 1 sibling, 1 reply; 8+ messages in thread From: Luis R. Rodriguez @ 2009-07-14 18:03 UTC (permalink / raw) To: Luis R. Rodriguez Cc: Steven Luo, Bennyam Malavazi, linux-wireless@vger.kernel.org, John W. Linville, Jouni Malinen, Senthilkumar Balasubramanian, ath9k-devel@lists.ath9k.org, Vasanth Thiagarajan On Fri, Jul 10, 2009 at 11:02:58AM -0700, Luis R. Rodriguez wrote: > On Thu, Jul 9, 2009 at 2:12 PM, Steven Luo<steven@steven676.net> wrote: > > From: Steven Luo <steven@steven676.net> > > > > It seems that OFDM weak signal detection should be enabled after an ANI > > state reset, as indicated by the initial setting of ofdmWeakSigDetectOff > > and what the open Atheros HAL does. Unfortunately, the reversed sense > > of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) > > seems to have resulted in a mixup here, causing weak signal detection to > > be disabled. > > > > This patch significantly improves reception and throughput from distant > > stations for my AR5416-based AP running compat-wireless 2009-06-25. > > > > Signed-off-by: Steven Luo <steven@steven676.net> > > Cc: stable@kernel.org > > --- > > NACK for now, please give us a chance to review this -- this may > actually be correct. Please try this patch instead, I've only compile tested this. From: Luis R. Rodriguez <lrodriguez@atheros.com> Subject: [PATCH] ath9k: Tune ANI function processing on AP mode during ANI reset For AP mode we must tune ANI specially for 2 GHz and for 5 GHz. We mask in only the flags we want to toggle on ath9k_hw_ani_control() through the ah->ani_function bitmask, this will take care of ignoring changes during ANI reset which we were disabling before. Reported-by: Steven Luo <steven@steven676.net> Cc: Bennyam Malavazi <Bennyam.Malavazi@Atheros.com Cc: Jouni Malinen <Jouni.Malinen@Atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> --- drivers/net/wireless/ath/ath9k/ani.c | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c @@ -478,6 +478,19 @@ void ath9k_ani_reset(struct ath_hw *ah) "Reset ANI state opmode %u\n", ah->opmode); ah->stats.ast_ani_reset++; + if (ah->opmode == NL80211_IFTYPE_AP || + ah->opmode == NL80211_IFTYPE_AP) { + /* + * ath9k_hw_ani_control() will only process items set on + * ah->ani_function + */ + if (IS_CHAN_2GHZ(chan)) + ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL | + ATH9K_ANI_FIRSTEP_LEVEL); + else + ah->ani_function = 0; + } + ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); -- 1.6.3.3 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ath9k-devel] [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-14 18:03 ` Luis R. Rodriguez @ 2009-07-14 18:11 ` Luis R. Rodriguez 2009-07-15 4:04 ` Steven Luo 0 siblings, 1 reply; 8+ messages in thread From: Luis R. Rodriguez @ 2009-07-14 18:11 UTC (permalink / raw) To: Luis R. Rodriguez Cc: Vasanth Thiagarajan, linux-wireless@vger.kernel.org, John W. Linville, Steven Luo, Senthilkumar Balasubramanian, ath9k-devel@lists.ath9k.org, Bennyam Malavazi, Jouni Malinen, Vasanth@venema.h4ckr.net On Tue, Jul 14, 2009 at 11:03:48AM -0700, Luis Rodriguez wrote: > On Fri, Jul 10, 2009 at 11:02:58AM -0700, Luis R. Rodriguez wrote: > > On Thu, Jul 9, 2009 at 2:12 PM, Steven Luo<steven@steven676.net> wrote: > > > From: Steven Luo <steven@steven676.net> > > > > > > It seems that OFDM weak signal detection should be enabled after an ANI > > > state reset, as indicated by the initial setting of ofdmWeakSigDetectOff > > > and what the open Atheros HAL does. Unfortunately, the reversed sense > > > of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) > > > seems to have resulted in a mixup here, causing weak signal detection to > > > be disabled. > > > > > > This patch significantly improves reception and throughput from distant > > > stations for my AR5416-based AP running compat-wireless 2009-06-25. > > > > > > Signed-off-by: Steven Luo <steven@steven676.net> > > > Cc: stable@kernel.org > > > --- > > > > NACK for now, please give us a chance to review this -- this may > > actually be correct. > > Please try this patch instead, I've only compile tested this. Now without the double AP check :) From: Luis R. Rodriguez <lrodriguez@atheros.com> Subject: [PATCH] ath9k: Tune ANI function processing on AP mode during ANI reset For AP mode we must tune ANI specially for 2 GHz and for 5 GHz. We mask in only the flags we want to toggle on ath9k_hw_ani_control() through the ah->ani_function bitmask, this will take care of ignoring changes during ANI reset which we were disabling before. Reported-by: Steven Luo <steven@steven676.net> Cc: Bennyam Malavazi <Bennyam.Malavazi@Atheros.com Cc: Jouni Malinen <Jouni.Malinen@Atheros.com> Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> --- drivers/net/wireless/ath/ath9k/ani.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c @@ -478,6 +478,18 @@ void ath9k_ani_reset(struct ath_hw *ah) "Reset ANI state opmode %u\n", ah->opmode); ah->stats.ast_ani_reset++; + if (ah->opmode == NL80211_IFTYPE_AP) { + /* + * ath9k_hw_ani_control() will only process items set on + * ah->ani_function + */ + if (IS_CHAN_2GHZ(chan)) + ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL | + ATH9K_ANI_FIRSTEP_LEVEL); + else + ah->ani_function = 0; + } + ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); -- 1.6.3.3 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [ath9k-devel] [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-14 18:11 ` Luis R. Rodriguez @ 2009-07-15 4:04 ` Steven Luo 0 siblings, 0 replies; 8+ messages in thread From: Steven Luo @ 2009-07-15 4:04 UTC (permalink / raw) To: Luis R. Rodriguez Cc: Luis R. Rodriguez, Vasanth Thiagarajan, linux-wireless@vger.kernel.org, John W. Linville, Senthilkumar Balasubramanian, ath9k-devel@lists.ath9k.org, Bennyam Malavazi, Jouni Malinen, Vasanth@venema.h4ckr.net On Tue, Jul 14, 2009 at 11:11:48AM -0700, Luis R. Rodriguez wrote: > On Tue, Jul 14, 2009 at 11:03:48AM -0700, Luis Rodriguez wrote: > > Please try this patch instead, I've only compile tested this. Yeah, this works too. Thanks! -Steven Luo > Now without the double AP check :) > > From: Luis R. Rodriguez <lrodriguez@atheros.com> > Subject: [PATCH] ath9k: Tune ANI function processing on AP mode during ANI reset > > For AP mode we must tune ANI specially for 2 GHz and > for 5 GHz. We mask in only the flags we want to toggle > on ath9k_hw_ani_control() through the ah->ani_function > bitmask, this will take care of ignoring changes during > ANI reset which we were disabling before. > > Reported-by: Steven Luo <steven@steven676.net> > Cc: Bennyam Malavazi <Bennyam.Malavazi@Atheros.com > Cc: Jouni Malinen <Jouni.Malinen@Atheros.com> > Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> > --- > drivers/net/wireless/ath/ath9k/ani.c | 12 ++++++++++++ > 1 files changed, 12 insertions(+), 0 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c > --- a/drivers/net/wireless/ath/ath9k/ani.c > +++ b/drivers/net/wireless/ath/ath9k/ani.c > @@ -478,6 +478,18 @@ void ath9k_ani_reset(struct ath_hw *ah) > "Reset ANI state opmode %u\n", ah->opmode); > ah->stats.ast_ani_reset++; > > + if (ah->opmode == NL80211_IFTYPE_AP) { > + /* > + * ath9k_hw_ani_control() will only process items set on > + * ah->ani_function > + */ > + if (IS_CHAN_2GHZ(chan)) > + ah->ani_function = (ATH9K_ANI_SPUR_IMMUNITY_LEVEL | > + ATH9K_ANI_FIRSTEP_LEVEL); > + else > + ah->ani_function = 0; > + } > + > ath9k_hw_ani_control(ah, ATH9K_ANI_NOISE_IMMUNITY_LEVEL, 0); > ath9k_hw_ani_control(ah, ATH9K_ANI_SPUR_IMMUNITY_LEVEL, 0); > ath9k_hw_ani_control(ah, ATH9K_ANI_FIRSTEP_LEVEL, 0); > -- > 1.6.3.3 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-09 21:12 [PATCH] ath9k: Fix enabling OFDM weak signal detection Steven Luo 2009-07-10 18:02 ` [ath9k-devel] " Luis R. Rodriguez @ 2009-07-11 15:26 ` Nick Kossifidis 2009-07-11 18:48 ` Steven Luo 1 sibling, 1 reply; 8+ messages in thread From: Nick Kossifidis @ 2009-07-11 15:26 UTC (permalink / raw) To: Steven Luo Cc: John W. Linville, Luis R. Rodriguez, Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan, Senthil Balasubramanian, linux-wireless, ath9k-devel 2009/7/10 Steven Luo <steven@steven676.net>: > From: Steven Luo <steven@steven676.net> > > It seems that OFDM weak signal detection should be enabled after an ANI > state reset, as indicated by the initial setting of ofdmWeakSigDetectOff > and what the open Atheros HAL does. Unfortunately, the reversed sense > of ofdmWeakSigDetectOff (true if weak signal detection is NOT enabled) > seems to have resulted in a mixup here, causing weak signal detection to > be disabled. > > This patch significantly improves reception and throughput from distant > stations for my AR5416-based AP running compat-wireless 2009-06-25. > (sorry, bad reply to all) Does your AP operate on 2.4GHz band or 5GHz ? -- GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] ath9k: Fix enabling OFDM weak signal detection 2009-07-11 15:26 ` Nick Kossifidis @ 2009-07-11 18:48 ` Steven Luo 0 siblings, 0 replies; 8+ messages in thread From: Steven Luo @ 2009-07-11 18:48 UTC (permalink / raw) To: Nick Kossifidis Cc: John W. Linville, Luis R. Rodriguez, Jouni Malinen, Sujith Manoharan, Vasanthakumar Thiagarajan, Senthil Balasubramanian, linux-wireless, ath9k-devel On Sat, Jul 11, 2009 at 06:26:14PM +0300, Nick Kossifidis wrote: > Does your AP operate on 2.4GHz band or 5GHz ? 2.4 GHz -- my card doesn't support 5 GHz operation. -Steven Luo ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-07-15 4:04 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-09 21:12 [PATCH] ath9k: Fix enabling OFDM weak signal detection Steven Luo 2009-07-10 18:02 ` [ath9k-devel] " Luis R. Rodriguez 2009-07-11 15:23 ` Nick Kossifidis 2009-07-14 18:03 ` Luis R. Rodriguez 2009-07-14 18:11 ` Luis R. Rodriguez 2009-07-15 4:04 ` Steven Luo 2009-07-11 15:26 ` Nick Kossifidis 2009-07-11 18:48 ` Steven Luo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).