0519-gsw_mt7621.patch 859 B

12345678910111213141516171819202122232425262728293031
  1. --- a/drivers/net/ethernet/mediatek/mt7530.c
  2. +++ b/drivers/net/ethernet/mediatek/mt7530.c
  3. @@ -547,6 +547,7 @@ mt7530_apply_config(struct switch_dev *d
  4. u8 etags = priv->vlan_entries[i].etags;
  5. u32 val;
  6. +#ifndef CONFIG_SOC_MT7621
  7. /* vid of vlan */
  8. val = mt7530_r32(priv, REG_ESW_VLAN_VTIM(i));
  9. if (i % 2 == 0) {
  10. @@ -557,7 +558,7 @@ mt7530_apply_config(struct switch_dev *d
  11. val |= (vid << 12);
  12. }
  13. mt7530_w32(priv, REG_ESW_VLAN_VTIM(i), val);
  14. -
  15. +#endif
  16. /* vlan port membership */
  17. if (member)
  18. mt7530_w32(priv, REG_ESW_VLAN_VAWD1, REG_ESW_VLAN_VAWD1_IVL_MAC |
  19. @@ -577,7 +578,11 @@ mt7530_apply_config(struct switch_dev *d
  20. mt7530_w32(priv, REG_ESW_VLAN_VAWD2, val);
  21. /* write to vlan table */
  22. +#ifdef CONFIG_SOC_MT7621
  23. + mt7530_vtcr(priv, 1, vid);
  24. +#else
  25. mt7530_vtcr(priv, 1, i);
  26. +#endif
  27. }
  28. /* Port Default PVID */