From patchwork Mon Oct 8 09:02:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wen Gong X-Patchwork-Id: 10630273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 05A3F14BD for ; Mon, 8 Oct 2018 09:03:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E84A62787C for ; Mon, 8 Oct 2018 09:03:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DB8AF28495; Mon, 8 Oct 2018 09:03:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 729692787C for ; Mon, 8 Oct 2018 09:03:23 +0000 (UTC) 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=idCdythrn83rnMgLv5GejFW8nlrTqRtpQY9PYGgCyfk=; b=qkw WncY5B1eQCGgDvlkgdD054Z/FkuFuB3VlZ/vLATfsUz2ylLnd8MM0m4wY/icu96P3ojS+Ws07XWEu jyIg7XB2EbMqJuWL7Iq7kYcoGs5+oESziUVmDUvHmwPhLDkKawj7K0oy8QLBJqCrsIrYpr7uAY32b F28N+oi5qqJUjHFx5TmDZZbVbmWCF+hne7CHOGSe/FHArGMoUlYjzk6HhI8YR8CrRMZJGZJ/UGRcB 5Zd0aeLh+GNCGOIkNv5reDTLFocePkMcr7fMeODLJy9wQWXpWz5ZI0ASkzy4HyX6xkoDp1DGwcS7B NJ+g6eHxGLwuLgeHCzA9j74U4xjJrDg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1g9RRf-0002wK-48; Mon, 08 Oct 2018 09:03:19 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g9RRc-0002uD-A8 for ath10k@lists.infradead.org; Mon, 08 Oct 2018 09:03:17 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 9EE046078C; Mon, 8 Oct 2018 09:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538989385; bh=DWBFvOQjRDwsw6Q+13JTj44Rb1sJfe9H2E559h7xjz8=; h=From:To:Cc:Subject:Date:From; b=cmo0KH4864v8Pfygv/+dB4BSITFFv9GVmX0B5Ri6mt/iabwEmmHg9qjb8jG0eX64L evr9K2avVxsRT0vkuBXjm4c372zx2U7lS6XCsk6KpHmLorfe21cTHJ7sx5Yvh1OFoa AQisQb+aZJVB186M7JNAfDTPqIfOiYeB7Dh0q5io= Received: from localhost.localdomain (unknown [180.166.53.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: wgong@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 961BD6076A; Mon, 8 Oct 2018 09:03:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538989385; bh=DWBFvOQjRDwsw6Q+13JTj44Rb1sJfe9H2E559h7xjz8=; h=From:To:Cc:Subject:Date:From; b=cmo0KH4864v8Pfygv/+dB4BSITFFv9GVmX0B5Ri6mt/iabwEmmHg9qjb8jG0eX64L evr9K2avVxsRT0vkuBXjm4c372zx2U7lS6XCsk6KpHmLorfe21cTHJ7sx5Yvh1OFoa AQisQb+aZJVB186M7JNAfDTPqIfOiYeB7Dh0q5io= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 961BD6076A Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=wgong@codeaurora.org From: Wen Gong To: ath10k@lists.infradead.org Subject: [PATCH] ath10k: Add peer flush in ath10k_flush for STATION Date: Mon, 8 Oct 2018 17:02:43 +0800 Message-Id: <1538989363-12386-1-git-send-email-wgong@codeaurora.org> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181008_020316_365709_8E211779 X-CRM114-Status: GOOD ( 11.20 ) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP In the noisy environment, if there are packets in the queue and can't send out, the suspend timing will be more than 5 seconds due to the wait, flush the queue to optimize the suspend timing, and let the upper layer to retry the packets after resume. Tested with QCA6174 PCI with firmware WLAN.RM.4.4.1-00109-QCARMSWPZ-1, but this will also affect QCA9377 PCI. It's not a regression with new firmware releases. Signed-off-by: Wen Gong drivers/net/wireless/ath/ath10k/mac.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 97548f9..8df3cec 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -6814,9 +6814,20 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u32 queues, bool drop) { struct ath10k *ar = hw->priv; - - if (drop) + struct ath10k_vif *arvif; + u32 bitmap; + + if (drop) { + if (vif->type == NL80211_IFTYPE_STATION) { + bitmap = ~(1 << WMI_MGMT_TID); + list_for_each_entry(arvif, &ar->arvifs, list) { + if (arvif->vdev_type == WMI_VDEV_TYPE_STA) + ath10k_wmi_peer_flush(ar, arvif->vdev_id, + arvif->bssid, bitmap); + } + } return; + } mutex_lock(&ar->conf_mutex); ath10k_mac_wait_tx_complete(ar);