Skip to content

Commit 45d2e26

Browse files
Baochen Qiangkvalo
authored andcommitted
wifi: ath11k: Don't exit on wakeup failure
Currently, ath11k_pcic_read() returns an error if wakeup() fails, this makes firmware crash debug quite hard because we can get nothing. Change to go ahead on wakeup failure, in that case we still may get something valid to check. There should be no mislead due to incorrect content because we are aware of the failure with the log printed. Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-01720.1-QCAHSPSWPL_V1_V2_SILICONZ_LITE-1 Signed-off-by: Baochen Qiang <[email protected]> Signed-off-by: Kalle Valo <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 9ec6e20 commit 45d2e26

File tree

1 file changed

+10
-3
lines changed
  • drivers/net/wireless/ath/ath11k

1 file changed

+10
-3
lines changed

drivers/net/wireless/ath/ath11k/pcic.c

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,16 @@ int ath11k_pcic_read(struct ath11k_base *ab, void *buf, u32 start, u32 end)
218218
if (wakeup_required && ab->pci.ops->wakeup) {
219219
ret = ab->pci.ops->wakeup(ab);
220220
if (ret) {
221-
ath11k_warn(ab, "failed to wakeup for read from 0x%x: %d\n",
222-
start, ret);
223-
return ret;
221+
ath11k_warn(ab,
222+
"wakeup failed, data may be invalid: %d",
223+
ret);
224+
/* Even though wakeup() failed, continue processing rather
225+
* than returning because some parts of the data may still
226+
* be valid and useful in some cases, e.g. could give us
227+
* some clues on firmware crash.
228+
* Mislead due to invalid data could be avoided because we
229+
* are aware of the wakeup failure.
230+
*/
224231
}
225232
}
226233

0 commit comments

Comments
 (0)