aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/base.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2010-12-02 04:27:21 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-12-02 15:17:51 -0500
commit4cebb34caa5122216a1e2451eae9e0fc47ec2589 (patch)
tree7a4281d259e127270d0a68d0aa8a9a178e897781 /drivers/net/wireless/ath/ath5k/base.c
parenta0b907ee2a71052fefdf6151764095f3f97b3275 (diff)
ath5k: Fix reset and interrupts for AHB type of devices.
On WiSoc we cannot access mac register before it is resetted. It will crash hardware otherwise. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@neratec.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 685de2d7572..0a7071a6dd7 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -2148,7 +2148,8 @@ ath5k_intr(int irq, void *dev_id)
2148 unsigned int counter = 1000; 2148 unsigned int counter = 1000;
2149 2149
2150 if (unlikely(test_bit(ATH_STAT_INVALID, sc->status) || 2150 if (unlikely(test_bit(ATH_STAT_INVALID, sc->status) ||
2151 !ath5k_hw_is_intr_pending(ah))) 2151 ((ath5k_get_bus_type(ah) != ATH_AHB) &&
2152 !ath5k_hw_is_intr_pending(ah))))
2152 return IRQ_NONE; 2153 return IRQ_NONE;
2153 2154
2154 do { 2155 do {
@@ -2214,6 +2215,10 @@ ath5k_intr(int irq, void *dev_id)
2214 tasklet_schedule(&sc->rf_kill.toggleq); 2215 tasklet_schedule(&sc->rf_kill.toggleq);
2215 2216
2216 } 2217 }
2218
2219 if (ath5k_get_bus_type(ah) == ATH_AHB)
2220 break;
2221
2217 } while (ath5k_hw_is_intr_pending(ah) && --counter > 0); 2222 } while (ath5k_hw_is_intr_pending(ah) && --counter > 0);
2218 2223
2219 if (unlikely(!counter)) 2224 if (unlikely(!counter))