From patchwork Wed Sep 18 12:43:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Kazior X-Patchwork-Id: 2906371 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 212FBBFF05 for ; Wed, 18 Sep 2013 12:43:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C229620367 for ; Wed, 18 Sep 2013 12:43:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8A62020364 for ; Wed, 18 Sep 2013 12:43:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751948Ab3IRMnc (ORCPT ); Wed, 18 Sep 2013 08:43:32 -0400 Received: from ebb05.tieto.com ([131.207.168.36]:46998 "EHLO ebb05.tieto.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751612Ab3IRMnb (ORCPT ); Wed, 18 Sep 2013 08:43:31 -0400 X-AuditID: 83cfa824-b7f348e000004c45-c2-52399ff1c797 Received: from FIHGA-EXHUB01.eu.tieto.com ( [131.207.136.34]) by ebb05.tieto.com (SMTP Mailer) with SMTP id 40.20.19525.1FF99325; Wed, 18 Sep 2013 15:43:29 +0300 (EEST) Received: from uw001058.eu.tieto.com (10.28.19.57) by inbound.tieto.com (131.207.136.49) with Microsoft SMTP Server id 8.3.298.1; Wed, 18 Sep 2013 15:43:28 +0300 From: Michal Kazior To: CC: , Michal Kazior Subject: [PATCH 2/5] ath10k: avoid needless memset on TX path Date: Wed, 18 Sep 2013 14:43:19 +0200 Message-ID: <1379508202-9660-3-git-send-email-michal.kazior@tieto.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1379508202-9660-1-git-send-email-michal.kazior@tieto.com> References: <1379508202-9660-1-git-send-email-michal.kazior@tieto.com> MIME-Version: 1.0 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrBIsWRmVeSWpSXmKPExsXSfL5DSffjfMsggzcrbSweXTrGbPFmxR12 i29bH7A5MHt8nnmXzWPzknqPz5vkApijuGxSUnMyy1KL9O0SuDLevtjJVPBMquL4316mBsaH Yl2MnBwSAiYSZw7dYoSwxSQu3FvP1sXIxSEksIpRom/FDiYIZymjxKKzT1hAqtgEdCVeNZ5l BbFFBBQkfk36yAZiMwv4Sjx7sowJxBYWsJXYevszO4jNIqAqsXvZH7ANvAJuEj13pjJ3MXIA bVOQmDPJBsTkFHCXWLQyDKRCCKhi27fvLBDVghInZ0JsZRaQkDj44gUzRI2KxMH1+5knMArM QlI2C0nZAkamVYz8qUlJBqZ6JZmpJfl6yfm5mxjBAbhCZQfj2QdShxgFOBiVeHgvlFsECbEm lhVX5h5ilORgUhLlTe6zDBLiS8pPqcxILM6ILyrNSS0+xCjBwawkwju3AyjHm5JYWZValA+T kuZgURLnfR8DNEkgPbEkNTs1tSC1CCYrw8GhJMHrMwmoUbAoNT21Ii0zpwQhzcTBCTKcB2i4 DUgNb3FBYm5xZjpE/hSjopQ4ryFIQgAkkVGaB9cLSxCvGMWBXhHmFQep4gEmF7juV0CDmYAG v19iBjK4JBEhJdXAaMR8fMHG/ekrfzzlD1qzn/VnWnHW7EesFu8+nVn7g+v72rTW2T3Hmq2O fNrvpWW8+NiOtmsbDrW9fFRW7JZ21HJZ8j3v8vvl0ilP/u1PmeMmvHCr0p1P79cfaM788J+7 bZbR6ilhuXLXlS/8f3f4wPTft3pztp04G33ScnpGp6Jac6XQPlM3tzlKLMUZiYZazEXFiQBw GwCZ6wIAAA== 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=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 This reduces number of memory accesses and hopefully contributes to better performance in the future. Signed-off-by: Michal Kazior --- drivers/net/wireless/ath/ath10k/htc.c | 2 +- drivers/net/wireless/ath/ath10k/htt_tx.c | 4 +++- drivers/net/wireless/ath/ath10k/mac.c | 4 +++- drivers/net/wireless/ath/ath10k/txrx.c | 1 - 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c index d0d7212..3118d75 100644 --- a/drivers/net/wireless/ath/ath10k/htc.c +++ b/drivers/net/wireless/ath/ath10k/htc.c @@ -103,10 +103,10 @@ static void ath10k_htc_prepare_tx_skb(struct ath10k_htc_ep *ep, struct ath10k_htc_hdr *hdr; hdr = (struct ath10k_htc_hdr *)skb->data; - memset(hdr, 0, sizeof(*hdr)); hdr->eid = ep->eid; hdr->len = __cpu_to_le16(skb->len - sizeof(*hdr)); + hdr->flags = 0; spin_lock_bh(&ep->htc->tx_lock); hdr->seq_no = ep->seq_no++; diff --git a/drivers/net/wireless/ath/ath10k/htt_tx.c b/drivers/net/wireless/ath/ath10k/htt_tx.c index 4548128..c4bbf74 100644 --- a/drivers/net/wireless/ath/ath10k/htt_tx.c +++ b/drivers/net/wireless/ath/ath10k/htt_tx.c @@ -384,9 +384,11 @@ int ath10k_htt_mgmt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) /* refcount is decremented by HTC and HTT completions until it reaches * zero and is freed */ skb_cb = ATH10K_SKB_CB(txdesc); + skb_cb->htt.is_conf = false; skb_cb->htt.msdu_id = msdu_id; skb_cb->htt.refcount = 2; skb_cb->htt.msdu = msdu; + skb_cb->htt.txfrag = NULL; res = ath10k_htc_send(&htt->ar->htc, htt->eid, txdesc); if (res) @@ -505,7 +507,6 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) skb_put(txdesc, desc_len); cmd = (struct htt_cmd *)txdesc->data; - memset(cmd, 0, desc_len); tid = ATH10K_SKB_CB(msdu)->htt.tid; @@ -555,6 +556,7 @@ int ath10k_htt_tx(struct ath10k_htt *htt, struct sk_buff *msdu) /* refcount is decremented by HTC and HTT completions until it reaches * zero and is freed */ skb_cb = ATH10K_SKB_CB(txdesc); + skb_cb->htt.is_conf = false; skb_cb->htt.msdu_id = msdu_id; skb_cb->htt.refcount = 2; skb_cb->htt.txfrag = txfrag; diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c index 5a56833..0d367e4 100644 --- a/drivers/net/wireless/ath/ath10k/mac.c +++ b/drivers/net/wireless/ath/ath10k/mac.c @@ -1757,7 +1757,9 @@ static void ath10k_tx(struct ieee80211_hw *hw, ath10k_tx_h_seq_no(skb); } - memset(ATH10K_SKB_CB(skb), 0, sizeof(*ATH10K_SKB_CB(skb))); + ATH10K_SKB_CB(skb)->is_mapped = false; + ATH10K_SKB_CB(skb)->is_aborted = false; + ATH10K_SKB_CB(skb)->htt.is_offchan = false; ATH10K_SKB_CB(skb)->htt.vdev_id = vdev_id; ATH10K_SKB_CB(skb)->htt.tid = tid; diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 37b8196..f6fed31 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c @@ -75,7 +75,6 @@ void ath10k_txrx_tx_unref(struct ath10k_htt *htt, struct sk_buff *txdesc) ath10k_report_offchan_tx(htt->ar, msdu); info = IEEE80211_SKB_CB(msdu); - memset(&info->status, 0, sizeof(info->status)); if (ATH10K_SKB_CB(txdesc)->htt.discard) { ieee80211_free_txskb(htt->ar->hw, msdu);