net: dsa: Add ndo_get_phys_port_name() for CPU port
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- include/net/dsa.h | 5 +++++ net/dsa/master.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 60 insertions(+), 1 deletion(-)
include/net/dsa.h +5 -0
@@ -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 {
net/dsa/master.c +55 -1
83 lines not on this page · raw message
Signature · 1 line
2.17.1
From: Florian Fainelli <[email protected]>
Date: Tue, 15 Jan 2019 14:43:04 -0800
Quoted 6 lines
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 <[email protected]>
Applied.