openwrt/target/linux/generic/pending-6.6/738-02-net-ethernet-mtk_eth_soc-do-not-enable-page-pool-sta.patch
Qingfang Deng edddbaf79c kernel: Mediatek: set default EEE Tx LPI timer
Due to API changes during the backport, the default value of Tx LPI
timer is accidentally left unset, breaking the network if EEE is on.
Set the default timer to 1ms on init, and fix an incorrect condition.

Fixes: d8315d5358d5 ("kernel: backport Mediatek SoC EEE support")
Signed-off-by: Qingfang Deng <dqfext@gmail.com>
2025-03-07 20:39:13 +08:00

44 lines
1.3 KiB
Diff

From: Danila Romanov <pervokur@gmail.com>
Date: Wed, 22 Jan 2025 06:48:45 +0100
Subject: [PATCH] net: ethernet: mtk_eth_soc: do not enable page pool stats by
default
There is no reason for it to be enabled by default.
Align mtk_eth_soc driver to mt76 driver.
This option incurs additional CPU cost in allocation and recycle paths
and additional memory cost to store the statistics.
Signed-off-by: Danila Romanov <pervokur@gmail.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/drivers/net/ethernet/mediatek/Kconfig
+++ b/drivers/net/ethernet/mediatek/Kconfig
@@ -18,7 +18,6 @@ config NET_MEDIATEK_SOC
select PHYLINK
select DIMLIB
select PAGE_POOL
- select PAGE_POOL_STATS
select PCS_MTK_LYNXI
select REGMAP_MMIO
help
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -4566,6 +4566,7 @@ static int mtk_get_sset_count(struct net
static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data)
{
+#ifdef CONFIG_PAGE_POOL_STATS
struct page_pool_stats stats = {};
int i;
@@ -4578,6 +4579,7 @@ static void mtk_ethtool_pp_stats(struct
page_pool_get_stats(ring->page_pool, &stats);
}
page_pool_ethtool_stats_get(data, &stats);
+#endif
}
static void mtk_get_ethtool_stats(struct net_device *dev,