887ff565784a059b76ef4c1c204f7720390d74b3
[openwrt/staging/ldir.git] /
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
5 define
6
7 Defining local versions of NAPI_POLL_WEIGHT with the same
8 values in the drivers just makes refactoring harder.
9
10 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
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(-)
16
17 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
18 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
19 @@ -3564,9 +3564,9 @@ static int mtk_probe(struct platform_dev
20 */
21 init_dummy_netdev(&eth->dummy_dev);
22 netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx,
23 - MTK_NAPI_WEIGHT);
24 + NAPI_POLL_WEIGHT);
25 netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx,
26 - MTK_NAPI_WEIGHT);
27 + NAPI_POLL_WEIGHT);
28
29 platform_set_drvdata(pdev, eth);
30
31 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
32 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
33 @@ -25,7 +25,6 @@
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)