diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2011-08-05 07:10:32 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-08-22 14:45:57 -0400 |
commit | 84c87dc86eaf5c3f70d6c85fac832b277b1f71c7 (patch) | |
tree | eed17db69a94517d35b3e789272b9d3918d38812 /drivers/net/wireless/ath | |
parent | af2bf4b4ee58d262a9a5c1d4ce6f81835058f8b5 (diff) |
ath9k: remove ->config_pci_powersave() redundant argument
We always call ->config_pci_powersave() with both restore and power_off
arguments equal to 0 or both equal to 1, so merge them into one
argument.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9002_hw.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_hw.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw-ops.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/main.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/pci.c | 3 |
6 files changed, 12 insertions, 15 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_hw.c b/drivers/net/wireless/ath/ath9k/ar9002_hw.c index 44d9d8d56490..70a18d14db19 100644 --- a/drivers/net/wireless/ath/ath9k/ar9002_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9002_hw.c | |||
@@ -303,8 +303,7 @@ static void ar9002_hw_init_mode_gain_regs(struct ath_hw *ah) | |||
303 | * register as the other analog registers. Hence the 9 writes. | 303 | * register as the other analog registers. Hence the 9 writes. |
304 | */ | 304 | */ |
305 | static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | 305 | static void ar9002_hw_configpcipowersave(struct ath_hw *ah, |
306 | int restore, | 306 | bool power_off) |
307 | int power_off) | ||
308 | { | 307 | { |
309 | u8 i; | 308 | u8 i; |
310 | u32 val; | 309 | u32 val; |
@@ -313,7 +312,7 @@ static void ar9002_hw_configpcipowersave(struct ath_hw *ah, | |||
313 | return; | 312 | return; |
314 | 313 | ||
315 | /* Nothing to do on restore for 11N */ | 314 | /* Nothing to do on restore for 11N */ |
316 | if (!restore) { | 315 | if (!power_off /* !restore */) { |
317 | if (AR_SREV_9280_20_OR_LATER(ah)) { | 316 | if (AR_SREV_9280_20_OR_LATER(ah)) { |
318 | /* | 317 | /* |
319 | * AR9280 2.0 or later chips use SerDes values from the | 318 | * AR9280 2.0 or later chips use SerDes values from the |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_hw.c b/drivers/net/wireless/ath/ath9k/ar9003_hw.c index ad2bb2bf4e8a..e3d58bdb5215 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_hw.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_hw.c | |||
@@ -516,14 +516,13 @@ static void ar9003_hw_init_mode_gain_regs(struct ath_hw *ah) | |||
516 | * register as the other analog registers. Hence the 9 writes. | 516 | * register as the other analog registers. Hence the 9 writes. |
517 | */ | 517 | */ |
518 | static void ar9003_hw_configpcipowersave(struct ath_hw *ah, | 518 | static void ar9003_hw_configpcipowersave(struct ath_hw *ah, |
519 | int restore, | 519 | bool power_off) |
520 | int power_off) | ||
521 | { | 520 | { |
522 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) | 521 | if (ah->is_pciexpress != true || ah->aspm_enabled != true) |
523 | return; | 522 | return; |
524 | 523 | ||
525 | /* Nothing to do on restore for 11N */ | 524 | /* Nothing to do on restore for 11N */ |
526 | if (!restore) { | 525 | if (!power_off /* !restore */) { |
527 | /* set bit 19 to allow forcing of pcie core into L1 state */ | 526 | /* set bit 19 to allow forcing of pcie core into L1 state */ |
528 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); | 527 | REG_SET_BIT(ah, AR_PCIE_PM_CTRL, AR_PCIE_PM_CTRL_ENA); |
529 | 528 | ||
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h index cb29e8875386..8c123857c9d7 100644 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h | |||
@@ -22,10 +22,9 @@ | |||
22 | /* Hardware core and driver accessible callbacks */ | 22 | /* Hardware core and driver accessible callbacks */ |
23 | 23 | ||
24 | static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah, | 24 | static inline void ath9k_hw_configpcipowersave(struct ath_hw *ah, |
25 | int restore, | 25 | bool power_off) |
26 | int power_off) | ||
27 | { | 26 | { |
28 | ath9k_hw_ops(ah)->config_pci_powersave(ah, restore, power_off); | 27 | ath9k_hw_ops(ah)->config_pci_powersave(ah, power_off); |
29 | } | 28 | } |
30 | 29 | ||
31 | static inline void ath9k_hw_rxena(struct ath_hw *ah) | 30 | static inline void ath9k_hw_rxena(struct ath_hw *ah) |
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h index 4fbcced2828c..2ea10f317183 100644 --- a/drivers/net/wireless/ath/ath9k/hw.h +++ b/drivers/net/wireless/ath/ath9k/hw.h | |||
@@ -606,8 +606,7 @@ struct ath_hw_private_ops { | |||
606 | */ | 606 | */ |
607 | struct ath_hw_ops { | 607 | struct ath_hw_ops { |
608 | void (*config_pci_powersave)(struct ath_hw *ah, | 608 | void (*config_pci_powersave)(struct ath_hw *ah, |
609 | int restore, | 609 | bool power_off); |
610 | int power_off); | ||
611 | void (*rx_enable)(struct ath_hw *ah); | 610 | void (*rx_enable)(struct ath_hw *ah); |
612 | void (*set_desc_link)(void *ds, u32 link); | 611 | void (*set_desc_link)(void *ds, u32 link); |
613 | bool (*calibrate)(struct ath_hw *ah, | 612 | bool (*calibrate)(struct ath_hw *ah, |
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c index 1e7fe8c0e119..e40873215fc6 100644 --- a/drivers/net/wireless/ath/ath9k/main.c +++ b/drivers/net/wireless/ath/ath9k/main.c | |||
@@ -888,7 +888,7 @@ static void ath_radio_enable(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
888 | spin_lock_bh(&sc->sc_pcu_lock); | 888 | spin_lock_bh(&sc->sc_pcu_lock); |
889 | atomic_set(&ah->intr_ref_cnt, -1); | 889 | atomic_set(&ah->intr_ref_cnt, -1); |
890 | 890 | ||
891 | ath9k_hw_configpcipowersave(ah, 0, 0); | 891 | ath9k_hw_configpcipowersave(ah, false); |
892 | 892 | ||
893 | if (!ah->curchan) | 893 | if (!ah->curchan) |
894 | ah->curchan = ath9k_cmn_get_curchannel(sc->hw, ah); | 894 | ah->curchan = ath9k_cmn_get_curchannel(sc->hw, ah); |
@@ -969,7 +969,7 @@ void ath_radio_disable(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
969 | 969 | ||
970 | ath9k_hw_phy_disable(ah); | 970 | ath9k_hw_phy_disable(ah); |
971 | 971 | ||
972 | ath9k_hw_configpcipowersave(ah, 1, 1); | 972 | ath9k_hw_configpcipowersave(ah, true); |
973 | 973 | ||
974 | spin_unlock_bh(&sc->sc_pcu_lock); | 974 | spin_unlock_bh(&sc->sc_pcu_lock); |
975 | ath9k_ps_restore(sc); | 975 | ath9k_ps_restore(sc); |
@@ -1069,7 +1069,7 @@ static int ath9k_start(struct ieee80211_hw *hw) | |||
1069 | init_channel = ath9k_cmn_get_curchannel(hw, ah); | 1069 | init_channel = ath9k_cmn_get_curchannel(hw, ah); |
1070 | 1070 | ||
1071 | /* Reset SERDES registers */ | 1071 | /* Reset SERDES registers */ |
1072 | ath9k_hw_configpcipowersave(ah, 0, 0); | 1072 | ath9k_hw_configpcipowersave(ah, false); |
1073 | 1073 | ||
1074 | /* | 1074 | /* |
1075 | * The basic interface to setting the hardware in a good | 1075 | * The basic interface to setting the hardware in a good |
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c index 5685cf11cfe3..65cf728fa111 100644 --- a/drivers/net/wireless/ath/ath9k/pci.c +++ b/drivers/net/wireless/ath/ath9k/pci.c | |||
@@ -35,6 +35,7 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = { | |||
35 | { 0 } | 35 | { 0 } |
36 | }; | 36 | }; |
37 | 37 | ||
38 | |||
38 | /* return bus cachesize in 4B word units */ | 39 | /* return bus cachesize in 4B word units */ |
39 | static void ath_pci_read_cachesize(struct ath_common *common, int *csz) | 40 | static void ath_pci_read_cachesize(struct ath_common *common, int *csz) |
40 | { | 41 | { |
@@ -137,7 +138,7 @@ static void ath_pci_aspm_init(struct ath_common *common) | |||
137 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { | 138 | if (aspm & (PCIE_LINK_STATE_L0S | PCIE_LINK_STATE_L1)) { |
138 | ah->aspm_enabled = true; | 139 | ah->aspm_enabled = true; |
139 | /* Initialize PCIe PM and SERDES registers. */ | 140 | /* Initialize PCIe PM and SERDES registers. */ |
140 | ath9k_hw_configpcipowersave(ah, 0, 0); | 141 | ath9k_hw_configpcipowersave(ah, false); |
141 | } | 142 | } |
142 | } | 143 | } |
143 | 144 | ||