Search Linux Wireless

Re: [RFC/RFT 6/6] ath9k: always initialize hw registers related to PCIe PM

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

 



On Fri, Jul 22, 2011 at 03:31:52PM +0200, Stanislaw Gruszka wrote:
> We might not initialize registers if ah->aspm_enabled == false, assure
> we do this.
> 
> Signed-off-by: Stanislaw Gruszka <sgruszka@xxxxxxxxxx>
> ---
>  drivers/net/wireless/ath/ath9k/hw.c  |    5 +----
>  drivers/net/wireless/ath/ath9k/pci.c |    4 ++++
>  2 files changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index 4ef7313..7084bb5 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -595,10 +595,7 @@ static int __ath9k_hw_init(struct ath_hw *ah)
>  
>  	ath9k_hw_init_mode_regs(ah);
>  
> -
> -	if (ah->is_pciexpress)
> -		ath9k_hw_configpcipowersave(ah, false);
> -	else
> +	if (!ah->is_pciexpress)
>  		ath9k_hw_disablepcie(ah);
>  
>  	if (!AR_SREV_9300_20_OR_LATER(ah))
> diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
> index 835a50a..d1c75ec 100644
> --- a/drivers/net/wireless/ath/ath9k/pci.c
> +++ b/drivers/net/wireless/ath/ath9k/pci.c
> @@ -118,6 +118,10 @@ static void ath_pci_aspm_init(struct ath_softc *sc)
>  	if (!pci_is_pcie(pdev))
>  		return;
>  
> +	/* initalize PCIe PM registers if device introduce itself as PCIe */
> +	if (ah->is_pciexpress)
> +		ath9k_hw_ops(ah)->config_pci_powersave(ah, false);
> +
Use ath9k_hw_configpcipowersave wrapper instead. And ensure that there is no
sideeffect by changing SERDES config from __ath9k_hw_init to pci_probe.

--
Rajkumar
>  	parent = pdev->bus->self;
>  
>  	if (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE) {
> -- 
> 1.7.1
> 
--
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