]> www.infradead.org Git - users/jedix/linux-maple.git/commit
wifi: ath12k: do not process consecutive RDDM event
authorBaochen Qiang <quic_bqiang@quicinc.com>
Wed, 29 May 2024 01:53:57 +0000 (09:53 +0800)
committerKalle Valo <quic_kvalo@quicinc.com>
Thu, 30 May 2024 15:51:27 +0000 (18:51 +0300)
commit8233d2716570b66ab45b6d24e577ee6612002dc4
tree3ec451ffcb995ac9eb35674369decfc109b119a0
parent43e934360d1d8fd3230d0c1ffa40f0d49deb4cf2
wifi: ath12k: do not process consecutive RDDM event

Currently we do reset for each RDDM event from MHI, however there are
cases, see below log, that we get two or more consecutive events, and
it is pointless to do reset for the subsequent ones. What's more, it
makes reset process more likely to fail.

[  103.289864] mhi mhi0: System error detected
[  103.289871] ath12k_pci 0000:03:00.0: mhi notify status reason MHI_CB_EE_RDDM
[  103.293144] mhi mhi0: System error detected
[  103.293150] ath12k_pci 0000:03:00.0: mhi notify status reason MHI_CB_EE_RDDM

Add a check to avoid reset again and again. This is done by tracking previous
MHI status: if we receive a new RDDM event while the previous event is
also the same, we treat it as duplicate and ignore it, because normally
we should at least receive a MHI_CB_EE_MISSION_MODE event between them.

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Baochen Qiang <quic_bqiang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240529015357.9846-1-quic_bqiang@quicinc.com
drivers/net/wireless/ath/ath12k/mhi.c
drivers/net/wireless/ath/ath12k/pci.h