aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/hw.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2014-03-04 13:05:12 -0500
committerJohn W. Linville <linville@tuxdriver.com>2014-03-04 13:05:12 -0500
commitf3b6a488a670f1be2666ab97e31dcfc0b1648884 (patch)
treed8d2431f21d4371c907dec075926e86840e86d1e /drivers/net/wireless/ath/ath9k/hw.c
parentc14c5d99a453af6b86f15aca8fe9005b2b8f3b26 (diff)
parentadb07df1e039e9fe43e66aeea8b4771f83659dbb (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/ath/ath9k/recv.c drivers/net/wireless/mwifiex/pcie.c
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 5db01b4212c8..2509c2ff0828 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1533,7 +1533,7 @@ EXPORT_SYMBOL(ath9k_hw_check_nav);
1533bool ath9k_hw_check_alive(struct ath_hw *ah) 1533bool ath9k_hw_check_alive(struct ath_hw *ah)
1534{ 1534{
1535 int count = 50; 1535 int count = 50;
1536 u32 reg; 1536 u32 reg, last_val;
1537 1537
1538 if (AR_SREV_9300(ah)) 1538 if (AR_SREV_9300(ah))
1539 return !ath9k_hw_detect_mac_hang(ah); 1539 return !ath9k_hw_detect_mac_hang(ah);
@@ -1541,9 +1541,13 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
1541 if (AR_SREV_9285_12_OR_LATER(ah)) 1541 if (AR_SREV_9285_12_OR_LATER(ah))
1542 return true; 1542 return true;
1543 1543
1544 last_val = REG_READ(ah, AR_OBS_BUS_1);
1544 do { 1545 do {
1545 reg = REG_READ(ah, AR_OBS_BUS_1); 1546 reg = REG_READ(ah, AR_OBS_BUS_1);
1547 if (reg != last_val)
1548 return true;
1546 1549
1550 last_val = reg;
1547 if ((reg & 0x7E7FFFEF) == 0x00702400) 1551 if ((reg & 0x7E7FFFEF) == 0x00702400)
1548 continue; 1552 continue;
1549 1553
@@ -1555,6 +1559,8 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
1555 default: 1559 default:
1556 return true; 1560 return true;
1557 } 1561 }
1562
1563 udelay(1);
1558 } while (count-- > 0); 1564 } while (count-- > 0);
1559 1565
1560 return false; 1566 return false;