linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@openwrt.org>
To: "Luis R. Rodriguez" <lrodriguez@atheros.com>
Cc: linux-wireless@vger.kernel.org, linville@tuxdriver.com
Subject: Re: [PATCH 1/3] ath9k: prevent calibration during off-channel 	activity
Date: Wed, 28 Jul 2010 23:08:53 +0200	[thread overview]
Message-ID: <4C509C65.4020305@openwrt.org> (raw)
In-Reply-To: <AANLkTimZ8zTZWDcXwr7Hu2FT=gDPeCiiUFXcBmpYpp7M@mail.gmail.com>

On 2010-07-28 10:43 PM, Luis R. Rodriguez wrote:
> On Wed, Jul 28, 2010 at 10:45 AM, Felix Fietkau <nbd@openwrt.org> wrote:
>> Previously the software scan callback was used to indicate to the hardware,
>> when it was safe to calibrate. This didn't really work properly, because it
>> depends on a specific order of software scan callbacks vs. channel changes.
>> Also, software scans are not the only thing that triggers off-channel
>> activity, so it's better to use the newly added indication from mac80211 for
>> this and not use the software scan callback for anything calibration related.
>>
>> This fixes at least some of the invalid noise floor readings that I've seen
>> in AP mode on AR9160
> 
> Neat!
> 
>> --- a/drivers/net/wireless/ath/ath9k/main.c
>> +++ b/drivers/net/wireless/ath/ath9k/main.c
>> @@ -154,6 +154,27 @@ void ath9k_ps_restore(struct ath_softc *sc)
>>        spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
>>  }
>>        spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
>>  }
>>
>> +static void ath_start_ani(struct ath_common *common)
>> +{
>> +       struct ath_hw *ah = common->ah;
>> +       unsigned long timestamp = jiffies_to_msecs(jiffies);
>> +       struct ath_softc *sc = (struct ath_softc *) common->priv;
>> +
>> +       if (!(sc->sc_flags & SC_OP_ANI_RUN))
>> +               return;
>> +
>> +       if (sc->sc_flags & SC_OP_OFFCHANNEL)
>> +               return;
>> +
>> +       common->ani.longcal_timer = timestamp;
>> +       common->ani.shortcal_timer = timestamp;
>> +       common->ani.checkani_timer = timestamp;
>> +
>> +       mod_timer(&common->ani.timer,
>> +                 jiffies +
>> +                       msecs_to_jiffies((u32)ah->config.ani_poll_interval));
>> +}
> 
> I would prefer if you do this sort of code shift in a separate patch.
> In this case its pretty easy to see the code is the same so I think
> its fine the way it is now but for next time please. Otherwise looks
> good, thanks!!
If it had been a bigger function, I'd have made a separate patch, but I
figured for something as trivial as this it wouldn't matter.

- Felix

  reply	other threads:[~2010-07-28 21:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-28 17:45 [PATCH 1/3] ath9k: prevent calibration during off-channel activity Felix Fietkau
2010-07-28 17:45 ` [PATCH 2/3] ath9k_hw: clean up per-channel calibration data Felix Fietkau
2010-07-28 17:45   ` [PATCH 3/3] ath9k_hw: fix a noise floor calibration related race condition Felix Fietkau
2010-07-28 20:52   ` [PATCH 2/3] ath9k_hw: clean up per-channel calibration data Luis R. Rodriguez
2010-07-28 21:10     ` Felix Fietkau
2010-07-28 21:21       ` Luis R. Rodriguez
2010-07-28 21:30         ` Felix Fietkau
2010-07-28 21:40           ` Luis R. Rodriguez
2010-07-28 22:03             ` Felix Fietkau
2010-07-28 20:43 ` [PATCH 1/3] ath9k: prevent calibration during off-channel activity Luis R. Rodriguez
2010-07-28 21:08   ` Felix Fietkau [this message]
2010-07-28 22:12     ` Luis R. Rodriguez
2010-07-28 22:28       ` Felix Fietkau
2010-07-28 22:47         ` Luis R. Rodriguez
2010-07-28 22:48           ` Luis R. Rodriguez
2010-07-29 16:58             ` wireless-next-2.6 rebase -- " John W. Linville

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=4C509C65.4020305@openwrt.org \
    --to=nbd@openwrt.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=lrodriguez@atheros.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).