linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: miaoqing@codeaurora.org, linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, ath9k-devel@qca.qualcomm.com,
	kvalo@qca.qualcomm.com
Subject: Re: [PATCH 1/5] ath9k: avoid ANI restart if no trigger
Date: Fri, 15 Jan 2016 12:28:16 +0100	[thread overview]
Message-ID: <5698D7D0.5080204@openwrt.org> (raw)
In-Reply-To: <1452821009-1156-2-git-send-email-miaoqing@codeaurora.org>

On 2016-01-15 02:23, miaoqing@codeaurora.org wrote:
> From: Miaoqing Pan <miaoqing@codeaurora.org>
> 
> ath9k_ani_restart() is always be invoked even if the trigger
> condition is false.
> 
> Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org>
> ---
>  drivers/net/wireless/ath/ath9k/ani.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c
> index 25e45e4..0f74d59 100644
> --- a/drivers/net/wireless/ath/ath9k/ani.c
> +++ b/drivers/net/wireless/ath/ath9k/ani.c
> @@ -444,14 +444,16 @@ void ath9k_hw_ani_monitor(struct ath_hw *ah, struct ath9k_channel *chan)
>  		    ofdmPhyErrRate < ah->config.ofdm_trig_low) {
>  			ath9k_hw_ani_lower_immunity(ah);
>  			aniState->ofdmsTurn = !aniState->ofdmsTurn;
> +			ath9k_ani_restart(ah);
>  		} else if (ofdmPhyErrRate > ah->config.ofdm_trig_high) {
>  			ath9k_hw_ani_ofdm_err_trigger(ah);
>  			aniState->ofdmsTurn = false;
> +			ath9k_ani_restart(ah);
>  		} else if (cckPhyErrRate > ah->config.cck_trig_high) {
>  			ath9k_hw_ani_cck_err_trigger(ah);
>  			aniState->ofdmsTurn = true;
> +			ath9k_ani_restart(ah);
>  		}
How about adding an 'else return' here instead of duplicating the
ath9k_ani_restart lines?

- Felix

  parent reply	other threads:[~2016-01-15 11:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-15  1:23 [PATCH 0/5] ath9k bug fixes miaoqing
2016-01-15  1:23 ` [PATCH 1/5] ath9k: avoid ANI restart if no trigger miaoqing
2016-01-15  8:00   ` Kalle Valo
2016-01-15  8:38     ` Pan, Miaoqing
2016-01-15  9:41       ` Kalle Valo
2016-01-15 11:28   ` Felix Fietkau [this message]
2016-01-15  1:23 ` [PATCH 2/5] ath9k: clean up ANI per-channel pointer checking miaoqing
2016-01-15  1:23 ` [PATCH 3/5] ath9k: do not reset while BB panic(0x4000409) on ar9561 miaoqing
2016-01-15  1:23 ` [PATCH 4/5] ath9k: fix inconsistent use of tab and space in indentation miaoqing
2016-01-15  1:23 ` [PATCH 5/5] ath9k: fix data bus error on ar9300 and ar9580 miaoqing

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=5698D7D0.5080204@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=ath9k-devel@qca.qualcomm.com \
    --cc=kvalo@qca.qualcomm.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=miaoqing@codeaurora.org \
    /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).