linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com,
	rodrigue@qca.qualcomm.com, c_manoha@qca.qualcomm.com
Subject: Re: [PATCH 2/9] ath9k_hw: fix OFDM weak signal detection handling
Date: Fri, 15 Jun 2012 23:05:30 +0200	[thread overview]
Message-ID: <4FDBA39A.60809@openwrt.org> (raw)
In-Reply-To: <20120615173814.GA648@vmraj-lnx.qca.qualcomm.com>

On 2012-06-15 7:38 PM, Rajkumar Manoharan wrote:
> On Fri, Jun 15, 2012 at 03:25:20PM +0200, Felix Fietkau wrote:
>> Commit "ath9k_hw: improve ANI processing and rx desensitizing parameters"
>> was unifying some code related to overriding OFDM weak signal detection,
>> but seems to have gotten some of the original intent wrong, probably
>> because of a misnamed variable.
>> 
>> The beacon RSSI is only valid in station mode, and the main reason to check
>> it in ath9k_hw_set_ofdm_nil is to make sure that OFDM weak signal detection
>> stays enabled if the RSSI is low, even when the OFDM noise immunity entry
>> is supposed to disable it.
>> 
>> The above commit removed the mode checks and changed the code so that
>> OFDM weak signal detection would only be changed if the rssi is high, which
>> is wrong for everything but client mode.
>> 
>> This patch restores the old behavior in a simplified form.
>> 
>> Signed-off-by: Felix Fietkau <nbd@openwrt.org>
>> ---
>>  drivers/net/wireless/ath/ath9k/ani.c |   11 +++++++----
>>  1 files changed, 7 insertions(+), 4 deletions(-)
>> 
>> diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
>> index 18ce69d..cf31050 100644
>> --- a/drivers/net/wireless/ath/ath9k/ani.c
>> +++ b/drivers/net/wireless/ath/ath9k/ani.c
>> @@ -265,6 +265,7 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
>>  	struct ath_common *common = ath9k_hw_common(ah);
>>  	const struct ani_ofdm_level_entry *entry_ofdm;
>>  	const struct ani_cck_level_entry *entry_cck;
>> +	bool weak_sig;
>>  
>>  	ath_dbg(common, ANI, "**** ofdmlevel %d=>%d, rssi=%d[lo=%d hi=%d]\n",
>>  		aniState->ofdmNoiseImmunityLevel,
>> @@ -290,13 +291,15 @@ static void ath9k_hw_set_ofdm_nil(struct ath_hw *ah, u8 immunityLevel)
>>  				     ATH9K_ANI_FIRSTEP_LEVEL,
>>  				     entry_ofdm->fir_step_level);
>>  
>> -	if (BEACON_RSSI(ah) >= aniState->rssiThrHigh &&
>> -	    (!aniState->ofdmWeakSigDetectOff !=
>> -	     entry_ofdm->ofdm_weak_signal_on)) {
>> +	weak_sig = entry_ofdm->ofdm_weak_signal_on;
>> +	if (ah->opmode == NL80211_IFTYPE_STATION &&
>> +	    BEACON_RSSI(ah) <= aniState->rssiThrHigh)
>> +		weak_sig = true;
>> +
>> +	if (!aniState->ofdmWeakSigDetectOff != weak_sig)
> 
> beacon rssi is updated and used in both station and ibss mode. isn't it?
Yeah, but in ibss mode it does not make much sense when there are
multiple peers and a less frequent update interval (due to distributed
beaconing).

- Felix

      reply	other threads:[~2012-06-15 21:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-15 13:25 [PATCH 1/9] ath9k_hw: remove aniState->noiseFloor Felix Fietkau
2012-06-15 13:25 ` [PATCH 2/9] ath9k_hw: fix OFDM weak signal detection handling Felix Fietkau
2012-06-15 13:25   ` [PATCH 3/9] ath9k_hw: remove confusing logic inversion in an ANI variable Felix Fietkau
2012-06-15 13:25     ` [PATCH 4/9] ath9k_hw: clean up / fix ANI mode checks related to beacon RSSI Felix Fietkau
2012-06-15 13:25       ` [PATCH 5/9] ath9k_hw: remove the old ANI implementation Felix Fietkau
2012-06-15 13:25         ` [PATCH 6/9] ath9k_hw: clean up defines and variables from the ANI implementation split Felix Fietkau
2012-06-15 13:25           ` [PATCH 7/9] ath9k: remove MIB interrupt support Felix Fietkau
2012-06-15 13:25             ` [PATCH 8/9] ath9k_hw: fix setting lower noise immunity values Felix Fietkau
2012-06-15 13:25               ` [PATCH 9/9] ath9k_hw: clean up ANI OFDM trigger handling Felix Fietkau
2012-06-15 18:05               ` [PATCH 8/9] ath9k_hw: fix setting lower noise immunity values Rajkumar Manoharan
2012-06-15 17:58         ` [PATCH 5/9] ath9k_hw: remove the old ANI implementation Rajkumar Manoharan
2012-06-15 21:09           ` Felix Fietkau
2012-06-17  1:06         ` Sujith Manoharan
2012-06-17 14:36           ` Felix Fietkau
2012-06-18  8:36             ` Sujith Manoharan
2012-06-18 10:12             ` Sujith Manoharan
2012-06-15 17:49       ` [PATCH 4/9] ath9k_hw: clean up / fix ANI mode checks related to beacon RSSI Rajkumar Manoharan
2012-06-15 21:05         ` Felix Fietkau
2012-06-15 17:38   ` [PATCH 2/9] ath9k_hw: fix OFDM weak signal detection handling Rajkumar Manoharan
2012-06-15 21:05     ` Felix Fietkau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FDBA39A.60809@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=c_manoha@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=rmanohar@qca.qualcomm.com \
    --cc=rodrigue@qca.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).