2704faec12b01171f14c4392c3399ff61d203031
[openwrt/staging/thess.git] /
1 From b804f765485109f9644cc05d1e8fc79ca6c6e4aa Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Wed, 19 Jul 2023 01:39:36 +0100
4 Subject: [PATCH 094/250] net: ethernet: mtk_eth_soc: always
5 mtk_get_ib1_pkt_type
6
7 entries and bind debugfs files would display wrong data on NETSYS_V2 and
8 later because instead of using mtk_get_ib1_pkt_type the driver would use
9 MTK_FOE_IB1_PACKET_TYPE which corresponds to NETSYS_V1(.x) SoCs.
10 Use mtk_get_ib1_pkt_type so entries and bind records display correctly.
11
12 Fixes: 03a3180e5c09e ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986")
13 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
14 Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>
15 Link: https://lore.kernel.org/r/c0ae03d0182f4d27b874cbdf0059bc972c317f3c.1689727134.git.daniel@makrotopia.org
16 Signed-off-by: Jakub Kicinski <kuba@kernel.org>
17 ---
18 drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21 --- a/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
22 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_debugfs.c
23 @@ -98,7 +98,7 @@ mtk_ppe_debugfs_foe_show(struct seq_file
24
25 acct = mtk_foe_entry_get_mib(ppe, i, NULL);
26
27 - type = FIELD_GET(MTK_FOE_IB1_PACKET_TYPE, entry->ib1);
28 + type = mtk_get_ib1_pkt_type(ppe->eth, entry->ib1);
29 seq_printf(m, "%05x %s %7s", i,
30 mtk_foe_entry_state_str(state),
31 mtk_foe_pkt_type_str(type));