From patchwork Mon Nov 2 14:03:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 7536841 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 66838BF90C for ; Mon, 2 Nov 2015 14:04:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6F17020609 for ; Mon, 2 Nov 2015 14:04:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C924205D6 for ; Mon, 2 Nov 2015 14:04:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtFis-0005Uc-2z; Mon, 02 Nov 2015 14:04:34 +0000 Received: from mail-lb0-x22f.google.com ([2a00:1450:4010:c04::22f]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZtFim-0005Gy-4l for ath10k@lists.infradead.org; Mon, 02 Nov 2015 14:04:31 +0000 Received: by lbbec13 with SMTP id ec13so89526915lbb.0 for ; Mon, 02 Nov 2015 06:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tieto.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Hqne7knKwztShJsZuRfArg4iLhBHps8Pkw2AQXbo1gw=; b=f+LS0J0mEo39NHvicojZ5rkaRtAMcZFcMDTrR4pD/U4FpQBeas3s+7r0od5OXedpEH bM92BJhJkNRLGfmNSfC5w2SSUKlPsLMsw/aoIph3rptscKPl/zMF/zEWHukUsaWB1F2I 8dxYYK9GUv4DICMD5eg7S+cH+On73y8F42qUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Hqne7knKwztShJsZuRfArg4iLhBHps8Pkw2AQXbo1gw=; b=dHLQStZM4IHp0vNWOSLlIC4+MMIa9cVGTgnv5pUH9QFb+FQmVIK/lkwQWs6+Rj3VLu DmQvbmt3Gw8z/wsculvmExkgFmW6A9Dw/liiMuM6/HissNBtdX+bPGaIXdPFeujdeGHF SqWARnHllZxPKqDdP55vQZm/blT3p4n1ti2nidJZUzf2WWVJYInhO4pECAUMMDHqcpiw MwWzqOLg8z2BSgps6RWzLKeLmScRAtroDDpIwSO15mWJI/dPaLg7joGpntlrnczDi/df iO+r5ksWWk8IiBAruPkPjBcKC/U8xGfrFbFm4JVVO7gsdebezHmKMerXhzjl/9d5OWMz fVLA== X-Gm-Message-State: ALoCoQns3w1dvC7BnPpWvjDmmO6u9x0dr6UOpCQT6f1dLqv3/4z3PDxVhNxEm2dVhHgtOHEvkq1F96spRkWgKfd99RGxvT1335sByQVcJlCwdycC/ID6P8Yoj2oYvYrB+9OIKxPgOdRlCFuqdixIyupPJHhfl2QInHLaMYKGUrPuLSA8GWE0xOZXOZDIhQE4FA4c8CdjGUk+ X-Received: by 10.112.172.138 with SMTP id bc10mr9809898lbc.74.1446473045958; Mon, 02 Nov 2015 06:04:05 -0800 (PST) Received: from localhost.localdomain ([91.198.246.10]) by smtp.gmail.com with ESMTPSA id dz9sm3943142lbc.40.2015.11.02.06.04.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 02 Nov 2015 06:04:05 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH 4/8] ath10k: remove is_offchan Date: Mon, 2 Nov 2015 15:03:04 +0100 Message-Id: <1446472988-2603-5-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1446472988-2603-1-git-send-email-michal.kazior@tieto.com> References: <1446472988-2603-1-git-send-email-michal.kazior@tieto.com> X-DomainID: tieto.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151102_060428_627576_A94EBD30 X-CRM114-Status: GOOD ( 13.60 ) X-Spam-Score: -2.7 (--) X-BeenThere: ath10k@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, Michal Kazior MIME-Version: 1.0 Sender: "ath10k" Errors-To: ath10k-bounces+patchwork-ath10k=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 It was wasteful to keep it in the struct. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/core.h | 1 - drivers/net/wireless/ath/ath10k/mac.c | 4 +--- drivers/net/wireless/ath/ath10k/mac.h | 1 + drivers/net/wireless/ath/ath10k/txrx.c | 7 ++++++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h index efc34b1412b4..f24a5feb2220 100644 --- a/drivers/net/wireless/ath/ath10k/core.h +++ b/drivers/net/wireless/ath/ath10k/core.h @@ -89,7 +89,6 @@ struct ath10k_skb_cb { struct { u8 tid; u16 freq; - bool is_offchan; bool nohwcrypt; struct ath10k_htt_txbuf *txbuf; u32 txbuf_paddr; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index dd24bc970b00..9c76934b3bf0 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3290,7 +3290,7 @@ static void ath10k_tx_h_add_p2p_noa_ie(struct ath10k *ar, } } -static bool ath10k_mac_need_offchan_tx_work(struct ath10k *ar) +bool ath10k_mac_need_offchan_tx_work(struct ath10k *ar) { /* FIXME: Not really sure since when the behaviour changed. At some * point new firmware stopped requiring creation of peer entries for @@ -3672,7 +3672,6 @@ static void ath10k_tx(struct ieee80211_hw *hw, txmode = ath10k_mac_tx_h_get_txmode(ar, vif, sta, skb); - ATH10K_SKB_CB(skb)->htt.is_offchan = false; ATH10K_SKB_CB(skb)->htt.freq = 0; ATH10K_SKB_CB(skb)->htt.tid = ath10k_tx_h_get_tid(hdr); ATH10K_SKB_CB(skb)->htt.nohwcrypt = !ath10k_tx_h_use_hwcrypto(vif, skb); @@ -3704,7 +3703,6 @@ static void ath10k_tx(struct ieee80211_hw *hw, if (ath10k_mac_need_offchan_tx_work(ar)) { ATH10K_SKB_CB(skb)->htt.freq = 0; - ATH10K_SKB_CB(skb)->htt.is_offchan = true; ath10k_dbg(ar, ATH10K_DBG_MAC, "queued offchannel skb %p\n", skb); diff --git a/drivers/net/wireless/ath/ath10k/mac.h b/drivers/net/wireless/ath/ath10k/mac.h index e3cefe4c7cfd..ff09d6986fae 100644 --- a/drivers/net/wireless/ath/ath10k/mac.h +++ b/drivers/net/wireless/ath/ath10k/mac.h @@ -58,6 +58,7 @@ bool ath10k_mac_is_peer_wep_key_set(struct ath10k *ar, const u8 *addr, u8 keyidx); int ath10k_mac_vif_chan(struct ieee80211_vif *vif, struct cfg80211_chan_def *def); +bool ath10k_mac_need_offchan_tx_work(struct ath10k *ar); void ath10k_mac_handle_beacon(struct ath10k *ar, struct sk_buff *skb); void ath10k_mac_handle_beacon_miss(struct ath10k *ar, u32 vdev_id); diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 6d1105ab4592..655947bef6cc 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -23,7 +23,12 @@ static void ath10k_report_offchan_tx(struct ath10k *ar, struct sk_buff *skb) { - if (!ATH10K_SKB_CB(skb)->htt.is_offchan) + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); + + if (likely(!(info->flags & IEEE80211_TX_CTL_TX_OFFCHAN))) + return; + + if (!ath10k_mac_need_offchan_tx_work(ar)) return; /* If the original wait_for_completion() timed out before