724-v6.0-net-ethernet-mtk_eth_soc-fix-wrong-use-of-new-helper.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 40350ce3ae8701146aafd79c5f7b5582d9955e58 Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  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: [email protected],
  7. [email protected],
  8. Lorenzo Bianconi <[email protected]>
  9. Cc: Sujuan Chen <[email protected]>,
  10. Bo Jiao <[email protected]>,
  11. Felix Fietkau <[email protected]>,
  12. John Crispin <[email protected]>,
  13. Sean Wang <[email protected]>,
  14. Mark Lee <[email protected]>,
  15. David S. Miller <[email protected]>,
  16. Eric Dumazet <[email protected]>,
  17. Jakub Kicinski <[email protected]>,
  18. Paolo Abeni <[email protected]>,
  19. Matthias Brugger <[email protected]>,
  20. Chen Minqiang <[email protected]>
  21. In function mtk_foe_entry_set_vlan() the call to field accessor macro
  22. FIELD_GET(MTK_FOE_IB1_BIND_VLAN_LAYER, entry->ib1)
  23. has been wrongly replaced by
  24. mtk_prep_ib1_vlan_layer(eth, entry->ib1)
  25. Use correct helper function mtk_get_ib1_vlan_layer instead.
  26. Reported-by: Chen Minqiang <[email protected]>
  27. Fixes: 03a3180e5c09e1 ("net: ethernet: mtk_eth_soc: introduce flow offloading support for mt7986")
  28. Signed-off-by: Daniel Golle <[email protected]>
  29. ---
  30. drivers/net/ethernet/mediatek/mtk_ppe.c | 2 +-
  31. 1 file changed, 1 insertion(+), 1 deletion(-)
  32. --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
  33. +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
  34. @@ -337,7 +337,7 @@ int mtk_foe_entry_set_vlan(struct mtk_et
  35. {
  36. struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
  37. - switch (mtk_prep_ib1_vlan_layer(eth, entry->ib1)) {
  38. + switch (mtk_get_ib1_vlan_layer(eth, entry->ib1)) {
  39. case 0:
  40. entry->ib1 |= mtk_get_ib1_vlan_tag_mask(eth) |
  41. mtk_prep_ib1_vlan_layer(eth, 1);