Search Linux Wireless

Re: [PATCH 1/3] ath9k: prevent calibration during off-channel activity

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 28, 2010 at 10:45 AM, Felix Fietkau <nbd@xxxxxxxxxxx> 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!!

  Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux