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: 10630271 X-Patchwork-Delegate: kvalo@adurom.com 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 A0CA214BD for ; Mon, 8 Oct 2018 09:03:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9207B28C60 for ; Mon, 8 Oct 2018 09:03:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8665428C9C; Mon, 8 Oct 2018 09:03:08 +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=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61F0328C60 for ; Mon, 8 Oct 2018 09:03:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726908AbeJHQNq (ORCPT ); Mon, 8 Oct 2018 12:13:46 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:60482 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726174AbeJHQNq (ORCPT ); Mon, 8 Oct 2018 12:13:46 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 8FA8B607BD; 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 Cc: linux-wireless@vger.kernel.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 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.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);