1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 25 Jan 2017 12:58:17 +0100
3 Subject: [PATCH] ath9k_hw: check if the chip failed to wake up
5 In an RFC patch, Sven Eckelmann and Simon Wunderlich reported:
7 "QCA 802.11n chips (especially AR9330/AR9340) sometimes end up in a
8 state in which a read of AR_CFG always returns 0xdeadbeef.
9 This should not happen when when the power_mode of the device is
12 Include the check for the default register state in the existing MAC
15 Signed-off-by: Felix Fietkau <nbd@nbd.name>
18 --- a/drivers/net/wireless/ath/ath9k/hw.c
19 +++ b/drivers/net/wireless/ath/ath9k/hw.c
20 @@ -1624,6 +1624,10 @@ bool ath9k_hw_check_alive(struct ath_hw
24 + /* Check if chip failed to wake up */
25 + if (REG_READ(ah, AR_CFG) == 0xdeadbeef)
29 return !ath9k_hw_detect_mac_hang(ah);