ath9k_hw: remove baseband rfsilent support
authorFelix Fietkau <nbd@openwrt.org>
Thu, 16 Dec 2010 23:57:01 +0000 (00:57 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 20 Dec 2010 19:49:48 +0000 (14:49 -0500)
When rfkill is enabled, ath9k_hw unnecessarily configured the baseband to
turn off based on GPIO input, however that code was hardcoded to GPIO 0
instead of ah->rfkill_gpio.
Since ath9k uses software rfkill anyway, this code is completely unnecessary
and should be removed in case anything else ever uses GPIO 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar5008_phy.c
drivers/net/wireless/ath/ath9k/ar9003_phy.c
drivers/net/wireless/ath/ath9k/hw-ops.h
drivers/net/wireless/ath/ath9k/hw.c
drivers/net/wireless/ath/ath9k/hw.h

index 059330aac645596eb4c722d727a863a921b35871..ffcf44a4058b7777a21c865095b4331c628e690b 100644 (file)
@@ -961,18 +961,6 @@ static void ar5008_hw_rfbus_done(struct ath_hw *ah)
        REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
 }
 
-static void ar5008_hw_enable_rfkill(struct ath_hw *ah)
-{
-       REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
-                   AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
-
-       REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
-                   AR_GPIO_INPUT_MUX2_RFSILENT);
-
-       ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
-       REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
-}
-
 static void ar5008_restore_chainmask(struct ath_hw *ah)
 {
        int rx_chainmask = ah->rxchainmask;
@@ -1629,7 +1617,6 @@ void ar5008_hw_attach_phy_ops(struct ath_hw *ah)
        priv_ops->set_delta_slope = ar5008_hw_set_delta_slope;
        priv_ops->rfbus_req = ar5008_hw_rfbus_req;
        priv_ops->rfbus_done = ar5008_hw_rfbus_done;
-       priv_ops->enable_rfkill = ar5008_hw_enable_rfkill;
        priv_ops->restore_chainmask = ar5008_restore_chainmask;
        priv_ops->set_diversity = ar5008_set_diversity;
        priv_ops->do_getnf = ar5008_hw_do_getnf;
index 07b44cec7739699fc770a24764f622f9ee82d016..8d60f4f09acccde18e971e9c11ba65e390411b8c 100644 (file)
@@ -745,28 +745,6 @@ static void ar9003_hw_rfbus_done(struct ath_hw *ah)
        REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
 }
 
-/*
- * Set the interrupt and GPIO values so the ISR can disable RF
- * on a switch signal.  Assumes GPIO port and interrupt polarity
- * are set prior to call.
- */
-static void ar9003_hw_enable_rfkill(struct ath_hw *ah)
-{
-       /* Connect rfsilent_bb_l to baseband */
-       REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
-                   AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
-       /* Set input mux for rfsilent_bb_l to GPIO #0 */
-       REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
-                   AR_GPIO_INPUT_MUX2_RFSILENT);
-
-       /*
-        * Configure the desired GPIO port for input and
-        * enable baseband rf silence.
-        */
-       ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
-       REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
-}
-
 static void ar9003_hw_set_diversity(struct ath_hw *ah, bool value)
 {
        u32 v = REG_READ(ah, AR_PHY_CCK_DETECT);
@@ -1203,7 +1181,6 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
        priv_ops->set_delta_slope = ar9003_hw_set_delta_slope;
        priv_ops->rfbus_req = ar9003_hw_rfbus_req;
        priv_ops->rfbus_done = ar9003_hw_rfbus_done;
-       priv_ops->enable_rfkill = ar9003_hw_enable_rfkill;
        priv_ops->set_diversity = ar9003_hw_set_diversity;
        priv_ops->ani_control = ar9003_hw_ani_control;
        priv_ops->do_getnf = ar9003_hw_do_getnf;
index 0a4ad348b6997d90594201b0d8a3aaadc3c11bca..c8f254fe0f0b37832c8ea6396100cedfaa449487 100644 (file)
@@ -223,11 +223,6 @@ static inline void ath9k_hw_rfbus_done(struct ath_hw *ah)
        return ath9k_hw_private_ops(ah)->rfbus_done(ah);
 }
 
-static inline void ath9k_enable_rfkill(struct ath_hw *ah)
-{
-       return ath9k_hw_private_ops(ah)->enable_rfkill(ah);
-}
-
 static inline void ath9k_hw_restore_chainmask(struct ath_hw *ah)
 {
        if (!ath9k_hw_private_ops(ah)->restore_chainmask)
index ddda76fcd18009b5d19036c2019c1cfdfe995008..4b51ed47fe6902783d75cc7ce24098ec35764dd5 100644 (file)
@@ -1385,7 +1385,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
        ath9k_hw_init_qos(ah);
 
        if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
-               ath9k_enable_rfkill(ah);
+               ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
 
        ath9k_hw_init_global_settings(ah);
 
index 21e37d157d3a514b13ba6838b6c01596c4410496..b98053f0640ad23161f1265cd28eef534495e8ba 100644 (file)
@@ -576,7 +576,6 @@ struct ath_hw_private_ops {
        void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
        bool (*rfbus_req)(struct ath_hw *ah);
        void (*rfbus_done)(struct ath_hw *ah);
-       void (*enable_rfkill)(struct ath_hw *ah);
        void (*restore_chainmask)(struct ath_hw *ah);
        void (*set_diversity)(struct ath_hw *ah, bool value);
        u32 (*compute_pll_control)(struct ath_hw *ah,