net: dsa: change dsa_ptr for a dsa_port
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Fri, 29 Sep 2017 21:19:20 +0000 (17:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sun, 1 Oct 2017 03:15:07 +0000 (04:15 +0100)
commit2f657a600409f1961d67642fe384a9d4be71d36a
treeff755adac80edd80aa72ab7323e15dd77ee03ebc
parent3e41f93b358a8800194b87995ad076fc50919719
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>
include/linux/netdevice.h
net/dsa/dsa.c
net/dsa/dsa2.c
net/dsa/dsa_priv.h
net/dsa/legacy.c
net/dsa/master.c