diff options
| author | Andrew Lunn <[email protected]> | 2016-06-04 19:17:00 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2016-06-04 21:29:53 +0000 |
| commit | 66472fc04e8be62858f29c7798ed17e984c1ab3b (patch) | |
| tree | 7f1dd73e2bf0c8dac71112e707a4588e67d678e4 /net/dsa/dsa.c | |
| parent | net: dsa: Remove dynamic allocate of routing table (diff) | |
| download | kernel-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.c | 2 |
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. */ |
