From patchwork Tue Nov 10 13:10:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 7590391 Return-Path: X-Original-To: patchwork-ath10k@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 2442B9F443 for ; Tue, 10 Nov 2015 13:13:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0C516207B7 for ; Tue, 10 Nov 2015 13:13:49 +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 8E6A7207B0 for ; Tue, 10 Nov 2015 13:13:45 +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 1Zw8jv-0008Rx-QM; Tue, 10 Nov 2015 13:13:35 +0000 Received: from mail-lb0-x233.google.com ([2a00:1450:4010:c04::233]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zw8jn-0008Nc-MV for ath10k@lists.infradead.org; Tue, 10 Nov 2015 13:13:30 +0000 Received: by lbbcs9 with SMTP id cs9so14112089lbb.1 for ; Tue, 10 Nov 2015 05:13:05 -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=E4pb7HyGKYC4dqf+/F9dASWMTvLkHvZ1bgW1eMLPx4g=; b=SupXWqxbS9lUSgFilOHxJDoh8+7ePaNCrokT5K0Qdn3UVQlgcDlzG3HL3qdPOQdwUV CTdSbNhLGqOZFeabz7rDLiEuPYJ30VckTZsXGpQLDWJgNNz1/OQGHm3BlxQNBv08hkpc f6WhrmMHdab4XKTXpXU5lJctamCAVKJ6Z4Y0I= 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=E4pb7HyGKYC4dqf+/F9dASWMTvLkHvZ1bgW1eMLPx4g=; b=k1prWDaVeIsCwPhfObKlfpWGFgXF9r/gMDxtQaksQja+9mxD44smv0x2rnVQDjn/3N dRn4JSebL+kuEnxlrtxOcM7JDGPl4FZ4nzc3LR6MU9ckUjuN2EX+JEIrbfHSUgty2piq oADe0PGKuWOph1txMzVywbqdhTUsH4El8Y8YVFunYJo5hwO34aULvKv69akEFVdXREOz zr50X3pX7uvPiWF/LAfDG0toK954QCn4oengoyyU1QDfqT70I7Z/C5bxyYahtS9pDIR7 05V1wQubJI1a5FBROUsJBOcPoWXKVOotjHs4zv6H8uvsmQAda4CVhKRMbDkKY4CQUBbG UasA== X-Gm-Message-State: ALoCoQm6A6uOuidya9w1NtwFz/JmYx7KfrwgcxUyRdVe5llE3TEiy4BJUDDrI2tg1io97CfCfRvQ1nlyqwcvNbHpaWax6074qZ4I6wTL9wnZzA5/07wjXOJeIqOzGJ5CzxKIWe+kebzHiJN+QXeDcla3fHCDOs0/6dkmyyQ6qY1595qsOU39S86rV4r42twNXfE6ZJPcKS97 X-Received: by 10.112.35.196 with SMTP id k4mr1655383lbj.3.1447161185863; Tue, 10 Nov 2015 05:13:05 -0800 (PST) Received: from localhost.localdomain ([91.198.246.10]) by smtp.gmail.com with ESMTPSA id e63sm513167lfe.5.2015.11.10.05.13.04 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Nov 2015 05:13:05 -0800 (PST) From: Michal Kazior To: ath10k@lists.infradead.org Subject: [PATCH v2 4/9] ath10k: remove is_offchan Date: Tue, 10 Nov 2015 14:10:50 +0100 Message-Id: <1447161055-2283-5-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1447161055-2283-1-git-send-email-michal.kazior@tieto.com> References: <1446472988-2603-1-git-send-email-michal.kazior@tieto.com> <1447161055-2283-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-20151110_051327_995010_BCF67D20 X-CRM114-Status: GOOD ( 13.85 ) 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.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 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 2f48772418ec..344849dd93c8 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 dd4770ec7ecc..f7e4fba63b44 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -3297,7 +3297,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 @@ -3679,7 +3679,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); @@ -3711,7 +3710,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