c4bd29365c7ad333a4108f28fe677f02607ecfec
[openwrt/staging/xback.git] /
1 From 40350ce3ae8701146aafd79c5f7b5582d9955e58 Mon Sep 17 00:00:00 2001
2 From: Daniel Golle <daniel@makrotopia.org>
3 Date: Sun, 25 Sep 2022 15:12:35 +0100
4 Subject: [PATCH 1/2] net: ethernet: mtk_eth_soc: fix wrong use of new helper
5 function
6 To: linux-mediatek@lists.infradead.org,
7 netdev@vger.kernel.org,
8 Lorenzo Bianconi <lorenzo@kernel.org>
9 Cc: Sujuan Chen <sujuan.chen@mediatek.com>,
10 Bo Jiao <Bo.Jiao@mediatek.com>,
11 Felix Fietkau <nbd@nbd.name>,
12 John Crispin <john@phrozen.org>,
13 Sean Wang <sean.wang@mediatek.com>,
14 Mark Lee <Mark-MC.Lee@mediatek.com>,
15 David S. Miller <davem@davemloft.net>,
16 Eric Dumazet <edumazet@google.com>,
17 Jakub Kicinski <kuba@kernel.org>,
18 Paolo Abeni <pabeni@redhat.com>,
19 Matthias Brugger <matthias.bgg@gmail.com>,
20 Chen Minqiang <ptpt52@gmail.com>
21
22 In function mtk_foe_entry_set_vlan() the call to field accessor macro
23 FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1)
24 has been wrongly replaced by
25 mtk_prep_ib1_vlan_layer(eth, entry->ib1)
26
27 Use correct helper function mtk_get_ib1_vlan_layer instead.
28
29 Reported-by: Chen Minqiang <ptpt52@gmail.com>
30 Fixes: 03a3180e5c09e1 ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986")
31 Signed-off-by: Daniel Golle <daniel@makrotopia.org>
32 ---
33 drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +-
34 1 file changed, 1 insertion(+), 1 deletion(-)
35
36 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
37 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
38 @@ -337,7 +337,7 @@ int mtk_foe_entry_set_vlan(struct mtk_et
39 {
40 struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
41
42 - switch (mtk_prep_ib1_vlan_layer(eth, entry->ib1)) {
43 + switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) {
44 case 0:
45 entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) |
46 mtk_prep_ib1_vlan_layer(eth, 1);