Skip to content

Commit 08df5fa

Browse files
stroesedavem330
authored andcommitted
net: ethernet: mediatek: Rename NEXT_RX_DESP_IDX to NEXT_DESP_IDX
Rename the NEXT_RX_DESP_IDX macro to NEXT_DESP_IDX, so that it better can be used for TX ops as well. This will be used in the upcoming MT7628/88 support (same functionality for RX and TX in this macro). Signed-off-by: Stefan Roese <[email protected]> Cc: René van Dorst <[email protected]> Cc: Daniel Golle <[email protected]> Cc: Sean Wang <[email protected]> Cc: John Crispin <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4548740 commit 08df5fa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -903,7 +903,7 @@ static struct mtk_rx_ring *mtk_get_rx_ring(struct mtk_eth *eth)
903903

904904
for (i = 0; i < MTK_MAX_RX_RING_NUM; i++) {
905905
ring = &eth->rx_ring[i];
906-
idx = NEXT_RX_DESP_IDX(ring->calc_idx, ring->dma_size);
906+
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
907907
if (ring->dma[idx].rxd2 & RX_DMA_DONE) {
908908
ring->calc_idx_update = true;
909909
return ring;
@@ -952,7 +952,7 @@ static int mtk_poll_rx(struct napi_struct *napi, int budget,
952952
if (unlikely(!ring))
953953
goto rx_done;
954954

955-
idx = NEXT_RX_DESP_IDX(ring->calc_idx, ring->dma_size);
955+
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
956956
rxd = &ring->dma[idx];
957957
data = ring->data[idx];
958958

drivers/net/ethernet/mediatek/mtk_eth_soc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
NETIF_F_SG | NETIF_F_TSO | \
4040
NETIF_F_TSO6 | \
4141
NETIF_F_IPV6_CSUM)
42-
#define NEXT_RX_DESP_IDX(X, Y) (((X) + 1) & ((Y) - 1))
42+
#define NEXT_DESP_IDX(X, Y) (((X) + 1) & ((Y) - 1))
4343

4444
#define MTK_MAX_RX_RING_NUM 4
4545
#define MTK_HW_LRO_DMA_SIZE 8

0 commit comments

Comments
 (0)