]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
ath9k_hw: remove ATH9K_CAP_TXPOW
authorFelix Fietkau <nbd@openwrt.org>
Sat, 12 Jun 2010 15:22:29 +0000 (17:22 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 14 Jun 2010 19:39:33 +0000 (15:39 -0400)
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>
drivers/net/wireless/ath/ath9k/htc_drv_main.c
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h
drivers/net/wireless/ath/ath9k/main.c

index 1c7263e3d1de86a477c41ba5fa03d19150987314..c1d8fb8d4a93a050c351fbfea5543051c576ae81 100644 (file)
@@ -27,13 +27,11 @@ static struct dentry *ath9k_debugfs_root;
 static void ath_update_txpow(struct ath9k_htc_priv *priv)
 {
        struct ath_hw *ah = priv->ah;
-       u32 txpow;
 
        if (priv->curtxpow != priv->txpowlimit) {
                ath9k_hw_set_txpowerlimit(ah, priv->txpowlimit);
                /* read back in case value is clamped */
-               ath9k_hw_getcapability(ah, ATH9K_CAP_TXPOW, 1, &txpow);
-               priv->curtxpow = txpow;
+               priv->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
        }
 }
 
index 94f12581d0be2de1d967101187f74122e9407fc0..d908f78da42bfed2193bcf56cd1ed11d03128fd2 100644 (file)
@@ -2258,7 +2258,6 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah)
 bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type,
                            u32 capability, u32 *result)
 {
-       struct ath_regulatory *regulatory = ath9k_hw_regulatory(ah);
        switch (type) {
        case ATH9K_CAP_TKIP_MIC:
                switch (capability) {
@@ -2286,21 +2285,6 @@ bool ath9k_hw_getcapability(struct ath_hw *ah, enum ath9k_capability_type type,
                        }
                }
                return false;
-       case ATH9K_CAP_TXPOW:
-               switch (capability) {
-               case 0:
-                       return 0;
-               case 1:
-                       *result = regulatory->power_limit;
-                       return 0;
-               case 2:
-                       *result = regulatory->max_power_level;
-                       return 0;
-               case 3:
-                       *result = regulatory->tp_scale;
-                       return 0;
-               }
-               return false;
        case ATH9K_CAP_DS:
                return (AR_SREV_9280_20_OR_LATER(ah) &&
                        (ah->eep_ops->get_eeprom(ah, EEP_RC_CHAIN_MASK) == 1))
index cc01dc8ba8bdc766b995de6ceee13acf02de0397..7456850f08b89a6ebb054569e14b1858b4a765f7 100644 (file)
@@ -209,7 +209,6 @@ enum ath9k_hw_caps {
 enum ath9k_capability_type {
        ATH9K_CAP_TKIP_MIC,
        ATH9K_CAP_TKIP_SPLIT,
-       ATH9K_CAP_TXPOW,
        ATH9K_CAP_MCAST_KEYSRCH,
        ATH9K_CAP_DS
 };
index f38da2920f859239a9acf8823e3bf6e7604805ff..c8de50fa6378d5f4321f81dfe7055b793234ced2 100644 (file)
@@ -51,13 +51,11 @@ static void ath_cache_conf_rate(struct ath_softc *sc,
 static void ath_update_txpow(struct ath_softc *sc)
 {
        struct ath_hw *ah = sc->sc_ah;
-       u32 txpow;
 
        if (sc->curtxpow != sc->config.txpowlimit) {
                ath9k_hw_set_txpowerlimit(ah, sc->config.txpowlimit);
                /* read back in case value is clamped */
-               ath9k_hw_getcapability(ah, ATH9K_CAP_TXPOW, 1, &txpow);
-               sc->curtxpow = txpow;
+               sc->curtxpow = ath9k_hw_regulatory(ah)->power_limit;
        }
 }