diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-09-30 00:19:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-01 06:15:07 +0300 |
commit | 2f657a600409f1961d67642fe384a9d4be71d36a (patch) | |
tree | ff755adac80edd80aa72ab7323e15dd77ee03ebc /net/dsa/dsa2.c | |
parent | 3e41f93b358a8800194b87995ad076fc50919719 (diff) | |
download | linux-2f657a600409f1961d67642fe384a9d4be71d36a.tar.xz |
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/dsa2.c')
-rw-r--r-- | net/dsa/dsa2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index b71e3bb478e4..62302558f38c 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -438,7 +438,7 @@ static int dsa_dst_apply(struct dsa_switch_tree *dst) * sent to the tag format's receive function. */ wmb(); - dst->cpu_dp->netdev->dsa_ptr = dst; + dst->cpu_dp->netdev->dsa_ptr = dst->cpu_dp; err = dsa_master_ethtool_setup(dst->cpu_dp->netdev); if (err) |