net: dsa: change dsa_ptr for a dsa_port
With DSA, a master net device (CPU facing interface) has a dsa_ptr pointer to which hangs a dsa_switch_tree. This is not correct because a master interface is wired to a dedicated switch port, and because we can theoretically have several master interfaces pointing to several CPU ports of the same switch fabric. Change the master interface's dsa_ptr for the CPU dsa_port pointer. This is a step towards supporting multiple CPU ports. Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
3e41f93b35
commit
2f657a6004
@@ -607,7 +607,7 @@ static int dsa_setup_dst(struct dsa_switch_tree *dst, struct net_device *dev,
|
||||
* sent to the tag format's receive function.
|
||||
*/
|
||||
wmb();
|
||||
dev->dsa_ptr = dst;
|
||||
dev->dsa_ptr = dst->cpu_dp;
|
||||
|
||||
return dsa_master_ethtool_setup(dst->cpu_dp->netdev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user