aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-06-12 11:22:29 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-14 15:39:33 -0400
commit9cc3271faa3967754ca1d6ac982e91e347c55489 (patch)
treec31b054e5c33c7b1de3b5881f7d1893bbaf8d4a3 /drivers
parent716f7fc5b83ec04c53274a4810a723747e12f910 (diff)
ath9k_hw: remove ATH9K_CAP_TXPOW
replace calls that read this capability with accesses to ath9k_hw's regulatory data. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_main.c4
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c16
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c4
4 files changed, 2 insertions, 23 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 1c7263e3d1de..c1d8fb8d4a93 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -27,13 +27,11 @@ static struct dentry *ath9k_debugfs_root;
27static void ath_update_txpow(struct ath9k_htc_priv *priv) 27static void ath_update_txpow(struct ath9k_htc_priv *priv)
28{ 28{
29 struct ath_hw *ah = priv->ah; 29 struct ath_hw *ah = priv->ah;
30 u32 txpow;
31 30
32 if (priv->curtxpow != priv->txpowlimit) { 31 if (priv->curtxpow != priv->txpowlimit) {
33 ath9k_hw_set_txpowerlimit(ah, priv->txpowlimit); 32 ath9k_hw_set_txpowerlimit(ah, priv->txpowlimit);
34 /* read back in case value is clamped */ 33 /* read back in case value is clamped */
35 ath9k_hw_getcapability(ah, ATH9K_CAP_TXPOW, 1, &txpow); 34 priv->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
36 priv->curtxpow = txpow;
37 } 35 }
38} 36}
39 37
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 94f12581d0be..d908f78da42b 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -2258,7 +2258,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
2258bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type, 2258bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type,
2259 u32 capability, u32 *result) 2259 u32 capability, u32 *result)
2260{ 2260{
2261 struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
2262 switch (type) { 2261 switch (type) {
2263 case ATH9K_CAP_TKIP_MIC: 2262 case ATH9K_CAP_TKIP_MIC:
2264 switch (capability) { 2263 switch (capability) {
@@ -2286,21 +2285,6 @@ bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type,
2286 } 2285 }
2287 } 2286 }
2288 return false; 2287 return false;
2289 case ATH9K_CAP_TXPOW:
2290 switch (capability) {
2291 case 0:
2292 return 0;
2293 case 1:
2294 *result = regulatory->power_limit;
2295 return 0;
2296 case 2:
2297 *result = regulatory->max_power_level;
2298 return 0;
2299 case 3:
2300 *result = regulatory->tp_scale;
2301 return 0;
2302 }
2303 return false;
2304 case ATH9K_CAP_DS: 2288 case ATH9K_CAP_DS:
2305 return (AR_SREV_9280_20_OR_LATER(ah) && 2289 return (AR_SREV_9280_20_OR_LATER(ah) &&
2306 (ah->eep_ops->get_eeprom(ah, EEP_RC_CHAIN_MASK) == 1)) 2290 (ah->eep_ops->get_eeprom(ah, EEP_RC_CHAIN_MASK) == 1))
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index cc01dc8ba8bd..7456850f08b8 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -209,7 +209,6 @@ enum ath9k_hw_caps {
209enum ath9k_capability_type { 209enum ath9k_capability_type {
210 ATH9K_CAP_TKIP_MIC, 210 ATH9K_CAP_TKIP_MIC,
211 ATH9K_CAP_TKIP_SPLIT, 211 ATH9K_CAP_TKIP_SPLIT,
212 ATH9K_CAP_TXPOW,
213 ATH9K_CAP_MCAST_KEYSRCH, 212 ATH9K_CAP_MCAST_KEYSRCH,
214 ATH9K_CAP_DS 213 ATH9K_CAP_DS
215}; 214};
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index f38da2920f85..c8de50fa6378 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -51,13 +51,11 @@ static void ath_cache_conf_rate(struct ath_softc *sc,
51static void ath_update_txpow(struct ath_softc *sc) 51static void ath_update_txpow(struct ath_softc *sc)
52{ 52{
53 struct ath_hw *ah = sc->sc_ah; 53 struct ath_hw *ah = sc->sc_ah;
54 u32 txpow;
55 54
56 if (sc->curtxpow != sc->config.txpowlimit) { 55 if (sc->curtxpow != sc->config.txpowlimit) {
57 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit); 56 ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit);
58 /* read back in case value is clamped */ 57 /* read back in case value is clamped */
59 ath9k_hw_getcapability(ah, ATH9K_CAP_TXPOW, 1, &txpow); 58 sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
60 sc->curtxpow = txpow;
61 } 59 }
62} 60}
63 61