openwrt-ipq-breeze303/package/kernel/mac80211/patches/nss/ath11k/453-ath11k-flush-management-frames-to-firmware-before-wa.patch
Sean Khan 6590c095a7 ath11k_nss: Refresh patches for backports 6.11.2
Signed-off-by: Sean Khan <datapronix@protonmail.com>
2024-10-12 00:24:14 -04:00

39 lines
1.3 KiB
Diff

From 76482cd32e1053ef6437015d9418636616931213 Mon Sep 17 00:00:00 2001
From: Hari Chandrakanthan <quic_haric@quicinc.com>
Date: Thu, 22 Jun 2023 00:45:47 +0530
Subject: [PATCH] ath11k : flush management frames to firmware before waiting
for tx completion
warning print "ath11k c000000.wifi: failed to flush mgmt transmit queue 0"
is observed during interface down.
The management packets are queued in a skb_queue and the skb_queue
is dequeued in the work ar->wmi_mgmt_tx_work.
In ath11k_mac_flush_tx_complete, before waiting for the tx completion of
all the management frames, we are not ensuring that queued
management frames are flushed to the firmware.
This causes ar->num_pending_mgmt_tx to be positive and it leads to the
warning print.
Fix this by flushing all the management frames to firmware before waiting
for the tx completion.
Signed-off-by: Hari Chandrakanthan <quic_haric@quicinc.com>
---
drivers/net/wireless/ath/ath11k/mac.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/wireless/ath/ath11k/mac.c
+++ b/drivers/net/wireless/ath/ath11k/mac.c
@@ -8700,6 +8700,8 @@ static int ath11k_mac_flush_tx_complete(
ret = -ETIMEDOUT;
}
+ flush_work(&ar->wmi_mgmt_tx_work);
+
time_left = wait_event_timeout(ar->txmgmt_empty_waitq,
(atomic_read(&ar->num_pending_mgmt_tx) == 0),
ATH11K_FLUSH_TIMEOUT);