kernel: backport b53/bcm_sf2 changes from v5.5
[openwrt/staging/hauke.git] / target / linux / generic / backport-5.4 / 707-v5.7-0016-net-dsa-b53-Fix-valid-setting-for-MDB-entries.patch
1 From eab167f4851a19c514469dfa81147f77e17b5b20 Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <f.fainelli@gmail.com>
3 Date: Mon, 20 Apr 2020 20:26:52 -0700
4 Subject: [PATCH] net: dsa: b53: Fix valid setting for MDB entries
5
6 When support for the MDB entries was added, the valid bit was correctly
7 changed to be assigned depending on the remaining port bitmask, that is,
8 if there were no more ports added to the entry's port bitmask, the entry
9 now becomes invalid. There was another assignment a few lines below that
10 would override this which would invalidate entries even when there were
11 still multiple ports left in the MDB entry.
12
13 Fixes: 5d65b64a3d97 ("net: dsa: b53: Add support for MDB")
14 Reviewed-by: Andrew Lunn <andrew@lunn.ch>
15 Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
16 Signed-off-by: David S. Miller <davem@davemloft.net>
17 ---
18 drivers/net/dsa/b53/b53_common.c | 1 -
19 1 file changed, 1 deletion(-)
20
21 --- a/drivers/net/dsa/b53/b53_common.c
22 +++ b/drivers/net/dsa/b53/b53_common.c
23 @@ -1564,7 +1564,6 @@ static int b53_arl_op(struct b53_device
24 ent.is_valid = !!(ent.port);
25 }
26
27 - ent.is_valid = is_valid;
28 ent.vid = vid;
29 ent.is_static = true;
30 ent.is_age = false;