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]>
This commit is contained in:
Andrew Lunn 2016-06-04 21:17:00 +02:00 • committed by David S. Miller
commit 66472fc04e
3 changed files with 12 additions and 3 deletions

View file

@ -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.
*/