1 From 889e3691b9d6573de133da1f5e78f590e52152cd Mon Sep 17 00:00:00 2001
2 From: Jakub Kicinski <kuba@kernel.org>
3 Date: Thu, 28 Apr 2022 14:23:13 -0700
4 Subject: [PATCH] eth: mtk_eth_soc: remove a copy of the NAPI_POLL_WEIGHT
7 Defining local versions of NAPI_POLL_WEIGHT with the same
8 values in the drivers just makes refactoring harder.
10 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
13 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++--
14 drivers/net/ethernet/mediatek/mtk_eth_soc.h | 1 -
15 2 files changed, 2 insertions(+), 3 deletions(-)
17 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
18 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
19 @@ -3574,9 +3574,9 @@ static int mtk_probe(struct platform_dev
21 init_dummy_netdev(ð->dummy_dev);
22 netif_napi_add(ð->dummy_dev, ð->tx_napi, mtk_napi_tx,
25 netif_napi_add(ð->dummy_dev, ð->rx_napi, mtk_napi_rx,
29 platform_set_drvdata(pdev, eth);
31 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
32 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
34 #define MTK_TX_DMA_BUF_LEN 0x3fff
35 #define MTK_TX_DMA_BUF_LEN_V2 0xffff
36 #define MTK_DMA_SIZE 512
37 -#define MTK_NAPI_WEIGHT 64
38 #define MTK_MAC_COUNT 2
39 #define MTK_RX_ETH_HLEN (ETH_HLEN + ETH_FCS_LEN)
40 #define MTK_RX_HLEN (NET_SKB_PAD + MTK_RX_ETH_HLEN + NET_IP_ALIGN)