diff options
author | Birger Koblitz <git@birger-koblitz.de> | 2021-05-01 11:22:05 +0200 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-05-07 07:05:16 +0200 |
commit | d4649942ad72a1b1db2595ace3620c1059fa3464 (patch) | |
tree | 11f464de5de287b6e0c0ab9656b6142b5588997b /target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h | |
parent | 408990464c77abdb341d18346d192c0c14c9461c (diff) | |
download | upstream-d4649942ad72a1b1db2595ace3620c1059fa3464.tar.gz upstream-d4649942ad72a1b1db2595ace3620c1059fa3464.tar.bz2 upstream-d4649942ad72a1b1db2595ace3620c1059fa3464.zip |
realtek: Add SoC-specific VLAN setup routine
This adds SoC specific VLAN configuration routines, which
alsoe sets up the portmask table entries that are referred to
in the vlan profiles registers for unknown multicast flooding.
Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
Diffstat (limited to 'target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h')
-rw-r--r-- | target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h index 928a23af77..35d5b1702a 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.h @@ -332,8 +332,11 @@ /* Debug features */ #define RTL930X_STAT_PRVTE_DROP_COUNTER0 (0xB5B8) +#define MAX_VLANS 4096 #define MAX_LAGS 16 #define MAX_PRIOS 8 +#define MAX_MC_GROUPS 512 +#define UNKNOWN_MC_PMASK (MAX_MC_GROUPS - 1) enum phy_type { PHY_NONE = 0, @@ -426,6 +429,7 @@ struct rtl838x_reg { void (*vlan_set_tagged)(u32 vlan, struct rtl838x_vlan_info *info); void (*vlan_set_untagged)(u32 vlan, u64 portmask); void (*vlan_profile_dump)(int index); + void (*vlan_profile_setup)(int profile); void (*stp_get)(struct rtl838x_switch_priv *priv, u16 msti, u32 port_state[]); void (*stp_set)(struct rtl838x_switch_priv *priv, u16 msti, u32 port_state[]); int (*mac_force_mode_ctrl)(int port); @@ -454,6 +458,8 @@ struct rtl838x_reg { void (*port_eee_set)(struct rtl838x_switch_priv *priv, int port, bool enable); int (*eee_port_ability)(struct rtl838x_switch_priv *priv, struct ethtool_eee *e, int port); + u64 (*read_mcast_pmask)(int idx); + void (*write_mcast_pmask)(int idx, u64 portmask); }; struct rtl838x_switch_priv { |