fbcbdfff712fc6f8c349c44b70edf836f4521cd5
[openwrt/staging/wigyori.git] / package / kernel / mac80211 / patches / ath11k / 0064-wifi-ath11k-add-peer-mac-information-in-failure-case.patch
1 From 20487cc3ff36bbfa9505f0a078ba98f09abfc717 Mon Sep 17 00:00:00 2001
2 From: Harshitha Prem <quic_hprem@quicinc.com>
3 Date: Mon, 17 Apr 2023 13:35:01 +0300
4 Subject: [PATCH] wifi: ath11k: add peer mac information in failure cases
5
6 During reo command failure, the peer mac detail for which the reo
7 command was not successful is unknown. Hence, to improve the
8 debuggability, add the peer mac information in the failure cases
9 which would be useful during multi client cases.
10
11 Tested-on: QCN9074 hw1.0 PCI WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
12 Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.7.0.1-01744-QCAHKSWPL_SILICONZ-1
13
14 Signed-off-by: Sathishkumar Muruganandam <quic_murugana@quicinc.com>
15 Signed-off-by: Harshitha Prem <quic_hprem@quicinc.com>
16 Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
17 Link: https://lore.kernel.org/r/20230403182420.23375-4-quic_hprem@quicinc.com
18 ---
19 drivers/net/wireless/ath/ath11k/dp_rx.c | 16 ++++++++++------
20 1 file changed, 10 insertions(+), 6 deletions(-)
21
22 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
23 +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
24 @@ -1009,7 +1009,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
25
26 peer = ath11k_peer_find(ab, vdev_id, peer_mac);
27 if (!peer) {
28 - ath11k_warn(ab, "failed to find the peer to set up rx tid\n");
29 + ath11k_warn(ab, "failed to find the peer %pM to set up rx tid\n",
30 + peer_mac);
31 spin_unlock_bh(&ab->base_lock);
32 return -ENOENT;
33 }
34 @@ -1022,7 +1023,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
35 ba_win_sz, ssn, true);
36 spin_unlock_bh(&ab->base_lock);
37 if (ret) {
38 - ath11k_warn(ab, "failed to update reo for rx tid %d\n", tid);
39 + ath11k_warn(ab, "failed to update reo for peer %pM rx tid %d\n: %d",
40 + peer_mac, tid, ret);
41 return ret;
42 }
43
44 @@ -1030,8 +1032,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
45 peer_mac, paddr,
46 tid, 1, ba_win_sz);
47 if (ret)
48 - ath11k_warn(ab, "failed to send wmi command to update rx reorder queue, tid :%d (%d)\n",
49 - tid, ret);
50 + ath11k_warn(ab, "failed to send wmi rx reorder queue for peer %pM tid %d: %d\n",
51 + peer_mac, tid, ret);
52 return ret;
53 }
54
55 @@ -1064,6 +1066,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
56 ret = dma_mapping_error(ab->dev, paddr);
57 if (ret) {
58 spin_unlock_bh(&ab->base_lock);
59 + ath11k_warn(ab, "failed to setup dma map for peer %pM rx tid %d: %d\n",
60 + peer_mac, tid, ret);
61 goto err_mem_free;
62 }
63
64 @@ -1077,8 +1081,8 @@ int ath11k_peer_rx_tid_setup(struct ath1
65 ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id, peer_mac,
66 paddr, tid, 1, ba_win_sz);
67 if (ret) {
68 - ath11k_warn(ar->ab, "failed to setup rx reorder queue, tid :%d (%d)\n",
69 - tid, ret);
70 + ath11k_warn(ar->ab, "failed to setup rx reorder queue for peer %pM tid %d: %d\n",
71 + peer_mac, tid, ret);
72 ath11k_dp_rx_tid_mem_free(ab, peer_mac, vdev_id, tid);
73 }
74