linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath9k_htc: Remove PCI specific configuration
@ 2010-12-14  2:42 Sujith
  2010-12-14 10:48 ` Felix Fietkau
  0 siblings, 1 reply; 3+ messages in thread
From: Sujith @ 2010-12-14  2:42 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

There is no need to configure PCI related registers for
USB devices.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    4 ----
 drivers/net/wireless/ath/ath9k/hw.c           |    8 +++++---
 2 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 20ea75a..dd17909 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1170,9 +1170,6 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
 	/* setup initial channel */
 	init_channel = ath9k_cmn_get_curchannel(hw, ah);
 
-	/* Reset SERDES registers */
-	ath9k_hw_configpcipowersave(ah, 0, 0);
-
 	ath9k_hw_htc_resetinit(ah);
 	ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
 	if (ret) {
@@ -1258,7 +1255,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
 
 	ath9k_hw_phy_disable(ah);
 	ath9k_hw_disable(ah);
-	ath9k_hw_configpcipowersave(ah, 1, 1);
 	ath9k_htc_ps_restore(priv);
 	ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP);
 
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 0f373be..2662553 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -568,10 +568,12 @@ static int __ath9k_hw_init(struct ath_hw *ah)
 	ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
 			 AR_WA_ASPM_TIMER_BASED_DISABLE);
 
-	if (ah->is_pciexpress)
+	if (ah->is_pciexpress) {
 		ath9k_hw_configpcipowersave(ah, 0, 0);
-	else
-		ath9k_hw_disablepcie(ah);
+	} else {
+		if (common->bus_ops->ath_bus_type != ATH_USB)
+			ath9k_hw_disablepcie(ah);
+	}
 
 	if (!AR_SREV_9300_20_OR_LATER(ah))
 		ar9002_hw_cck_chan14_spread(ah);
-- 
1.7.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] ath9k_htc: Remove PCI specific configuration
  2010-12-14  2:42 [PATCH] ath9k_htc: Remove PCI specific configuration Sujith
@ 2010-12-14 10:48 ` Felix Fietkau
  0 siblings, 0 replies; 3+ messages in thread
From: Felix Fietkau @ 2010-12-14 10:48 UTC (permalink / raw)
  To: Sujith; +Cc: linville, linux-wireless, Sujith.Manoharan

On 2010-12-14 3:42 AM, Sujith wrote:
> From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> 
> There is no need to configure PCI related registers for
> USB devices.
> 
> Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> ---
> diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
> index 0f373be..2662553 100644
> --- a/drivers/net/wireless/ath/ath9k/hw.c
> +++ b/drivers/net/wireless/ath/ath9k/hw.c
> @@ -568,10 +568,12 @@ static int __ath9k_hw_init(struct ath_hw *ah)
>  	ah->WARegVal |= (AR_WA_D3_L1_DISABLE |
>  			 AR_WA_ASPM_TIMER_BASED_DISABLE);
>  
> -	if (ah->is_pciexpress)
> +	if (ah->is_pciexpress) {
>  		ath9k_hw_configpcipowersave(ah, 0, 0);
> -	else
> -		ath9k_hw_disablepcie(ah);
> +	} else {
> +		if (common->bus_ops->ath_bus_type != ATH_USB)
> +			ath9k_hw_disablepcie(ah);
> +	}
I don't really see the point of this check, since (with my other patch)
ath9k_hw_disablepcie already checks for AR_SREV_5416, which won't return
true on any USB based device.

- Felix

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ath9k_htc: Remove PCI specific configuration
@ 2010-12-15  2:17 Sujith
  0 siblings, 0 replies; 3+ messages in thread
From: Sujith @ 2010-12-15  2:17 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

This is not required for USB devices.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c |    4 ----
 1 files changed, 0 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 20ea75a..dd17909 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1170,9 +1170,6 @@ static int ath9k_htc_start(struct ieee80211_hw *hw)
 	/* setup initial channel */
 	init_channel = ath9k_cmn_get_curchannel(hw, ah);
 
-	/* Reset SERDES registers */
-	ath9k_hw_configpcipowersave(ah, 0, 0);
-
 	ath9k_hw_htc_resetinit(ah);
 	ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
 	if (ret) {
@@ -1258,7 +1255,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
 
 	ath9k_hw_phy_disable(ah);
 	ath9k_hw_disable(ah);
-	ath9k_hw_configpcipowersave(ah, 1, 1);
 	ath9k_htc_ps_restore(priv);
 	ath9k_htc_setpower(priv, ATH9K_PM_FULL_SLEEP);
 
-- 
1.7.3.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-12-15  2:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-14  2:42 [PATCH] ath9k_htc: Remove PCI specific configuration Sujith
2010-12-14 10:48 ` Felix Fietkau
  -- strict thread matches above, loose matches on Subject: below --
2010-12-15  2:17 Sujith

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).