net: dsa: setup and teardown master device
Add DSA helpers to setup and teardown a master net device wired to its CPU port. This centralizes the dsa_ptr assignment. This also makes the master ethtool helpers static at the same time. 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
f070464cf0
commit
17a22fcfc8
@@ -108,8 +108,8 @@ int dsa_legacy_fdb_del(struct ndmsg *ndm, struct nlattr *tb[],
|
||||
const unsigned char *addr, u16 vid);
|
||||
|
||||
/* master.c */
|
||||
int dsa_master_ethtool_setup(struct net_device *dev);
|
||||
void dsa_master_ethtool_restore(struct net_device *dev);
|
||||
int dsa_master_setup(struct net_device *dev, struct dsa_port *cpu_dp);
|
||||
void dsa_master_teardown(struct net_device *dev);
|
||||
|
||||
static inline struct net_device *dsa_master_find_slave(struct net_device *dev,
|
||||
int device, int port)
|
||||
|
Reference in New Issue
Block a user