From patchwork Thu Oct 31 05:35:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Venkateswara Naralasetty X-Patchwork-Id: 11220623 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 02A801390 for ; Thu, 31 Oct 2019 05:36:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D41722067D for ; Thu, 31 Oct 2019 05:36:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="Xc/3/hZY" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D41722067D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=bCI1tqmsOM1dMbC1ElvJCHtd3V3DEbXxbj3Bl3y+LLg=; b=Xc/ 3/hZYbD5rlGpfnQnMVuKo/ipnwqns7PeImQTXxdA9EZp5MqIJxkYwJCav/OcVNEgI3+TCfv+KHHaq Xy5yt1d+GUhoElw4VdREDb9PqvBpU5dPByDSchKCzuGLUaxGDJmTp8VUBekPZ+hLwg8HdlphJBOm6 2cOw3JBYYXe7oia3N5Te+HC9a+n9e9JM4Kuz6GfPGPRYrsmlxNmviTYe8RDbaeJxbF8sfD2DIJBf1 wCj6y8nO65UxoI2BQvyWfmXTov6PqjwCrLeDSse4nagAU1mDs3ZyV0IXETI4KErxhdClFZWr2FPws hWymJ6GXOMYir87YE61xRCN5Ke1awcg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQ37o-0006Eb-Ij; Thu, 31 Oct 2019 05:36:00 +0000 Received: from alexa-out-blr-02.qualcomm.com ([103.229.18.198]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iQ37l-0006E8-EI for ath11k@lists.infradead.org; Thu, 31 Oct 2019 05:35:59 +0000 Received: from ironmsg02-blr.qualcomm.com ([10.86.208.131]) by alexa-out-blr-02.qualcomm.com with ESMTP/TLS/AES256-SHA; 31 Oct 2019 11:05:53 +0530 IronPort-SDR: 0pS3Q7f/pfxf2XN+G/+utvRF45L4lbCVwyjVKyvb9L+qKjDoFSVTi/FmTBaLGi6B+84JhM66Sl rfzdnXwDdPk4xdx5rXXQJDhvAQv+qdHN0o9XoGqDJQ8d7GJrhXZQcgG6TA6OGMH21cTSXbDf6N PX2Lzl5iIo/tFAXUT8XG2i0pZRFtZbp1GLfeiwylM8EADmggkcb1iAb8Zhr0JIj+xregbRPpI9 jxMXtGUwmPmFJ2Md7EbHCygQWcIBEf6iZLsdFBBpVWgarl722s95Lx2+DUYC1gc4I0Cq/3LG5R dAqslceU9Pn6xZXCXM8Tbz+E Received: from vnaralas-linux.qualcomm.com ([10.201.26.231]) by ironmsg02-blr.qualcomm.com with ESMTP; 31 Oct 2019 11:05:53 +0530 Received: by vnaralas-linux.qualcomm.com (Postfix, from userid 443942) id A8ECC2D60; Thu, 31 Oct 2019 11:05:51 +0530 (IST) From: Venkateswara Naralasetty To: ath11k@lists.infradead.org Subject: [PATCH] ath11k: update bawindow size in delba process Date: Thu, 31 Oct 2019 11:05:50 +0530 Message-Id: <1572500150-13044-1-git-send-email-vnaralas@codeaurora.org> X-Mailer: git-send-email 2.7.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191030_223558_252724_EE8354A0 X-CRM114-Status: UNSURE ( 9.47 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.2 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.2 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Venkateswara Naralasetty MIME-Version: 1.0 Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.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 --- drivers/net/wireless/ath/ath11k/dp_rx.c | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index 9491a47..a410030 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,17 @@ 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,