On Thu, Jul 12, 2012 at 10:19:12PM +0200, Paul Bolle wrote:
> I again stumbled on the Kconfig symbol ATHEROS_AR231X and its macro
> CONFIG_ATHEROS_AR231X, while peeking at the tree for unrelated issues.
> Nothing seems to have changed as of v3.5-rc6. So this symbol and this
> macro appear to be just, say, markers for dead code ever since they got
> added in v2.6.38. 

Yup, and I complained about it when it went in too.  Ok, how's this?

From: Bob Copeland <m...@bobcopeland.com>
Date: Thu, 12 Jul 2012 16:27:27 -0400
Subject: [PATCH] Remove code conditional on CONFIG_ATHEROS_AR231X

Since the patch adding this landed a year and a half ago, no one has
pushed the rest of the SoC upstream.  This config option doesn't exist
in Kconfig anywhere so drop the conditional code.

Signed-off-by: Bob Copeland <m...@bobcopeland.com>
---

Ok, patch is only half-serious, but what's holding back the other code,
or at least a matching kconfig option?  I don't have the hardware so I
can't find myself worrying about it too much.

 drivers/net/wireless/ath/ath5k/ath5k.h |   27 ---------------------------
 drivers/net/wireless/ath/ath5k/base.c  |   14 --------------
 drivers/net/wireless/ath/ath5k/led.c   |    6 ------
 3 files changed, 0 insertions(+), 47 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h 
b/drivers/net/wireless/ath/ath5k/ath5k.h
index 64a453a..f7d6199 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -1644,32 +1644,6 @@ static inline struct ath_regulatory 
*ath5k_hw_regulatory(struct ath5k_hw *ah)
        return &(ath5k_hw_common(ah)->regulatory);
 }
 
-#ifdef CONFIG_ATHEROS_AR231X
-#define AR5K_AR2315_PCI_BASE   ((void __iomem *)0xb0100000)
-
-static inline void __iomem *ath5k_ahb_reg(struct ath5k_hw *ah, u16 reg)
-{
-       /* On AR2315 and AR2317 the PCI clock domain registers
-        * are outside of the WMAC register space */
-       if (unlikely((reg >= 0x4000) && (reg < 0x5000) &&
-           (ah->ah_mac_srev >= AR5K_SREV_AR2315_R6)))
-               return AR5K_AR2315_PCI_BASE + reg;
-
-       return ah->iobase + reg;
-}
-
-static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
-{
-       return ioread32(ath5k_ahb_reg(ah, reg));
-}
-
-static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
-{
-       iowrite32(val, ath5k_ahb_reg(ah, reg));
-}
-
-#else
-
 static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
 {
        return ioread32(ah->iobase + reg);
@@ -1680,7 +1654,6 @@ static inline void ath5k_hw_reg_write(struct ath5k_hw 
*ah, u32 val, u16 reg)
        iowrite32(val, ah->iobase + reg);
 }
 
-#endif
 
 static inline enum ath_bus_type ath5k_get_bus_type(struct ath5k_hw *ah)
 {
diff --git a/drivers/net/wireless/ath/ath5k/base.c 
b/drivers/net/wireless/ath/ath5k/base.c
index 8c4c040..3198e05 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -97,15 +97,6 @@ static int ath5k_reset(struct ath5k_hw *ah, struct 
ieee80211_channel *chan,
 
 /* Known SREVs */
 static const struct ath5k_srev_name srev_names[] = {
-#ifdef CONFIG_ATHEROS_AR231X
-       { "5312",       AR5K_VERSION_MAC,       AR5K_SREV_AR5312_R2 },
-       { "5312",       AR5K_VERSION_MAC,       AR5K_SREV_AR5312_R7 },
-       { "2313",       AR5K_VERSION_MAC,       AR5K_SREV_AR2313_R8 },
-       { "2315",       AR5K_VERSION_MAC,       AR5K_SREV_AR2315_R6 },
-       { "2315",       AR5K_VERSION_MAC,       AR5K_SREV_AR2315_R7 },
-       { "2317",       AR5K_VERSION_MAC,       AR5K_SREV_AR2317_R1 },
-       { "2317",       AR5K_VERSION_MAC,       AR5K_SREV_AR2317_R2 },
-#else
        { "5210",       AR5K_VERSION_MAC,       AR5K_SREV_AR5210 },
        { "5311",       AR5K_VERSION_MAC,       AR5K_SREV_AR5311 },
        { "5311A",      AR5K_VERSION_MAC,       AR5K_SREV_AR5311A },
@@ -124,7 +115,6 @@ static const struct ath5k_srev_name srev_names[] = {
        { "5418",       AR5K_VERSION_MAC,       AR5K_SREV_AR5418 },
        { "2425",       AR5K_VERSION_MAC,       AR5K_SREV_AR2425 },
        { "2417",       AR5K_VERSION_MAC,       AR5K_SREV_AR2417 },
-#endif
        { "xxxxx",      AR5K_VERSION_MAC,       AR5K_SREV_UNKNOWN },
        { "5110",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5110 },
        { "5111",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5111 },
@@ -140,10 +130,6 @@ static const struct ath5k_srev_name srev_names[] = {
        { "5413",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5413 },
        { "5424",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5424 },
        { "5133",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_5133 },
-#ifdef CONFIG_ATHEROS_AR231X
-       { "2316",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_2316 },
-       { "2317",       AR5K_VERSION_RAD,       AR5K_SREV_RAD_2317 },
-#endif
        { "xxxxx",      AR5K_VERSION_RAD,       AR5K_SREV_UNKNOWN },
 };
 
diff --git a/drivers/net/wireless/ath/ath5k/led.c 
b/drivers/net/wireless/ath/ath5k/led.c
index b9f708a..d774a7e 100644
--- a/drivers/net/wireless/ath/ath5k/led.c
+++ b/drivers/net/wireless/ath/ath5k/led.c
@@ -162,20 +162,14 @@ int __devinit ath5k_init_leds(struct ath5k_hw *ah)
 {
        int ret = 0;
        struct ieee80211_hw *hw = ah->hw;
-#ifndef CONFIG_ATHEROS_AR231X
        struct pci_dev *pdev = ah->pdev;
-#endif
        char name[ATH5K_LED_MAX_NAME_LEN + 1];
        const struct pci_device_id *match;
 
        if (!ah->pdev)
                return 0;
 
-#ifdef CONFIG_ATHEROS_AR231X
-       match = NULL;
-#else
        match = pci_match_id(&ath5k_led_devices[0], pdev);
-#endif
        if (match) {
                __set_bit(ATH_STAT_LEDSOFT, ah->status);
                ah->led_pin = ATH_PIN(match->driver_data);
-- 
1.7.2.5


-- 
Bob Copeland %% www.bobcopeland.com
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to