[PATCH net-next 01/11] net: dsa: legacy: assign dst->applied

From: Vivien Didelot
Date: Mon Aug 14 2017 - 18:28:09 EST


The "applied" boolean of the dsa_switch_tree is only set in the new
bindings. This patch sets it in the legacy code as well.

Signed-off-by: Vivien Didelot <vivien.didelot@xxxxxxxxxxxxxxxxxxxx>
---
net/dsa/legacy.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index 91e6f7981d39..a6a0849483d1 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -605,6 +605,7 @@ static int dsa_setup_dst(struct dsa_switch_tree *dst, struct net_device *dev,
*/
wmb();
dev->dsa_ptr = dst;
+ dst->applied = true;

return 0;
}
@@ -689,6 +690,8 @@ static void dsa_remove_dst(struct dsa_switch_tree *dst)
dsa_cpu_port_ethtool_restore(dst->cpu_dp);

dev_put(dst->cpu_dp->netdev);
+
+ dst->applied = false;
}

static int dsa_remove(struct platform_device *pdev)
--
2.14.0