mv88e6060: disable hardware level MAC learning
authorAnderson Luiz Alves <alacn1@gmail.com>
Fri, 30 Nov 2018 23:58:36 +0000 (21:58 -0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Dec 2018 00:04:21 +0000 (16:04 -0800)
Disable hardware level MAC learning because it breaks station roaming.
When enabled it drops all frames that arrive from a MAC address
that is on a different port at learning table.

Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6060.c

index 65f10fec25b397345b03e503526a3b40de514a3a..0b3e51f248c21a2477c9b1736b0f06b80e350e29 100644 (file)
@@ -116,8 +116,7 @@ static int mv88e6060_switch_reset(struct dsa_switch *ds)
        /* Reset the switch. */
        REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
                  GLOBAL_ATU_CONTROL_SWRESET |
-                 GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
-                 GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
+                 GLOBAL_ATU_CONTROL_LEARNDIS);
 
        /* Wait up to one second for reset to complete. */
        timeout = jiffies + 1 * HZ;
@@ -142,13 +141,10 @@ static int mv88e6060_setup_global(struct dsa_switch *ds)
         */
        REG_WRITE(REG_GLOBAL, GLOBAL_CONTROL, GLOBAL_CONTROL_MAX_FRAME_1536);
 
-       /* Enable automatic address learning, set the address
-        * database size to 1024 entries, and set the default aging
-        * time to 5 minutes.
+       /* Disable automatic address learning.
         */
        REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
-                 GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
-                 GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
+                 GLOBAL_ATU_CONTROL_LEARNDIS);
 
        return 0;
 }