lkml.org 
[lkml]   [2017]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH net-next 01/11] net: dsa: legacy: assign dst->applied
Date
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@savoirfairelinux.com>
---
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
\
 
 \ /
  Last update: 2017-08-15 00:28    [W:0.230 / U:2.608 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site