ath11k_nss: fix peer ast not found warnings

Race condition with the way NSS manages peers causing
`peer ast idx xxx can't be found`.

Only display that warning when NSS is disabled.

Signed-off-by: Sean Khan <datapronix@protonmail.com>
This commit is contained in:
Sean Khan 2024-09-27 12:58:44 -04:00
parent d301db5e82
commit ce537561ee

View File

@ -0,0 +1,27 @@
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -3402,7 +3402,7 @@ static void ath11k_dp_rx_process_receive
while ((msdu = __skb_dequeue(msdu_list))) {
rxcb = ATH11K_SKB_RXCB(msdu);
- /* Enable fast rx by default, the value will cahnge based on peer cap
+ /* Enable fast rx by default, the value will change based on peer cap
* and packet type */
fast_rx = true;
rxcb->napi = napi;
@@ -3755,13 +3755,13 @@ static void ath11k_dp_rx_update_user_sta
peer = ath11k_peer_find_by_ast(ar, user_stats->ast_index);
- if (peer == NULL) {
+ if (!peer && !ar->ab->nss.enabled) {
ath11k_warn(ar->ab, "peer ast idx %d can't be found\n",
user_stats->ast_index);
return;
}
- arsta = (struct ath11k_sta *)peer->sta->drv_priv;
+ arsta = ath11k_sta_to_arsta(peer->sta);
rx_stats = arsta->rx_stats;
if (ar->ab->nss.enabled)