From patchwork Fri Aug 9 09:26:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kalle Valo X-Patchwork-Id: 11085995 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 5BBCA1395 for ; Fri, 9 Aug 2019 09:26:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A67C28C40 for ; Fri, 9 Aug 2019 09:26:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EB6C28C51; Fri, 9 Aug 2019 09:26:17 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4631128C55 for ; Fri, 9 Aug 2019 09:26:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:To:From: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=awdRaS1QuuJb6jiBGJ1Yu7sbTI7agpmENX/aQoYNLpg=; b=RG+ChuePLU5Hwg Mp+hlppXzVznNXu+z+Jkzrj3XFhehJJgP01kehLkMxLxJOH0KRT+C2lsHgWi2jYJ+UTCwM1VKuvBt uuqFw3/8sFRBTNP0AD6/PbFlYaVI3Ms2gogyCvdwl9QqxPPSuqySQLeCasSeH1qBxl92wrLjJG7Fo iSBAOS9oVNEZ4T1z7s1gtvAwWB8rILhPguG4SBFN2TXjr1yEQYQeSMPyZ7r0oFZyqukQUSb3qiGFk ln4TSlm+MSkNWDMU1EIESNmAg2oUVsm+x3QhpXw3eietBaj/WiXpKE9w6pFEqC9qpdPW9zNlRXW+F EsbNmGh9DTWdAc/JmI6Q==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hw1A6-0000bb-9X; Fri, 09 Aug 2019 09:26:14 +0000 Received: from smtp.codeaurora.org ([198.145.29.96]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hw1A3-0000ar-QF for ath11k@lists.infradead.org; Fri, 09 Aug 2019 09:26:13 +0000 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id C2ECD60710; Fri, 9 Aug 2019 09:26:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565342770; bh=+JuPuxy3tY7V0StJAjZkd4v/xngUTMjeEuFFFnPGuTg=; h=Subject:From:To:Date:From; b=gyr5egjGPmYztBGnbJkw87zgk9XMYrBkaW/TZvT4jr1h1unwgxAQudUhvL4ZmqyMa OuXXoRAw3i+rG8iTYLz/FKtwtZYjaxJWdlJpnwMDGU6/C4nyuBpW0xHQbBcNA/5dKn jhOxVzYlAg9Q3GZN6YIcndfXKRR45KHexReAe7EE= Received: from [127.0.1.1] (88-114-240-156.elisa-laajakaista.fi [88.114.240.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: kvalo@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id D4CA9602B7 for ; Fri, 9 Aug 2019 09:26:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1565342770; bh=+JuPuxy3tY7V0StJAjZkd4v/xngUTMjeEuFFFnPGuTg=; h=Subject:From:To:Date:From; b=gyr5egjGPmYztBGnbJkw87zgk9XMYrBkaW/TZvT4jr1h1unwgxAQudUhvL4ZmqyMa OuXXoRAw3i+rG8iTYLz/FKtwtZYjaxJWdlJpnwMDGU6/C4nyuBpW0xHQbBcNA/5dKn jhOxVzYlAg9Q3GZN6YIcndfXKRR45KHexReAe7EE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org D4CA9602B7 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=kvalo@codeaurora.org Subject: [PATCH 01/15] ath11k: rename per_transfer_context to skb From: Kalle Valo To: ath11k@lists.infradead.org Date: Fri, 09 Aug 2019 12:26:07 +0300 Message-ID: <156534276745.30736.11736417077894270794.stgit@x230> User-Agent: StGit/0.19 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190809_022611_901385_3B8F6110 X-CRM114-Status: GOOD ( 11.62 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Rename the field to skb to make it more clear what it contains. While at it, change also two function parameters to use skb instead context. No functional changes. Only compile tested. Signed-off-by: Kalle Valo --- drivers/net/wireless/ath/ath11k/ce.c | 24 +++++++++++------------- drivers/net/wireless/ath/ath11k/ce.h | 2 +- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/ce.c b/drivers/net/wireless/ath/ath11k/ce.c index 4ac65a16d72f..c1b170cf45ba 100644 --- a/drivers/net/wireless/ath/ath11k/ce.c +++ b/drivers/net/wireless/ath/ath11k/ce.c @@ -142,7 +142,7 @@ static int ath11k_ce_rx_buf_enqueue_pipe(struct ath11k_ce_pipe *pipe, ath11k_hal_ce_dst_set_desc(desc, paddr); - ring->per_transfer_context[write_index] = skb; + ring->skb[write_index] = skb; write_index = CE_RING_IDX_INCR(nentries_mask, write_index); ring->write_index = write_index; @@ -212,7 +212,7 @@ static int ath11k_ce_rx_post_pipe(struct ath11k_ce_pipe *pipe) } static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe, - struct sk_buff **context, int *nbytes) + struct sk_buff **skb, int *nbytes) { struct ath11k_base *ab = pipe->ab; struct hal_srng *srng; @@ -244,8 +244,8 @@ static int ath11k_ce_completed_recv_next(struct ath11k_ce_pipe *pipe, goto err; } - *context = pipe->dest_ring->per_transfer_context[sw_index]; - pipe->dest_ring->per_transfer_context[sw_index] = NULL; + *skb = pipe->dest_ring->skb[sw_index]; + pipe->dest_ring->skb[sw_index] = NULL; sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index); pipe->dest_ring->sw_index = sw_index; @@ -302,7 +302,7 @@ static void ath11k_ce_recv_process_cb(struct ath11k_ce_pipe *pipe) } static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe, - struct sk_buff **transfer_contextp) + struct sk_buff **skb) { struct ath11k_base *ab = pipe->ab; struct hal_srng *srng; @@ -328,9 +328,9 @@ static int ath11k_ce_completed_send_next(struct ath11k_ce_pipe *pipe, goto err_unlock; } - *transfer_contextp = pipe->src_ring->per_transfer_context[sw_index]; + *skb = pipe->src_ring->skb[sw_index]; - pipe->src_ring->per_transfer_context[sw_index] = NULL; + pipe->src_ring->skb[sw_index] = NULL; sw_index = CE_RING_IDX_INCR(nentries_mask, sw_index); pipe->src_ring->sw_index = sw_index; @@ -412,9 +412,7 @@ ath11k_ce_alloc_ring(struct ath11k_base *ab, int nentries, int desc_sz) struct ath11k_ce_ring *ce_ring; dma_addr_t base_addr; - ce_ring = kzalloc(sizeof(*ce_ring) + - (nentries * - sizeof(*ce_ring->per_transfer_context)), + ce_ring = kzalloc(sizeof(*ce_ring) + (nentries * sizeof(*ce_ring->skb)), GFP_KERNEL); if (ce_ring == NULL) return ERR_PTR(-ENOMEM); @@ -568,7 +566,7 @@ int ath11k_ce_send(struct ath11k_base *ab, struct sk_buff *skb, u8 pipe_id, ath11k_hal_ce_src_set_desc(desc, ATH11K_SKB_CB(skb)->paddr, skb->len, transfer_id, byte_swap_data); - pipe->src_ring->per_transfer_context[write_index] = skb; + pipe->src_ring->skb[write_index] = skb; pipe->src_ring->write_index = CE_RING_IDX_INCR(nentries_mask, write_index); @@ -599,11 +597,11 @@ static void ath11k_ce_rx_pipe_cleanup(struct ath11k_ce_pipe *pipe) return; for (i = 0; i < ring->nentries; i++) { - skb = ring->per_transfer_context[i]; + skb = ring->skb[i]; if (!skb) continue; - ring->per_transfer_context[i] = NULL; + ring->skb[i] = NULL; dma_unmap_single(ab->dev, ATH11K_SKB_RXCB(skb)->paddr, skb->len + skb_tailroom(skb), DMA_FROM_DEVICE); dev_kfree_skb_any(skb); diff --git a/drivers/net/wireless/ath/ath11k/ce.h b/drivers/net/wireless/ath/ath11k/ce.h index 5cc3fea55e0f..40926d06463e 100644 --- a/drivers/net/wireless/ath/ath11k/ce.h +++ b/drivers/net/wireless/ath/ath11k/ce.h @@ -139,7 +139,7 @@ struct ath11k_ce_ring { u32 hal_ring_id; /* keep last */ - struct sk_buff *per_transfer_context[0]; + struct sk_buff *skb[0]; }; struct ath11k_ce_pipe {