aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/dsa.c
diff options
context:
space:
mode:
authorAndrew Lunn <[email protected]>2016-06-04 19:17:00 +0000
committerDavid S. Miller <[email protected]>2016-06-04 21:29:53 +0000
commit66472fc04e8be62858f29c7798ed17e984c1ab3b (patch)
tree7f1dd73e2bf0c8dac71112e707a4588e67d678e4 /net/dsa/dsa.c
parentnet: dsa: Remove dynamic allocate of routing table (diff)
downloadkernel-66472fc04e8be62858f29c7798ed17e984c1ab3b.tar.gz
kernel-66472fc04e8be62858f29c7798ed17e984c1ab3b.zip
net: dsa: Copy the routing table into the switch structure
The new binding will not have a chip data structure, it will place the routing directly into the switch structure. To enable backwards compatibility, copy the routing from the chip data into the switch structure. Signed-off-by: Andrew Lunn <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Vivien Didelot <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r--net/dsa/dsa.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 6177dd750847..bfe1d03d4730 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -297,6 +297,8 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, struct device *parent)
dst->tag_protocol = drv->tag_protocol;
}
+ memcpy(ds->rtable, cd->rtable, sizeof(ds->rtable));
+
/*
* Do basic register setup.
*/