Skip to content

Commit

Permalink
mv88e6060: disable hardware level MAC learning
Browse files Browse the repository at this point in the history
[ Upstream commit a745156 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Anderson Luiz Alves authored and Greg Kroah-Hartman committed Dec 21, 2018
1 parent 08349ed commit 59654d5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions drivers/net/dsa/mv88e6060.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,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;
Expand All @@ -124,13 +123,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;
}
Expand Down

0 comments on commit 59654d5

Please sign in to comment.