diff options
author | Felix Fietkau <nbd@openwrt.org> | 2014-03-09 04:51:16 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-03-13 14:57:26 -0400 |
commit | 105ff411c96c52c67261efbe245f0947d39ebce7 (patch) | |
tree | e8021114d31c735913e423ccdbedfd4cba54c39c /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 2dc3a8e0b6e10c77798a4f6f711ce66334eda1c4 (diff) |
ath9k_hw: fix unreachable code in baseband hang detection code
The commit "ath9k: reduce baseband hang detection false positive rate"
added a delay in the loop checking the baseband state, however it was
unreachable due to previous 'continue' statements.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 303ce27964c1..9078a6c5a74e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -1548,6 +1548,7 @@ bool ath9k_hw_check_alive(struct ath_hw *ah) | |||
1548 | if (reg != last_val) | 1548 | if (reg != last_val) |
1549 | return true; | 1549 | return true; |
1550 | 1550 | ||
1551 | udelay(1); | ||
1551 | last_val = reg; | 1552 | last_val = reg; |
1552 | if ((reg & 0x7E7FFFEF) == 0x00702400) | 1553 | if ((reg & 0x7E7FFFEF) == 0x00702400) |
1553 | continue; | 1554 | continue; |
@@ -1560,8 +1561,6 @@ bool ath9k_hw_check_alive(struct ath_hw *ah) | |||
1560 | default: | 1561 | default: |
1561 | return true; | 1562 | return true; |
1562 | } | 1563 | } |
1563 | |||
1564 | udelay(1); | ||
1565 | } while (count-- > 0); | 1564 | } while (count-- > 0); |
1566 | 1565 | ||
1567 | return false; | 1566 | return false; |