diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/atheros/atl1c/atl1c_main.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/Kconfig | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/Makefile | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ahb.c | 234 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/ath5k.h | 28 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/base.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath5k/led.c | 6 |
7 files changed, 295 insertions, 4 deletions
diff --git a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c index 72fb86b9aa24..c9946c6c119e 100644 --- a/drivers/net/ethernet/atheros/atl1c/atl1c_main.c +++ b/drivers/net/ethernet/atheros/atl1c/atl1c_main.c | |||
@@ -48,7 +48,7 @@ MODULE_DEVICE_TABLE(pci, atl1c_pci_tbl); | |||
48 | 48 | ||
49 | MODULE_AUTHOR("Jie Yang"); | 49 | MODULE_AUTHOR("Jie Yang"); |
50 | MODULE_AUTHOR("Qualcomm Atheros Inc., <nic-devel@qualcomm.com>"); | 50 | MODULE_AUTHOR("Qualcomm Atheros Inc., <nic-devel@qualcomm.com>"); |
51 | MODULE_DESCRIPTION("Qualcom Atheros 100/1000M Ethernet Network Driver"); | 51 | MODULE_DESCRIPTION("Qualcomm Atheros 100/1000M Ethernet Network Driver"); |
52 | MODULE_LICENSE("GPL"); | 52 | MODULE_LICENSE("GPL"); |
53 | MODULE_VERSION(ATL1C_DRV_VERSION); | 53 | MODULE_VERSION(ATL1C_DRV_VERSION); |
54 | 54 | ||
diff --git a/drivers/net/wireless/ath/ath5k/Kconfig b/drivers/net/wireless/ath/ath5k/Kconfig index 93caf8e68901..2399a3921762 100644 --- a/drivers/net/wireless/ath/ath5k/Kconfig +++ b/drivers/net/wireless/ath/ath5k/Kconfig | |||
@@ -1,12 +1,13 @@ | |||
1 | config ATH5K | 1 | config ATH5K |
2 | tristate "Atheros 5xxx wireless cards support" | 2 | tristate "Atheros 5xxx wireless cards support" |
3 | depends on PCI && MAC80211 | 3 | depends on (PCI || ATH25) && MAC80211 |
4 | select ATH_COMMON | 4 | select ATH_COMMON |
5 | select MAC80211_LEDS | 5 | select MAC80211_LEDS |
6 | select LEDS_CLASS | 6 | select LEDS_CLASS |
7 | select NEW_LEDS | 7 | select NEW_LEDS |
8 | select AVERAGE | 8 | select AVERAGE |
9 | select ATH5K_PCI | 9 | select ATH5K_AHB if ATH25 |
10 | select ATH5K_PCI if !ATH25 | ||
10 | ---help--- | 11 | ---help--- |
11 | This module adds support for wireless adapters based on | 12 | This module adds support for wireless adapters based on |
12 | Atheros 5xxx chipset. | 13 | Atheros 5xxx chipset. |
@@ -51,9 +52,16 @@ config ATH5K_TRACER | |||
51 | 52 | ||
52 | If unsure, say N. | 53 | If unsure, say N. |
53 | 54 | ||
55 | config ATH5K_AHB | ||
56 | bool "Atheros 5xxx AHB bus support" | ||
57 | depends on ATH25 | ||
58 | ---help--- | ||
59 | This adds support for WiSoC type chipsets of the 5xxx Atheros | ||
60 | family. | ||
61 | |||
54 | config ATH5K_PCI | 62 | config ATH5K_PCI |
55 | bool "Atheros 5xxx PCI bus support" | 63 | bool "Atheros 5xxx PCI bus support" |
56 | depends on PCI | 64 | depends on (!ATH25 && PCI) |
57 | ---help--- | 65 | ---help--- |
58 | This adds support for PCI type chipsets of the 5xxx Atheros | 66 | This adds support for PCI type chipsets of the 5xxx Atheros |
59 | family. | 67 | family. |
diff --git a/drivers/net/wireless/ath/ath5k/Makefile b/drivers/net/wireless/ath/ath5k/Makefile index 51e2d8668041..1b3a34f7f224 100644 --- a/drivers/net/wireless/ath/ath5k/Makefile +++ b/drivers/net/wireless/ath/ath5k/Makefile | |||
@@ -17,5 +17,6 @@ ath5k-y += ani.o | |||
17 | ath5k-y += sysfs.o | 17 | ath5k-y += sysfs.o |
18 | ath5k-y += mac80211-ops.o | 18 | ath5k-y += mac80211-ops.o |
19 | ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o | 19 | ath5k-$(CONFIG_ATH5K_DEBUG) += debug.o |
20 | ath5k-$(CONFIG_ATH5K_AHB) += ahb.o | ||
20 | ath5k-$(CONFIG_ATH5K_PCI) += pci.o | 21 | ath5k-$(CONFIG_ATH5K_PCI) += pci.o |
21 | obj-$(CONFIG_ATH5K) += ath5k.o | 22 | obj-$(CONFIG_ATH5K) += ath5k.o |
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c new file mode 100644 index 000000000000..8f387cf67340 --- /dev/null +++ b/drivers/net/wireless/ath/ath5k/ahb.c | |||
@@ -0,0 +1,234 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2008-2009 Atheros Communications Inc. | ||
3 | * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org> | ||
4 | * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org> | ||
5 | * | ||
6 | * Permission to use, copy, modify, and/or distribute this software for any | ||
7 | * purpose with or without fee is hereby granted, provided that the above | ||
8 | * copyright notice and this permission notice appear in all copies. | ||
9 | * | ||
10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
17 | */ | ||
18 | |||
19 | #include <linux/nl80211.h> | ||
20 | #include <linux/platform_device.h> | ||
21 | #include <linux/etherdevice.h> | ||
22 | #include <linux/export.h> | ||
23 | #include <ath25_platform.h> | ||
24 | #include "ath5k.h" | ||
25 | #include "debug.h" | ||
26 | #include "base.h" | ||
27 | #include "reg.h" | ||
28 | |||
29 | /* return bus cachesize in 4B word units */ | ||
30 | static void ath5k_ahb_read_cachesize(struct ath_common *common, int *csz) | ||
31 | { | ||
32 | *csz = L1_CACHE_BYTES >> 2; | ||
33 | } | ||
34 | |||
35 | static bool | ||
36 | ath5k_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data) | ||
37 | { | ||
38 | struct ath5k_hw *ah = common->priv; | ||
39 | struct platform_device *pdev = to_platform_device(ah->dev); | ||
40 | struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev); | ||
41 | u16 *eeprom, *eeprom_end; | ||
42 | |||
43 | eeprom = (u16 *) bcfg->radio; | ||
44 | eeprom_end = ((void *) bcfg->config) + BOARD_CONFIG_BUFSZ; | ||
45 | |||
46 | eeprom += off; | ||
47 | if (eeprom > eeprom_end) | ||
48 | return false; | ||
49 | |||
50 | *data = *eeprom; | ||
51 | return true; | ||
52 | } | ||
53 | |||
54 | int ath5k_hw_read_srev(struct ath5k_hw *ah) | ||
55 | { | ||
56 | struct platform_device *pdev = to_platform_device(ah->dev); | ||
57 | struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev); | ||
58 | ah->ah_mac_srev = bcfg->devid; | ||
59 | return 0; | ||
60 | } | ||
61 | |||
62 | static int ath5k_ahb_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac) | ||
63 | { | ||
64 | struct platform_device *pdev = to_platform_device(ah->dev); | ||
65 | struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev); | ||
66 | u8 *cfg_mac; | ||
67 | |||
68 | if (to_platform_device(ah->dev)->id == 0) | ||
69 | cfg_mac = bcfg->config->wlan0_mac; | ||
70 | else | ||
71 | cfg_mac = bcfg->config->wlan1_mac; | ||
72 | |||
73 | memcpy(mac, cfg_mac, ETH_ALEN); | ||
74 | return 0; | ||
75 | } | ||
76 | |||
77 | static const struct ath_bus_ops ath_ahb_bus_ops = { | ||
78 | .ath_bus_type = ATH_AHB, | ||
79 | .read_cachesize = ath5k_ahb_read_cachesize, | ||
80 | .eeprom_read = ath5k_ahb_eeprom_read, | ||
81 | .eeprom_read_mac = ath5k_ahb_eeprom_read_mac, | ||
82 | }; | ||
83 | |||
84 | /*Initialization*/ | ||
85 | static int ath_ahb_probe(struct platform_device *pdev) | ||
86 | { | ||
87 | struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev); | ||
88 | struct ath5k_hw *ah; | ||
89 | struct ieee80211_hw *hw; | ||
90 | struct resource *res; | ||
91 | void __iomem *mem; | ||
92 | int irq; | ||
93 | int ret = 0; | ||
94 | u32 reg; | ||
95 | |||
96 | if (!dev_get_platdata(&pdev->dev)) { | ||
97 | dev_err(&pdev->dev, "no platform data specified\n"); | ||
98 | ret = -EINVAL; | ||
99 | goto err_out; | ||
100 | } | ||
101 | |||
102 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
103 | if (res == NULL) { | ||
104 | dev_err(&pdev->dev, "no memory resource found\n"); | ||
105 | ret = -ENXIO; | ||
106 | goto err_out; | ||
107 | } | ||
108 | |||
109 | mem = ioremap_nocache(res->start, resource_size(res)); | ||
110 | if (mem == NULL) { | ||
111 | dev_err(&pdev->dev, "ioremap failed\n"); | ||
112 | ret = -ENOMEM; | ||
113 | goto err_out; | ||
114 | } | ||
115 | |||
116 | res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); | ||
117 | if (res == NULL) { | ||
118 | dev_err(&pdev->dev, "no IRQ resource found\n"); | ||
119 | ret = -ENXIO; | ||
120 | goto err_iounmap; | ||
121 | } | ||
122 | |||
123 | irq = res->start; | ||
124 | |||
125 | hw = ieee80211_alloc_hw(sizeof(struct ath5k_hw), &ath5k_hw_ops); | ||
126 | if (hw == NULL) { | ||
127 | dev_err(&pdev->dev, "no memory for ieee80211_hw\n"); | ||
128 | ret = -ENOMEM; | ||
129 | goto err_iounmap; | ||
130 | } | ||
131 | |||
132 | ah = hw->priv; | ||
133 | ah->hw = hw; | ||
134 | ah->dev = &pdev->dev; | ||
135 | ah->iobase = mem; | ||
136 | ah->irq = irq; | ||
137 | ah->devid = bcfg->devid; | ||
138 | |||
139 | if (bcfg->devid >= AR5K_SREV_AR2315_R6) { | ||
140 | /* Enable WMAC AHB arbitration */ | ||
141 | reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL); | ||
142 | reg |= AR5K_AR2315_AHB_ARB_CTL_WLAN; | ||
143 | iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL); | ||
144 | |||
145 | /* Enable global WMAC swapping */ | ||
146 | reg = ioread32((void __iomem *) AR5K_AR2315_BYTESWAP); | ||
147 | reg |= AR5K_AR2315_BYTESWAP_WMAC; | ||
148 | iowrite32(reg, (void __iomem *) AR5K_AR2315_BYTESWAP); | ||
149 | } else { | ||
150 | /* Enable WMAC DMA access (assuming 5312 or 231x*/ | ||
151 | /* TODO: check other platforms */ | ||
152 | reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE); | ||
153 | if (to_platform_device(ah->dev)->id == 0) | ||
154 | reg |= AR5K_AR5312_ENABLE_WLAN0; | ||
155 | else | ||
156 | reg |= AR5K_AR5312_ENABLE_WLAN1; | ||
157 | iowrite32(reg, (void __iomem *) AR5K_AR5312_ENABLE); | ||
158 | |||
159 | /* | ||
160 | * On a dual-band AR5312, the multiband radio is only | ||
161 | * used as pass-through. Disable 2 GHz support in the | ||
162 | * driver for it | ||
163 | */ | ||
164 | if (to_platform_device(ah->dev)->id == 0 && | ||
165 | (bcfg->config->flags & (BD_WLAN0 | BD_WLAN1)) == | ||
166 | (BD_WLAN1 | BD_WLAN0)) | ||
167 | ah->ah_capabilities.cap_needs_2GHz_ovr = true; | ||
168 | else | ||
169 | ah->ah_capabilities.cap_needs_2GHz_ovr = false; | ||
170 | } | ||
171 | |||
172 | ret = ath5k_init_ah(ah, &ath_ahb_bus_ops); | ||
173 | if (ret != 0) { | ||
174 | dev_err(&pdev->dev, "failed to attach device, err=%d\n", ret); | ||
175 | ret = -ENODEV; | ||
176 | goto err_free_hw; | ||
177 | } | ||
178 | |||
179 | platform_set_drvdata(pdev, hw); | ||
180 | |||
181 | return 0; | ||
182 | |||
183 | err_free_hw: | ||
184 | ieee80211_free_hw(hw); | ||
185 | err_iounmap: | ||
186 | iounmap(mem); | ||
187 | err_out: | ||
188 | return ret; | ||
189 | } | ||
190 | |||
191 | static int ath_ahb_remove(struct platform_device *pdev) | ||
192 | { | ||
193 | struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev); | ||
194 | struct ieee80211_hw *hw = platform_get_drvdata(pdev); | ||
195 | struct ath5k_hw *ah; | ||
196 | u32 reg; | ||
197 | |||
198 | if (!hw) | ||
199 | return 0; | ||
200 | |||
201 | ah = hw->priv; | ||
202 | |||
203 | if (bcfg->devid >= AR5K_SREV_AR2315_R6) { | ||
204 | /* Disable WMAC AHB arbitration */ | ||
205 | reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL); | ||
206 | reg &= ~AR5K_AR2315_AHB_ARB_CTL_WLAN; | ||
207 | iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL); | ||
208 | } else { | ||
209 | /*Stop DMA access */ | ||
210 | reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE); | ||
211 | if (to_platform_device(ah->dev)->id == 0) | ||
212 | reg &= ~AR5K_AR5312_ENABLE_WLAN0; | ||
213 | else | ||
214 | reg &= ~AR5K_AR5312_ENABLE_WLAN1; | ||
215 | iowrite32(reg, (void __iomem *) AR5K_AR5312_ENABLE); | ||
216 | } | ||
217 | |||
218 | ath5k_deinit_ah(ah); | ||
219 | iounmap(ah->iobase); | ||
220 | ieee80211_free_hw(hw); | ||
221 | |||
222 | return 0; | ||
223 | } | ||
224 | |||
225 | static struct platform_driver ath_ahb_driver = { | ||
226 | .probe = ath_ahb_probe, | ||
227 | .remove = ath_ahb_remove, | ||
228 | .driver = { | ||
229 | .name = "ar231x-wmac", | ||
230 | .owner = THIS_MODULE, | ||
231 | }, | ||
232 | }; | ||
233 | |||
234 | module_platform_driver(ath_ahb_driver); | ||
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h index ed2468220216..1ed7a88aeea9 100644 --- a/drivers/net/wireless/ath/ath5k/ath5k.h +++ b/drivers/net/wireless/ath/ath5k/ath5k.h | |||
@@ -1647,6 +1647,32 @@ static inline struct ath_regulatory *ath5k_hw_regulatory(struct ath5k_hw *ah) | |||
1647 | return &(ath5k_hw_common(ah)->regulatory); | 1647 | return &(ath5k_hw_common(ah)->regulatory); |
1648 | } | 1648 | } |
1649 | 1649 | ||
1650 | #ifdef CONFIG_ATH5K_AHB | ||
1651 | #define AR5K_AR2315_PCI_BASE ((void __iomem *)0xb0100000) | ||
1652 | |||
1653 | static inline void __iomem *ath5k_ahb_reg(struct ath5k_hw *ah, u16 reg) | ||
1654 | { | ||
1655 | /* On AR2315 and AR2317 the PCI clock domain registers | ||
1656 | * are outside of the WMAC register space */ | ||
1657 | if (unlikely((reg >= 0x4000) && (reg < 0x5000) && | ||
1658 | (ah->ah_mac_srev >= AR5K_SREV_AR2315_R6))) | ||
1659 | return AR5K_AR2315_PCI_BASE + reg; | ||
1660 | |||
1661 | return ah->iobase + reg; | ||
1662 | } | ||
1663 | |||
1664 | static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg) | ||
1665 | { | ||
1666 | return ioread32(ath5k_ahb_reg(ah, reg)); | ||
1667 | } | ||
1668 | |||
1669 | static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg) | ||
1670 | { | ||
1671 | iowrite32(val, ath5k_ahb_reg(ah, reg)); | ||
1672 | } | ||
1673 | |||
1674 | #else | ||
1675 | |||
1650 | static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg) | 1676 | static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg) |
1651 | { | 1677 | { |
1652 | return ioread32(ah->iobase + reg); | 1678 | return ioread32(ah->iobase + reg); |
@@ -1657,6 +1683,8 @@ static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg) | |||
1657 | iowrite32(val, ah->iobase + reg); | 1683 | iowrite32(val, ah->iobase + reg); |
1658 | } | 1684 | } |
1659 | 1685 | ||
1686 | #endif | ||
1687 | |||
1660 | static inline enum ath_bus_type ath5k_get_bus_type(struct ath5k_hw *ah) | 1688 | static inline enum ath_bus_type ath5k_get_bus_type(struct ath5k_hw *ah) |
1661 | { | 1689 | { |
1662 | return ath5k_hw_common(ah)->bus_ops->ath_bus_type; | 1690 | return ath5k_hw_common(ah)->bus_ops->ath_bus_type; |
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c index a4a09bb8f2f3..bc9cb356fa69 100644 --- a/drivers/net/wireless/ath/ath5k/base.c +++ b/drivers/net/wireless/ath/ath5k/base.c | |||
@@ -99,6 +99,15 @@ static int ath5k_reset(struct ath5k_hw *ah, struct ieee80211_channel *chan, | |||
99 | 99 | ||
100 | /* Known SREVs */ | 100 | /* Known SREVs */ |
101 | static const struct ath5k_srev_name srev_names[] = { | 101 | static const struct ath5k_srev_name srev_names[] = { |
102 | #ifdef CONFIG_ATH5K_AHB | ||
103 | { "5312", AR5K_VERSION_MAC, AR5K_SREV_AR5312_R2 }, | ||
104 | { "5312", AR5K_VERSION_MAC, AR5K_SREV_AR5312_R7 }, | ||
105 | { "2313", AR5K_VERSION_MAC, AR5K_SREV_AR2313_R8 }, | ||
106 | { "2315", AR5K_VERSION_MAC, AR5K_SREV_AR2315_R6 }, | ||
107 | { "2315", AR5K_VERSION_MAC, AR5K_SREV_AR2315_R7 }, | ||
108 | { "2317", AR5K_VERSION_MAC, AR5K_SREV_AR2317_R1 }, | ||
109 | { "2317", AR5K_VERSION_MAC, AR5K_SREV_AR2317_R2 }, | ||
110 | #else | ||
102 | { "5210", AR5K_VERSION_MAC, AR5K_SREV_AR5210 }, | 111 | { "5210", AR5K_VERSION_MAC, AR5K_SREV_AR5210 }, |
103 | { "5311", AR5K_VERSION_MAC, AR5K_SREV_AR5311 }, | 112 | { "5311", AR5K_VERSION_MAC, AR5K_SREV_AR5311 }, |
104 | { "5311A", AR5K_VERSION_MAC, AR5K_SREV_AR5311A }, | 113 | { "5311A", AR5K_VERSION_MAC, AR5K_SREV_AR5311A }, |
@@ -117,6 +126,7 @@ static const struct ath5k_srev_name srev_names[] = { | |||
117 | { "5418", AR5K_VERSION_MAC, AR5K_SREV_AR5418 }, | 126 | { "5418", AR5K_VERSION_MAC, AR5K_SREV_AR5418 }, |
118 | { "2425", AR5K_VERSION_MAC, AR5K_SREV_AR2425 }, | 127 | { "2425", AR5K_VERSION_MAC, AR5K_SREV_AR2425 }, |
119 | { "2417", AR5K_VERSION_MAC, AR5K_SREV_AR2417 }, | 128 | { "2417", AR5K_VERSION_MAC, AR5K_SREV_AR2417 }, |
129 | #endif | ||
120 | { "xxxxx", AR5K_VERSION_MAC, AR5K_SREV_UNKNOWN }, | 130 | { "xxxxx", AR5K_VERSION_MAC, AR5K_SREV_UNKNOWN }, |
121 | { "5110", AR5K_VERSION_RAD, AR5K_SREV_RAD_5110 }, | 131 | { "5110", AR5K_VERSION_RAD, AR5K_SREV_RAD_5110 }, |
122 | { "5111", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111 }, | 132 | { "5111", AR5K_VERSION_RAD, AR5K_SREV_RAD_5111 }, |
@@ -132,6 +142,10 @@ static const struct ath5k_srev_name srev_names[] = { | |||
132 | { "5413", AR5K_VERSION_RAD, AR5K_SREV_RAD_5413 }, | 142 | { "5413", AR5K_VERSION_RAD, AR5K_SREV_RAD_5413 }, |
133 | { "5424", AR5K_VERSION_RAD, AR5K_SREV_RAD_5424 }, | 143 | { "5424", AR5K_VERSION_RAD, AR5K_SREV_RAD_5424 }, |
134 | { "5133", AR5K_VERSION_RAD, AR5K_SREV_RAD_5133 }, | 144 | { "5133", AR5K_VERSION_RAD, AR5K_SREV_RAD_5133 }, |
145 | #ifdef CONFIG_ATH5K_AHB | ||
146 | { "2316", AR5K_VERSION_RAD, AR5K_SREV_RAD_2316 }, | ||
147 | { "2317", AR5K_VERSION_RAD, AR5K_SREV_RAD_2317 }, | ||
148 | #endif | ||
135 | { "xxxxx", AR5K_VERSION_RAD, AR5K_SREV_UNKNOWN }, | 149 | { "xxxxx", AR5K_VERSION_RAD, AR5K_SREV_UNKNOWN }, |
136 | }; | 150 | }; |
137 | 151 | ||
diff --git a/drivers/net/wireless/ath/ath5k/led.c b/drivers/net/wireless/ath/ath5k/led.c index 0beb7e7d6075..ca4b7ccd697f 100644 --- a/drivers/net/wireless/ath/ath5k/led.c +++ b/drivers/net/wireless/ath/ath5k/led.c | |||
@@ -163,14 +163,20 @@ int ath5k_init_leds(struct ath5k_hw *ah) | |||
163 | { | 163 | { |
164 | int ret = 0; | 164 | int ret = 0; |
165 | struct ieee80211_hw *hw = ah->hw; | 165 | struct ieee80211_hw *hw = ah->hw; |
166 | #ifndef CONFIG_ATH5K_AHB | ||
166 | struct pci_dev *pdev = ah->pdev; | 167 | struct pci_dev *pdev = ah->pdev; |
168 | #endif | ||
167 | char name[ATH5K_LED_MAX_NAME_LEN + 1]; | 169 | char name[ATH5K_LED_MAX_NAME_LEN + 1]; |
168 | const struct pci_device_id *match; | 170 | const struct pci_device_id *match; |
169 | 171 | ||
170 | if (!ah->pdev) | 172 | if (!ah->pdev) |
171 | return 0; | 173 | return 0; |
172 | 174 | ||
175 | #ifdef CONFIG_ATH5K_AHB | ||
176 | match = NULL; | ||
177 | #else | ||
173 | match = pci_match_id(&ath5k_led_devices[0], pdev); | 178 | match = pci_match_id(&ath5k_led_devices[0], pdev); |
179 | #endif | ||
174 | if (match) { | 180 | if (match) { |
175 | __set_bit(ATH_STAT_LEDSOFT, ah->status); | 181 | __set_bit(ATH_STAT_LEDSOFT, ah->status); |
176 | ah->led_pin = ATH_PIN(match->driver_data); | 182 | ah->led_pin = ATH_PIN(match->driver_data); |