wlan-ap-Telecominfraproject/feeds/wifi-ax/mac80211/patches/qca/211-ath11k-Resolve-firmware-crash-on-monitor-delete.patch
John Crispin 54939fdb0f mac80211-ax: update to ath11k-ed2 release
Signed-off-by: John Crispin <john@phrozen.org>
2020-12-02 09:48:18 +01:00

52 lines
1.7 KiB
Diff

From 3f4b7a9f1318050ae4022701050d6be3abd1632c Mon Sep 17 00:00:00 2001
From: Aloka Dixit <alokad@codeaurora.org>
Date: Mon, 28 Sep 2020 11:43:42 -0700
Subject: [PATCH] ath11k: Resolve firmware crash on monitor delete
Monitor interface is not added in pdev->ar->arvifs list during creation.
When this interface is deleted, ath11k_mac_get_ar_from_arvif_list()
returns NULL hence complete() is not called.
This results in timeout ath11k_mac_monitor_vdev_delete() which returns
without resetting monitor related context.
When multiple VAPs are added on same radio, same monitor interface gets
deleted twice through ath11k_mac_op_remove_interface() resulting in
firmware crash.
Signed-off-by: Aloka Dixit <alokad@codeaurora.org>
---
drivers/net/wireless/ath/ath11k/mac.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -574,6 +574,9 @@ struct ath11k *ath11k_mac_get_ar_from_ar
if (pdev && pdev->ar) {
ar = pdev->ar;
+ if (ar->monitor_vdev_id == vdev_id)
+ return ar;
+
spin_lock_bh(&ar->data_lock);
list_for_each_entry(arvif, &ar->arvifs, list) {
if (arvif->vdev_id == vdev_id) {
@@ -5927,6 +5930,7 @@ static void ath11k_mac_op_remove_interfa
vif->addr, arvif->vdev_id);
if (arvif->vdev_type == WMI_VDEV_TYPE_MONITOR) {
+ ar->monitor_vdev_id = -1;
ar->monitor_vdev_created = false;
}
else if (ar->monitor_vdev_created && !ar->monitor_started)
--- a/drivers/net/wireless/ath/ath11k/wmi.h
+++ b/drivers/net/wireless/ath/ath11k/wmi.h
@@ -2664,7 +2664,7 @@ struct wmi_ssid {
u32 ssid[8];
} __packed;
-#define ATH11K_VDEV_SETUP_TIMEOUT_HZ (1 * HZ)
+#define ATH11K_VDEV_SETUP_TIMEOUT_HZ (3 * HZ)
struct wmi_vdev_start_request_cmd {
u32 tlv_header;