From da7b9e9b00d4859d0fa563d7fe9a2b2dff59e852 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Tue, 15 Jan 2019 14:43:04 -0800 Subject: net: dsa: Add ndo_get_phys_port_name() for CPU port There is not currently way to infer the port number through sysfs that is being used as the CPU port number. Overlay a ndo_get_phys_port_name() operation onto the DSA master network device in order to retrieve that information. Signed-off-by: Florian Fainelli Signed-off-by: David S. Miller --- include/net/dsa.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/net/dsa.h') diff --git a/include/net/dsa.h b/include/net/dsa.h index b3eefe8e18fd..2f1daf29131a 100644 --- a/include/net/dsa.h +++ b/include/net/dsa.h @@ -208,6 +208,11 @@ struct dsa_port { * Original copy of the master netdev ethtool_ops */ const struct ethtool_ops *orig_ethtool_ops; + + /* + * Original copy of the master netdev net_device_ops + */ + const struct net_device_ops *orig_ndo_ops; }; struct dsa_switch { -- cgit v1.2.3-59-g8ed1b