summaryrefslogtreecommitdiffstats
path: root/net/dsa/legacy.c
diff options
context:
space:
mode:
authorVivien Didelot2017-09-29 23:19:20 +0200
committerDavid S. Miller2017-10-01 05:15:07 +0200
commit2f657a600409f1961d67642fe384a9d4be71d36a (patch)
treeff755adac80edd80aa72ab7323e15dd77ee03ebc /net/dsa/legacy.c
parentnet: dsa: prepare master receive hot path (diff)
downloadkernel-qcow2-linux-2f657a600409f1961d67642fe384a9d4be71d36a.tar.gz
kernel-qcow2-linux-2f657a600409f1961d67642fe384a9d4be71d36a.tar.xz
kernel-qcow2-linux-2f657a600409f1961d67642fe384a9d4be71d36a.zip
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>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r--net/dsa/legacy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index 96c7e3f8b8bb..71917505a5cc 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -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);
}