]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
wifi: ath12k: Avoid napi_sync() before napi_enable()
authorAvula Sri Charan <quic_asrichar@quicinc.com>
Fri, 24 Jan 2025 09:00:58 +0000 (14:30 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:13:40 +0000 (11:13 +0200)
commitd57c3f56e8595e75119be9f2ee8beb97149c2523
tree5941f96642f8d5ef86af76e7771c33fffe611f80
parentafa8b1b234a4a76c6da700ed62055f11fb6e9d67
wifi: ath12k: Avoid napi_sync() before napi_enable()

[ Upstream commit 268c73d470a5790a492a2fc2ded084b909d144f3 ]

In case of MHI error a reset work will be queued which will try
napi_disable() after napi_synchronize().

As the napi will be only enabled after qmi_firmware_ready event,
trying napi_synchronize() before napi_enable() will result in
indefinite sleep in case of a firmware crash in QMI init sequence.

To avoid this, introduce napi_enabled flag to check if napi is enabled
or not before calling napi_synchronize().

Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1

Signed-off-by: Avula Sri Charan <quic_asrichar@quicinc.com>
Signed-off-by: Tamizh Chelvam Raja <quic_tamizhr@quicinc.com>
Reviewed-by: Aditya Kumar Singh <aditya.kumar.singh@oss.qualcomm.com>
Link: https://patch.msgid.link/20250124090058.3194299-1-quic_tamizhr@quicinc.com
Signed-off-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath12k/core.h
drivers/net/wireless/ath/ath12k/pci.c