kernel: Activate FORTIFY_SOURCE for MIPS kernel 5.4
[openwrt/openwrt.git] / target / linux / generic / backport-5.4 / 753-v5.8-net-dsa-mt7530-fix-VLAN-setup.patch
1 From 0141792f8b7300006b874dda1c35acd0abd90d9d Mon Sep 17 00:00:00 2001
2 From: DENG Qingfang <dqfext@gmail.com>
3 Date: Fri, 15 May 2020 23:25:55 +0800
4 Subject: net: dsa: mt7530: fix VLAN setup
5
6 Allow DSA to add VLAN entries even if VLAN filtering is disabled, so
7 enabling it will not block the traffic of existent ports in the bridge
8
9 Signed-off-by: DENG Qingfang <dqfext@gmail.com>
10 Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
11 Signed-off-by: David S. Miller <davem@davemloft.net>
12 ---
13 drivers/net/dsa/mt7530.c | 13 +------------
14 1 file changed, 1 insertion(+), 12 deletions(-)
15
16 --- a/drivers/net/dsa/mt7530.c
17 +++ b/drivers/net/dsa/mt7530.c
18 @@ -1093,12 +1093,6 @@ mt7530_port_vlan_add(struct dsa_switch *
19 struct mt7530_priv *priv = ds->priv;
20 u16 vid;
21
22 - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not
23 - * being set.
24 - */
25 - if (!dsa_port_is_vlan_filtering(&ds->ports[port]))
26 - return;
27 -
28 mutex_lock(&priv->reg_mutex);
29
30 for (vid = vlan->vid_begin; vid <= vlan->vid_end; ++vid) {
31 @@ -1124,12 +1118,6 @@ mt7530_port_vlan_del(struct dsa_switch *
32 struct mt7530_priv *priv = ds->priv;
33 u16 vid, pvid;
34
35 - /* The port is kept as VLAN-unaware if bridge with vlan_filtering not
36 - * being set.
37 - */
38 - if (!dsa_port_is_vlan_filtering(&ds->ports[port]))
39 - return 0;
40 -
41 mutex_lock(&priv->reg_mutex);
42
43 pvid = priv->ports[port].pvid;
44 @@ -1242,6 +1230,7 @@ mt7530_setup(struct dsa_switch *ds)
45 * as two netdev instances.
46 */
47 dn = ds->ports[MT7530_CPU_PORT].master->dev.of_node->parent;
48 + ds->configure_vlan_while_not_filtering = true;
49
50 if (priv->id == ID_MT7530) {
51 regulator_set_voltage(priv->core_pwr, 1000000, 1000000);