Search Linux Wireless

Re: [PATCH v3 3/4] ath9k: use config.enable_ani to check if ani should be performed

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

 



On 2011-11-30 9:46 PM, Nikolay Martynov wrote:
>   Currently in ath9k code there is an attempt which is meant to
> disable ANI for ar9100 and ar9340. But it doesn't really achieve
> this. All it does is disable ANI init and setup (i.e. calls to
> ath9k_hw_ani_setup and ath9k_hw_ani_init). Since ath9k_hw_ani_setup is
> not called ah->config.ani_poll_interval is never initialized (i.e. it
> is always zero) and ath_ani_calibrate always executes ANI procedures
> (over uninitialized ANI parameters).
>   Moreover, ath_ani_calibrate is being called each 1ms because
> common->ani.timer is set to zero interval because
> ah->config.ani_poll_interval==0 (and thus smallest value of all
> intervals). Normally it should not be called this often.
>   This patch changes the code so config.enable_ani is used to check if
> ANI should be performed.
>   config.enable_ani is initialized to true by default. This patch sets
> it to false for ar9100 and ar9340.
> 
> Signed-off-by: Nikolay Martynov <mar.kolya@xxxxxxxxx>
> ---
>  drivers/net/wireless/ath/ath9k/htc_drv_main.c |    3 ++-
>  drivers/net/wireless/ath/ath9k/hw.c           |    6 +++++-
>  drivers/net/wireless/ath/ath9k/main.c         |    5 +++--
>  3 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> index 0b9a0e8..391d59c 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
> @@ -808,7 +808,8 @@ void ath9k_htc_ani_work(struct work_struct *work)
>  	}
>  
>  	/* Verify whether we must check ANI */
> -	if ((timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
> +	if (sc->sc_ah->config.enable_ani &&
> +	    (timestamp - common->ani.checkani_timer) >= ATH_ANI_POLLINTERVAL) {
>  		aniflag = true;
>  		common->ani.checkani_timer = timestamp;
>  	}
Does not compile, there is no 'sc' variable, use ah->config.enable_ani.

- Felix
--
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