]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Remove master_netdev and use dst->cpu_dp->netdev
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 13 Jun 2017 20:27:19 +0000 (13:27 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 13 Jun 2017 20:35:02 +0000 (16:35 -0400)
commit3c88e43c9ad981fe9eafbf1122593fea34c8d99f
tree847ec56e33c25db7042393473557a1cebfeb3788
parentf13483250bb6a5eece14a208eda458a84e4700fc
net: dsa: Remove master_netdev and use dst->cpu_dp->netdev

In preparation for supporting multiple CPU ports, remove
dst->master_netdev and ds->master_netdev and replace them with only one
instance of the common object we have for a port: struct
dsa_port::netdev. ds->master_netdev is currently write only and would be
helpful in the case where we have two switches, both with CPU ports, and
also connected within each other, which the multi-CPU port patch series
would address.

While at it, introduce a helper function used in net/dsa/slave.c to
immediately get a reference on the master network device called
dsa_master_netdev().

Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/bcm_sf2.c
drivers/net/dsa/mt7530.c
include/net/dsa.h
net/dsa/dsa.c
net/dsa/dsa2.c
net/dsa/dsa_priv.h
net/dsa/legacy.c
net/dsa/slave.c