mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
Compare commits
2 Commits
v4.1.0
...
staging-WI
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
aa0857a4c6 | ||
|
|
ad7282f745 |
@@ -0,0 +1,53 @@
|
||||
From 375d0d25e6c02991392e44956c81cbac84909f49 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Thu, 4 Sep 2025 00:09:17 +0530
|
||||
Subject: [PATCH] wifi: ap: mitigate peer-delete WMI timeout to reduce blind
|
||||
period & prevent peer leaks
|
||||
|
||||
1. When a connected client roams to another AP, the AP is trying to delete the peer
|
||||
but for some reason the WMI command times out and while driver is waiting for
|
||||
the response, we observed that the AP doesn't respond to any frames from STA
|
||||
(probe requests, authentication etc) and once the response times out (3seconds default)
|
||||
then AP starts responding to the older requets but client has already connected to
|
||||
another AP. As the root cause for the response timing out is in the FW, we added
|
||||
a WAR to reduce the timeout to minimize this blind period, with this AP responds
|
||||
after 100ms and client connects successfully. And 100ms timeout is also reasonable
|
||||
for this internal operation.
|
||||
2. In case of peer deletion timeout, the driver peer database is not cleared, so,
|
||||
if this happens often (which it is) then eventually we hit the max peers in the
|
||||
driver and all subsequent operations fail, so, in case of timeout ignore the failure
|
||||
and proceed with driver peer database cleanup.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/peer.c | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
index 1907067..aefc6ba 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
@@ -771,7 +771,7 @@ int ath11k_wait_for_peer_delete_done(struct ath11k *ar, u32 vdev_id,
|
||||
}
|
||||
|
||||
time_left = wait_for_completion_timeout(&ar->peer_delete_done,
|
||||
- 3 * HZ);
|
||||
+ 100 * HZ / 1000);
|
||||
if (time_left == 0) {
|
||||
ath11k_warn(ar->ab, "Timeout in receiving peer delete response\n");
|
||||
return -ETIMEDOUT;
|
||||
@@ -857,7 +857,10 @@ int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr)
|
||||
}
|
||||
|
||||
ret = ath11k_wait_for_peer_delete_done(ar, vdev_id, addr);
|
||||
- if (ret)
|
||||
+ /* WAR: For the timeout case, proceed to delete the peer anyway, as FW is
|
||||
+ * still functional, without this, driver ends up hitting max peers
|
||||
+ */
|
||||
+ if (ret && ret != -ETIMEDOUT)
|
||||
return ret;
|
||||
|
||||
ATH11K_MEMORY_STATS_DEC(ar->ab, per_peer_object,
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
From a54e43285c22bcca9e4020156ccb68d7adcfce18 Mon Sep 17 00:00:00 2001
|
||||
From: Backports Generator <backports@generator.local>
|
||||
Date: Thu, 4 Sep 2025 16:32:05 -0400
|
||||
Subject: [PATCH] peer debug logs
|
||||
|
||||
Signed-off-by: Backports Generator <backports@generator.local>
|
||||
---
|
||||
drivers/net/wireless/ath/ath11k/mac.c | 4 ++++
|
||||
drivers/net/wireless/ath/ath11k/peer.c | 8 +++++++-
|
||||
2 files changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/mac.c b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
index 10925f2..6bf9c2e 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/mac.c
|
||||
@@ -5750,6 +5750,8 @@ static int ath11k_mac_op_sta_state(struct ieee80211_hw *hw,
|
||||
list_del(&peer->list);
|
||||
kfree(peer);
|
||||
ar->num_peers--;
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "%s peer deleted %pM vdev_id: %d num_peers: %d\n",
|
||||
+ __func__, sta->addr, arvif->vdev_id, ar->num_peers);
|
||||
}
|
||||
spin_unlock_bh(&ar->ab->base_lock);
|
||||
mutex_unlock(&ar->ab->tbl_mtx_lock);
|
||||
@@ -7847,6 +7849,8 @@ err_peer_del:
|
||||
goto err_keyid;
|
||||
|
||||
ar->num_peers--;
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "%s vif peer deleted %pM vdev_id: %d num_peers: %d\n",
|
||||
+ __func__, vif->addr, arvif->vdev_id, ar->num_peers);
|
||||
}
|
||||
|
||||
err_vdev_del:
|
||||
diff --git a/drivers/net/wireless/ath/ath11k/peer.c b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
index aefc6ba..72ce1ae 100644
|
||||
--- a/drivers/net/wireless/ath/ath11k/peer.c
|
||||
+++ b/drivers/net/wireless/ath/ath11k/peer.c
|
||||
@@ -744,6 +744,8 @@ void ath11k_peer_cleanup(struct ath11k *ar, u32 vdev_id)
|
||||
list_del(&peer->list);
|
||||
kfree(peer);
|
||||
ar->num_peers--;
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "%s peer cleanup %pM vdev_id: %d num_peers: %d\n",
|
||||
+ __func__, peer->addr, vdev_id, ar->num_peers);
|
||||
}
|
||||
|
||||
spin_unlock_bh(&ab->base_lock);
|
||||
@@ -868,6 +870,9 @@ int ath11k_peer_delete(struct ath11k *ar, u32 vdev_id, u8 *addr)
|
||||
|
||||
ar->num_peers--;
|
||||
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "%s peer deleted %pM vdev_id: %d num_peers: %d\n",
|
||||
+ __func__, addr, vdev_id, ar->num_peers);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -970,7 +975,8 @@ int ath11k_peer_create(struct ath11k *ar, struct ath11k_vif *arvif,
|
||||
ar->num_peers++;
|
||||
|
||||
if (ath11k_mac_sta_level_info(arvif, sta)) {
|
||||
- ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "peer created %pM\n", param->peer_addr);
|
||||
+ ath11k_dbg(ar->ab, ATH11K_DBG_PEER, "peer created %pM vdev_id: %d num_peers: %d\n",
|
||||
+ param->peer_addr, param->vdev_id, ar->num_peers);
|
||||
peer->peer_logging_enabled = true;
|
||||
}
|
||||
|
||||
--
|
||||
2.50.1
|
||||
|
||||
Reference in New Issue
Block a user