diff options
Diffstat (limited to 'net/core/dev.c')
-rw-r--r-- | net/core/dev.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 39fe369b46ad..a1f24151db5b 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5912,6 +5912,24 @@ int dev_get_phys_port_id(struct net_device *dev, | |||
5912 | EXPORT_SYMBOL(dev_get_phys_port_id); | 5912 | EXPORT_SYMBOL(dev_get_phys_port_id); |
5913 | 5913 | ||
5914 | /** | 5914 | /** |
5915 | * dev_get_phys_port_name - Get device physical port name | ||
5916 | * @dev: device | ||
5917 | * @name: port name | ||
5918 | * | ||
5919 | * Get device physical port name | ||
5920 | */ | ||
5921 | int dev_get_phys_port_name(struct net_device *dev, | ||
5922 | char *name, size_t len) | ||
5923 | { | ||
5924 | const struct net_device_ops *ops = dev->netdev_ops; | ||
5925 | |||
5926 | if (!ops->ndo_get_phys_port_name) | ||
5927 | return -EOPNOTSUPP; | ||
5928 | return ops->ndo_get_phys_port_name(dev, name, len); | ||
5929 | } | ||
5930 | EXPORT_SYMBOL(dev_get_phys_port_name); | ||
5931 | |||
5932 | /** | ||
5915 | * dev_new_index - allocate an ifindex | 5933 | * dev_new_index - allocate an ifindex |
5916 | * @net: the applicable net namespace | 5934 | * @net: the applicable net namespace |
5917 | * | 5935 | * |