From patchwork Tue Sep 23 21:17:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Greear X-Patchwork-Id: 4960261 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 36AC89F4D5 for ; Tue, 23 Sep 2014 21:18:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 629932027D for ; Tue, 23 Sep 2014 21:18:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 96D232016C for ; Tue, 23 Sep 2014 21:18:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932578AbaIWVSO (ORCPT ); Tue, 23 Sep 2014 17:18:14 -0400 Received: from mail2.candelatech.com ([208.74.158.173]:51150 "EHLO mail2.candelatech.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932573AbaIWVSL (ORCPT ); Tue, 23 Sep 2014 17:18:11 -0400 Received: from ben-dt2.candelatech.com. (firewall.candelatech.com [70.89.124.249]) by mail2.candelatech.com (Postfix) with ESMTP id DB0F040AB7C; Tue, 23 Sep 2014 14:18:09 -0700 (PDT) From: greearb@candelatech.com To: linux-wireless@vger.kernel.org Cc: ath10k@lists.infradead.org, Ben Greear Subject: [PATCH v2 10/10] ath10k: request firmware flush in ath10k_flush. Date: Tue, 23 Sep 2014 14:17:25 -0700 Message-Id: <1411507045-18973-10-git-send-email-greearb@candelatech.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1411507045-18973-1-git-send-email-greearb@candelatech.com> References: <1411507045-18973-1-git-send-email-greearb@candelatech.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Greear CT firmware now supports flushing all tids for all peers for all vdevs. This appears to help the ath10k_flush logic work faster and not cause timeouts. Signed-off-by: Ben Greear --- v2: No changes, just added it to the series in case it helps justify adding the CT feature flag. drivers/net/wireless/ath/ath10k/mac.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 34ec992..bde3a2f 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3917,6 +3917,7 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ath10k *ar = hw->priv; bool skip; int ret; + u8 peer_addr[ETH_ALEN] = {0}; /* mac80211 doesn't care if we really xmit queued frames or not * we'll collect those frames either way if we stop/delete vdevs */ @@ -3928,6 +3929,12 @@ static void ath10k_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, if (ar->state == ATH10K_STATE_WEDGED) goto skip; + /* If we are CT firmware, ask it to flush all tids on all peers on + * all vdevs. Normal firmware will just crash if you do this. + */ + if (test_bit(ATH10K_FW_FEATURE_WMI_10X_CT, ar->fw_features)) + ath10k_wmi_peer_flush(ar, 0xFFFFFFFF, peer_addr, 0xFFFFFFFF); + ret = wait_event_timeout(ar->htt.empty_tx_wq, ({ bool empty;