Lines Matching refs:netdev

83 	struct net_device *netdev = to_net_dev(dev);  in netdev_store()  local
84 struct net *net = dev_net(netdev); in netdev_store()
98 if (dev_isalive(netdev)) { in netdev_store()
99 if ((ret = (*set)(netdev, new)) == 0) in netdev_store()
184 struct net_device *netdev = to_net_dev(dev); in carrier_show() local
185 if (netif_running(netdev)) { in carrier_show()
186 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev)); in carrier_show()
195 struct net_device *netdev = to_net_dev(dev); in speed_show() local
201 if (netif_running(netdev)) { in speed_show()
203 if (!__ethtool_get_settings(netdev, &cmd)) in speed_show()
214 struct net_device *netdev = to_net_dev(dev); in duplex_show() local
220 if (netif_running(netdev)) { in duplex_show()
222 if (!__ethtool_get_settings(netdev, &cmd)) { in duplex_show()
246 struct net_device *netdev = to_net_dev(dev); in dormant_show() local
248 if (netif_running(netdev)) in dormant_show()
249 return sprintf(buf, fmt_dec, !!netif_dormant(netdev)); in dormant_show()
268 const struct net_device *netdev = to_net_dev(dev); in operstate_show() local
272 operstate = netdev->operstate; in operstate_show()
273 if (!netif_running(netdev)) in operstate_show()
288 struct net_device *netdev = to_net_dev(dev); in carrier_changes_show() local
290 atomic_read(&netdev->carrier_changes)); in carrier_changes_show()
357 struct net_device *netdev = to_net_dev(dev); in ifalias_store() local
358 struct net *net = dev_net(netdev); in ifalias_store()
371 ret = dev_set_alias(netdev, buf, count); in ifalias_store()
380 const struct net_device *netdev = to_net_dev(dev); in ifalias_show() local
385 if (netdev->ifalias) in ifalias_show()
386 ret = sprintf(buf, "%s\n", netdev->ifalias); in ifalias_show()
422 struct net_device *netdev = to_net_dev(dev); in phys_port_id_show() local
428 if (dev_isalive(netdev)) { in phys_port_id_show()
431 ret = dev_get_phys_port_id(netdev, &ppid); in phys_port_id_show()
444 struct net_device *netdev = to_net_dev(dev); in phys_port_name_show() local
450 if (dev_isalive(netdev)) { in phys_port_name_show()
453 ret = dev_get_phys_port_name(netdev, name, sizeof(name)); in phys_port_name_show()
466 struct net_device *netdev = to_net_dev(dev); in phys_switch_id_show() local
472 if (dev_isalive(netdev)) { in phys_switch_id_show()
478 ret = switchdev_port_attr_get(netdev, &attr); in phys_switch_id_show()