realtek: Configure initial L2 learning setup

Configure a sane L2 learning configuration upon DSA driver load so that the
switch can start learning L2 addresses. Also configure the correct flood masks
for broadcast and unknown unicast traffice.

Signed-off-by: Birger Koblitz <git@birger-koblitz.de>
This commit is contained in:
Birger Koblitz
2021-09-08 20:00:31 +02:00
committed by John Crispin
parent 9d9bf16aa8
commit 28e972b2ea
5 changed files with 63 additions and 1 deletions

View File

@@ -184,6 +184,8 @@ static int rtl83xx_setup(struct dsa_switch *ds)
ds->configure_vlan_while_not_filtering = true;
priv->r->l2_learning_setup();
/* Enable MAC Polling PHY again */
rtl83xx_enable_phy_polling(priv);
pr_debug("Please wait until PHY is settled\n");
@@ -228,6 +230,8 @@ static int rtl930x_setup(struct dsa_switch *ds)
ds->configure_vlan_while_not_filtering = true;
priv->r->l2_learning_setup();
rtl83xx_enable_phy_polling(priv);
priv->r->pie_init(priv);