All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/15] ath11k: rename per_transfer_context to skb
@ 2019-08-09  9:26 Kalle Valo
  2019-08-09  9:26 ` [PATCH 02/15] ath11k: remove unused struct ath11k_ce_sg_item Kalle Valo
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Kalle Valo @ 2019-08-09  9:26 UTC (permalink / raw)
  To: ath11k

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 <kvalo@codeaurora.org>
---
 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 {


_______________________________________________
ath11k mailing list
ath11k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath11k

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2019-08-12 15:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-09  9:26 [PATCH 01/15] ath11k: rename per_transfer_context to skb Kalle Valo
2019-08-09  9:26 ` [PATCH 02/15] ath11k: remove unused struct ath11k_ce_sg_item Kalle Valo
2019-08-09  9:26 ` [PATCH 03/15] ath11k: cleanup and rename ath11k_send_crash_inject_cmd() Kalle Valo
2019-08-09  9:26 ` [PATCH 04/15] ath11k: remove unused IEEE80211_VHTCAP defines Kalle Valo
2019-08-09  9:26 ` [PATCH 05/15] ath11k: move ath11k_mac_destroy() after _create() Kalle Valo
2019-08-09  9:26 ` [PATCH 06/15] ath11k: random whitespace fixes Kalle Valo
2019-08-09  9:26 ` [PATCH 07/15] ath11k: make static const in debugfs functions Kalle Valo
2019-08-09  9:27 ` [PATCH 08/15] ath11k: remove box comments Kalle Valo
2019-08-09  9:27 ` [PATCH 09/15] ath11k: move fops_pktlog_filter to correct place Kalle Valo
2019-08-09  9:27 ` [PATCH 10/15] ath11k: avoid excessive casting in debug_htt_stats.c Kalle Valo
2019-08-09  9:27 ` [PATCH 11/15] ath11k: debug_htt_stats: pass stats_req as a properly typed pointer Kalle Valo
2019-08-09  9:27 ` [PATCH 12/15] ath11k: debug_htt_stats: remove unnecessary cast Kalle Valo
2019-08-09  9:27 ` [PATCH 13/15] ath11k: debug_htt_stats: move tag_buf assignment to the first Kalle Valo
2019-08-09  9:27 ` [PATCH 14/15] ath11k: debug_htt_stats: fix line over 90 char warnings Kalle Valo
2019-08-09  9:28 ` [PATCH 15/15] ath11k: debug_htt_stats: move fops structs close to the functions Kalle Valo
2019-08-12 15:02 ` [PATCH 01/15] ath11k: rename per_transfer_context to skb Kalle Valo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.