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>
This commit is contained in:
parent
2dc3a8e0b6
commit
105ff411c9
@ -1548,6 +1548,7 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
|
|||||||
if (reg != last_val)
|
if (reg != last_val)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
udelay(1);
|
||||||
last_val = reg;
|
last_val = reg;
|
||||||
if ((reg & 0x7E7FFFEF) == 0x00702400)
|
if ((reg & 0x7E7FFFEF) == 0x00702400)
|
||||||
continue;
|
continue;
|
||||||
@ -1560,8 +1561,6 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)
|
|||||||
default:
|
default:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
udelay(1);
|
|
||||||
} while (count-- > 0);
|
} while (count-- > 0);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user