diff options
Diffstat (limited to 'net/core/net-sysfs.c')
-rw-r--r-- | net/core/net-sysfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c index 4238d6da5c60..18b34d771ed4 100644 --- a/net/core/net-sysfs.c +++ b/net/core/net-sysfs.c | |||
@@ -458,11 +458,15 @@ static ssize_t phys_switch_id_show(struct device *dev, | |||
458 | return restart_syscall(); | 458 | return restart_syscall(); |
459 | 459 | ||
460 | if (dev_isalive(netdev)) { | 460 | if (dev_isalive(netdev)) { |
461 | struct netdev_phys_item_id ppid; | 461 | struct switchdev_attr attr = { |
462 | .id = SWITCHDEV_ATTR_PORT_PARENT_ID, | ||
463 | .flags = SWITCHDEV_F_NO_RECURSE, | ||
464 | }; | ||
462 | 465 | ||
463 | ret = netdev_switch_parent_id_get(netdev, &ppid); | 466 | ret = switchdev_port_attr_get(netdev, &attr); |
464 | if (!ret) | 467 | if (!ret) |
465 | ret = sprintf(buf, "%*phN\n", ppid.id_len, ppid.id); | 468 | ret = sprintf(buf, "%*phN\n", attr.u.ppid.id_len, |
469 | attr.u.ppid.id); | ||
466 | } | 470 | } |
467 | rtnl_unlock(); | 471 | rtnl_unlock(); |
468 | 472 | ||