wlan-ap-Telecominfraproject/feeds/ipq95xx/mac80211/patches/qca/720-ath12k-add-mac-address-for-monitor-mode-vdev.patch
John Crispin 144c5d00f4 ipq95xx/mac80211: update to ATH12.3-CS
Signed-off-by: John Crispin <john@phrozen.org>
2024-02-28 18:56:21 +01:00

65 lines
2.5 KiB
Diff

From 5eaac5d27f7448eb05d36fe900850182b334ecd9 Mon Sep 17 00:00:00 2001
From: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
Date: Fri, 17 Mar 2023 13:30:36 +0530
Subject: [PATCH] ath12k: add mac address for monitor mode vdev
Fix below firmware assertion
[ 633.757080] QC Image Version: QC_IMAGE_VERSION_STRING=WLAN.WBE.1.1-01766-QCAHKSWPL_SILICONZ-1
[ 633.757080] Image Variant : IMAGE_VARIANT_STRING=9224.wlanfw.eval_v2Q
[ 633.757080] Oem Image Version: OEM_IMAGE_VERSION_STRING=CRM
[ 633.757080] Oem Image UUID: OEM_IMAGE_UUID_STRING=Q_SENTINEL_{7B924967-D38F-4ACC-9145-3083E0338DB6}_20230214_215848
[ 633.757080]
[ 633.757080] wlan_peer.c:567 Assertion !((!node_addr[0]) && (!node_addr[1]) && (!node_addr[2]) && (!node_addparam0 :zero, param1 :zero, param2 :zero.
[ 633.757080] Thread ID : 0x0000001c Thread name : WLAN RT0 Process ID : 255
[ 633.757080] Register:
[ 633.757080] SP : 0x01658d78
[ 633.757080] FP : 0x01658d80
[ 633.757080] PC : 0x0122fe5c
[ 633.757080] SSR : 0x00000008
[ 633.757080] BADVA : 0x0207f1d8
[ 633.757080] LR : 0x0122ff04
[ 633.757080]
[ 633.757080] Stack Dump
[ 633.757080] from : 0x01658d78
[ 633.757080] to : 0x01659398
Currently firmware expects non-null vdev mac address, so fill monitor
vdev address with radio mac address.
Signed-off-by: Karthikeyan Kathirvel <quic_kathirve@quicinc.com>
---
drivers/net/wireless/ath/ath12k/mac.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath12k/mac.c
+++ b/drivers/net/wireless/ath/ath12k/mac.c
@@ -1181,7 +1181,6 @@ static int ath12k_mac_monitor_vdev_creat
struct ath12k_pdev *pdev = ar->pdev;
struct vdev_create_params param;
int bit, ret = 0;
- u8 tmp_addr[6] = {0};
u16 nss = 0;
lockdep_assert_held(&ar->conf_mutex);
@@ -1216,7 +1215,7 @@ static int ath12k_mac_monitor_vdev_creat
param.chains[NL80211_BAND_5GHZ].rx = ar->num_rx_chains;
}
- ret = ath12k_wmi_vdev_create(ar, tmp_addr, &param);
+ ret = ath12k_wmi_vdev_create(ar, ar->mac_addr, &param);
if (ret) {
ath12k_warn(ar->ab, "failed to request monitor vdev %i creation: %d\n",
ar->monitor_vdev_id, ret);
@@ -9389,7 +9388,9 @@ static int ath12k_mac_vdev_create(struct
goto err;
}
- ret = ath12k_wmi_vdev_create(ar, link_addr, &vdev_param);
+ ret = ath12k_wmi_vdev_create(ar, vdev_param.type == WMI_VDEV_TYPE_MONITOR ?
+ ar->mac_addr : link_addr,
+ &vdev_param);
if (ret) {
ath12k_warn(ab, "failed to create WMI vdev %d: %d\n",
arvif->vdev_id, ret);