kernel: preserve oif of IPv6 link scope packets
[openwrt/staging/dedeckeh.git] / target / linux / generic / backport-4.9 / 424-v4.20-net-dsa-fix-88e6060-roaming.patch
1 From a74515604a7b171f2702bdcbd1e231225fb456d0 Mon Sep 17 00:00:00 2001
2 From: Anderson Luiz Alves <alacn1@gmail.com>
3 Date: Fri, 30 Nov 2018 21:58:36 -0200
4 Subject: [PATCH] mv88e6060: disable hardware level MAC learning
5
6 Disable hardware level MAC learning because it breaks station roaming.
7 When enabled it drops all frames that arrive from a MAC address
8 that is on a different port at learning table.
9
10 Signed-off-by: Anderson Luiz Alves <alacn1@gmail.com>
11 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
12 Signed-off-by: David S. Miller <davem@davemloft.net>
13 ---
14 drivers/net/dsa/mv88e6060.c | 10 +++-------
15 1 file changed, 3 insertions(+), 7 deletions(-)
16
17 --- a/drivers/net/dsa/mv88e6060.c
18 +++ b/drivers/net/dsa/mv88e6060.c
19 @@ -114,8 +114,7 @@ static int mv88e6060_switch_reset(struct
20 /* Reset the switch. */
21 REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
22 GLOBAL_ATU_CONTROL_SWRESET |
23 - GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
24 - GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
25 + GLOBAL_ATU_CONTROL_LEARNDIS);
26
27 /* Wait up to one second for reset to complete. */
28 timeout = jiffies + 1 * HZ;
29 @@ -140,13 +139,10 @@ static int mv88e6060_setup_global(struct
30 */
31 REG_WRITE(REG_GLOBAL, GLOBAL_CONTROL, GLOBAL_CONTROL_MAX_FRAME_1536);
32
33 - /* Enable automatic address learning, set the address
34 - * database size to 1024 entries, and set the default aging
35 - * time to 5 minutes.
36 + /* Disable automatic address learning.
37 */
38 REG_WRITE(REG_GLOBAL, GLOBAL_ATU_CONTROL,
39 - GLOBAL_ATU_CONTROL_ATUSIZE_1024 |
40 - GLOBAL_ATU_CONTROL_ATE_AGE_5MIN);
41 + GLOBAL_ATU_CONTROL_LEARNDIS);
42
43 return 0;
44 }