mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-12-24 21:02:35 +00:00
52 lines
1.7 KiB
Diff
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;
|