]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: ath12k: avoid duplicated vdev stop
authorKang Yang <quic_kangyang@quicinc.com>
Mon, 29 Apr 2024 08:15:22 +0000 (16:15 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 3 Aug 2024 06:59:31 +0000 (08:59 +0200)
[ Upstream commit 3b0989e925f38df733a03ff5a320d6841006b3f9 ]

ath12k_mac_op_unassign_vif_chanctx() will do vdev stop in
ath12k_mac_monitor_stop(). This ath12k_mac_vdev_stop() will do vdev stop
again, then might trigger firmware crash.

So add judgement to avoid duplicated vdev stop.

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

Fixes: c9e4e41e71ff ("wifi: ath12k: move peer delete after vdev stop of station for WCN7850")
Signed-off-by: Kang Yang <quic_kangyang@quicinc.com>
Acked-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/20240429081525.983-3-quic_kangyang@quicinc.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath12k/mac.c

index 805cb084484a4f6acfccc4faab6c54592b504d8d..b3530d1dd728b73f93d1997b818b4c4584f0333d 100644 (file)
@@ -7386,7 +7386,8 @@ ath12k_mac_op_unassign_vif_chanctx(struct ieee80211_hw *hw,
                arvif->is_started = false;
        }
 
-       if (arvif->vdev_type != WMI_VDEV_TYPE_STA) {
+       if (arvif->vdev_type != WMI_VDEV_TYPE_STA &&
+           arvif->vdev_type != WMI_VDEV_TYPE_MONITOR) {
                ath12k_bss_disassoc(ar, arvif);
                ret = ath12k_mac_vdev_stop(arvif);
                if (ret)