• Home
  • Raw
  • Download

Lines Matching refs:netdev

82 	struct net_device *netdev = to_net_dev(dev);  in netdev_store()  local
83 struct net *net = dev_net(netdev); in netdev_store()
97 if (dev_isalive(netdev)) { in netdev_store()
98 ret = (*set)(netdev, new); in netdev_store()
179 struct net_device *netdev = to_net_dev(dev); in carrier_store() local
184 if (!netdev->netdev_ops->ndo_change_carrier) in carrier_store()
193 struct net_device *netdev = to_net_dev(dev); in carrier_show() local
195 if (netif_running(netdev)) in carrier_show()
196 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev)); in carrier_show()
205 struct net_device *netdev = to_net_dev(dev); in speed_show() local
211 if (!netdev->ethtool_ops->get_link_ksettings) in speed_show()
217 if (netif_running(netdev) && netif_device_present(netdev)) { in speed_show()
220 if (!__ethtool_get_link_ksettings(netdev, &cmd)) in speed_show()
231 struct net_device *netdev = to_net_dev(dev); in duplex_show() local
237 if (!netdev->ethtool_ops->get_link_ksettings) in duplex_show()
243 if (netif_running(netdev)) { in duplex_show()
246 if (!__ethtool_get_link_ksettings(netdev, &cmd)) { in duplex_show()
271 struct net_device *netdev = to_net_dev(dev); in testing_show() local
273 if (netif_running(netdev)) in testing_show()
274 return sprintf(buf, fmt_dec, !!netif_testing(netdev)); in testing_show()
283 struct net_device *netdev = to_net_dev(dev); in dormant_show() local
285 if (netif_running(netdev)) in dormant_show()
286 return sprintf(buf, fmt_dec, !!netif_dormant(netdev)); in dormant_show()
305 const struct net_device *netdev = to_net_dev(dev); in operstate_show() local
309 operstate = netdev->operstate; in operstate_show()
310 if (!netif_running(netdev)) in operstate_show()
325 struct net_device *netdev = to_net_dev(dev); in carrier_changes_show() local
328 atomic_read(&netdev->carrier_up_count) + in carrier_changes_show()
329 atomic_read(&netdev->carrier_down_count)); in carrier_changes_show()
337 struct net_device *netdev = to_net_dev(dev); in carrier_up_count_show() local
339 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_up_count)); in carrier_up_count_show()
347 struct net_device *netdev = to_net_dev(dev); in carrier_down_count_show() local
349 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_down_count)); in carrier_down_count_show()
427 struct net_device *netdev = to_net_dev(dev); in ifalias_store() local
428 struct net *net = dev_net(netdev); in ifalias_store()
442 if (dev_isalive(netdev)) { in ifalias_store()
443 ret = dev_set_alias(netdev, buf, count); in ifalias_store()
447 netdev_state_change(netdev); in ifalias_store()
458 const struct net_device *netdev = to_net_dev(dev); in ifalias_show() local
462 ret = dev_get_alias(netdev, tmp, sizeof(tmp)); in ifalias_show()
492 struct net_device *netdev = to_net_dev(dev); in proto_down_store() local
497 if (!netdev->netdev_ops->ndo_change_proto_down) in proto_down_store()
507 struct net_device *netdev = to_net_dev(dev); in phys_port_id_show() local
513 if (!netdev->netdev_ops->ndo_get_phys_port_id) in phys_port_id_show()
519 if (dev_isalive(netdev)) { in phys_port_id_show()
522 ret = dev_get_phys_port_id(netdev, &ppid); in phys_port_id_show()
535 struct net_device *netdev = to_net_dev(dev); in phys_port_name_show() local
541 if (!netdev->netdev_ops->ndo_get_phys_port_name && in phys_port_name_show()
542 !netdev->netdev_ops->ndo_get_devlink_port) in phys_port_name_show()
548 if (dev_isalive(netdev)) { in phys_port_name_show()
551 ret = dev_get_phys_port_name(netdev, name, sizeof(name)); in phys_port_name_show()
564 struct net_device *netdev = to_net_dev(dev); in phys_switch_id_show() local
571 if (!netdev->netdev_ops->ndo_get_port_parent_id && in phys_switch_id_show()
572 !netdev->netdev_ops->ndo_get_devlink_port) in phys_switch_id_show()
578 if (dev_isalive(netdev)) { in phys_switch_id_show()
581 ret = dev_get_port_parent_id(netdev, &ppid, false); in phys_switch_id_show()
594 struct net_device *netdev = to_net_dev(dev); in threaded_show() local
600 if (dev_isalive(netdev)) in threaded_show()
601 ret = sprintf(buf, fmt_dec, netdev->threaded); in threaded_show()