linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: linux-wireless@vger.kernel.org
Cc: ath11k@lists.infradead.org
Subject: [PATCH 07/10] ath11k: update bawindow size in delba process
Date: Wed, 27 Nov 2019 14:08:57 +0000	[thread overview]
Message-ID: <0101016ead319335-51f84b3b-8c6c-41c9-a1be-18e62aead1b6-000000@us-west-2.amazonses.com> (raw)
In-Reply-To: <1574863720-25728-1-git-send-email-kvalo@codeaurora.org>

From: Venkateswara Naralasetty <vnaralas@codeaurora.org>

Currenly in delba process calling ath11k_peer_rx_tid_delete() updates
reo with desc invalid and add tid queue to the flush list. If station
send data traffic without addba req and before tid flush, hw gives
those packets as invalid desc reo error. Since we are dropping these
invalid desc packets results in traffic stall.

This patch fix this issue by updating the reo queue with bawindow size 1
instead of tid removal in delba process.

Signed-off-by: Venkateswara Naralasetty <vnaralas@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
---
 drivers/net/wireless/ath/ath11k/dp_rx.c | 28 +++++++++++++++++++---------
 1 file changed, 19 insertions(+), 9 deletions(-)

diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c
index f87bd327b082..8c21925a522a 100644
--- a/drivers/net/wireless/ath/ath11k/dp_rx.c
+++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
@@ -641,7 +641,8 @@ void ath11k_peer_rx_tid_cleanup(struct ath11k *ar, struct ath11k_peer *peer)
 static int ath11k_peer_rx_tid_reo_update(struct ath11k *ar,
 					 struct ath11k_peer *peer,
 					 struct dp_rx_tid *rx_tid,
-					 u32 ba_win_sz, u16 ssn)
+					 u32 ba_win_sz, u16 ssn,
+					 bool update_ssn)
 {
 	struct ath11k_hal_reo_cmd cmd = {0};
 	int ret;
@@ -649,10 +650,13 @@ static int ath11k_peer_rx_tid_reo_update(struct ath11k *ar,
 	cmd.addr_lo = lower_32_bits(rx_tid->paddr);
 	cmd.addr_hi = upper_32_bits(rx_tid->paddr);
 	cmd.flag = HAL_REO_CMD_FLG_NEED_STATUS;
-	cmd.upd0 = HAL_REO_CMD_UPD0_BA_WINDOW_SIZE |
-		   HAL_REO_CMD_UPD0_SSN;
+	cmd.upd0 = HAL_REO_CMD_UPD0_BA_WINDOW_SIZE;
 	cmd.ba_window_size = ba_win_sz;
-	cmd.upd2 = FIELD_PREP(HAL_REO_CMD_UPD2_SSN, ssn);
+
+	if (update_ssn) {
+		cmd.upd0 |= HAL_REO_CMD_UPD0_SSN;
+		cmd.upd2 = FIELD_PREP(HAL_REO_CMD_UPD2_SSN, ssn);
+	}
 
 	ret = ath11k_dp_tx_send_reo_cmd(ar->ab, rx_tid,
 					HAL_REO_CMD_UPDATE_RX_QUEUE, &cmd,
@@ -722,7 +726,7 @@ int ath11k_peer_rx_tid_setup(struct ath11k *ar, const u8 *peer_mac, int vdev_id,
 	if (rx_tid->active) {
 		paddr = rx_tid->paddr;
 		ret = ath11k_peer_rx_tid_reo_update(ar, peer, rx_tid,
-						    ba_win_sz, ssn);
+						    ba_win_sz, ssn, true);
 		spin_unlock_bh(&ab->base_lock);
 		if (ret) {
 			ath11k_warn(ab, "failed to update reo for rx tid %d\n", tid);
@@ -832,12 +836,18 @@ int ath11k_dp_rx_ampdu_stop(struct ath11k *ar,
 	paddr = peer->rx_tid[params->tid].paddr;
 	active = peer->rx_tid[params->tid].active;
 
-	ath11k_peer_rx_tid_delete(ar, peer, params->tid);
+	if (!active) {
+		spin_unlock_bh(&ab->base_lock);
+		return 0;
+	}
 
+	ret = ath11k_peer_rx_tid_reo_update(ar, peer, peer->rx_tid, 1, 0, false);
 	spin_unlock_bh(&ab->base_lock);
-
-	if (!active)
-		return 0;
+	if (ret) {
+		ath11k_warn(ab, "failed to update reo for rx tid %d: %d\n",
+			    params->tid, ret);
+		return ret;
+	}
 
 	ret = ath11k_wmi_peer_rx_reorder_queue_setup(ar, vdev_id,
 						     params->sta->addr, paddr,
-- 
2.7.4


  parent reply	other threads:[~2019-11-27 14:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1574863720-25728-1-git-send-email-kvalo@codeaurora.org>
2019-11-27 14:08 ` [PATCH 01/10] ath11k: tracing: fix ath11k tracing Kalle Valo
2019-11-29  7:48   ` Kalle Valo
2019-11-27 14:08 ` [PATCH 02/10] ath11k: qmi clean up ce and HTC service config update Kalle Valo
2019-11-27 14:08 ` [PATCH 04/10] ath11k: pktlog: fix sending/using the pdev id Kalle Valo
2019-11-27 14:08 ` [PATCH 03/10] ath11k: qmi clean up in ath11k_qmi_wlanfw_wlan_cfg_send() Kalle Valo
2019-11-27 14:08 ` [PATCH 05/10] ath11k: avoid burst time conversion logic Kalle Valo
2019-11-27 14:08 ` [PATCH 06/10] ath11k: avoid use_after_free in ath11k_dp_rx_msdu_coalesce API Kalle Valo
2019-11-27 14:08 ` Kalle Valo [this message]
2019-11-27 14:08 ` [PATCH 08/10] ath11k: add support for controlling tx power to a station Kalle Valo
2019-11-27 14:08 ` [PATCH 09/10] ath11k: unlock mutex during failure in qmi fw ready Kalle Valo
2019-11-27 14:09 ` [PATCH 10/10] ath11k: add necessary peer assoc params in wmi dbg Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0101016ead319335-51f84b3b-8c6c-41c9-a1be-18e62aead1b6-000000@us-west-2.amazonses.com \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).