• Home
  • Raw
  • Download

Lines Matching refs:netdev

80 	struct net_device *netdev = to_net_dev(dev);  in netdev_store()  local
81 struct net *net = dev_net(netdev); in netdev_store()
95 if (dev_isalive(netdev)) { in netdev_store()
96 ret = (*set)(netdev, new); in netdev_store()
177 struct net_device *netdev = to_net_dev(dev); in carrier_store() local
182 if (!netdev->netdev_ops->ndo_change_carrier) in carrier_store()
191 struct net_device *netdev = to_net_dev(dev); in carrier_show() local
193 if (netif_running(netdev)) in carrier_show()
194 return sprintf(buf, fmt_dec, !!netif_carrier_ok(netdev)); in carrier_show()
203 struct net_device *netdev = to_net_dev(dev); in speed_show() local
209 if (!netdev->ethtool_ops->get_link_ksettings) in speed_show()
215 if (netif_running(netdev) && netif_device_present(netdev)) { in speed_show()
218 if (!__ethtool_get_link_ksettings(netdev, &cmd)) in speed_show()
229 struct net_device *netdev = to_net_dev(dev); in duplex_show() local
235 if (!netdev->ethtool_ops->get_link_ksettings) in duplex_show()
241 if (netif_running(netdev)) { in duplex_show()
244 if (!__ethtool_get_link_ksettings(netdev, &cmd)) { in duplex_show()
269 struct net_device *netdev = to_net_dev(dev); in dormant_show() local
271 if (netif_running(netdev)) in dormant_show()
272 return sprintf(buf, fmt_dec, !!netif_dormant(netdev)); in dormant_show()
291 const struct net_device *netdev = to_net_dev(dev); in operstate_show() local
295 operstate = netdev->operstate; in operstate_show()
296 if (!netif_running(netdev)) in operstate_show()
311 struct net_device *netdev = to_net_dev(dev); in carrier_changes_show() local
314 atomic_read(&netdev->carrier_up_count) + in carrier_changes_show()
315 atomic_read(&netdev->carrier_down_count)); in carrier_changes_show()
323 struct net_device *netdev = to_net_dev(dev); in carrier_up_count_show() local
325 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_up_count)); in carrier_up_count_show()
333 struct net_device *netdev = to_net_dev(dev); in carrier_down_count_show() local
335 return sprintf(buf, fmt_dec, atomic_read(&netdev->carrier_down_count)); in carrier_down_count_show()
396 struct net_device *netdev = to_net_dev(dev); in ifalias_store() local
397 struct net *net = dev_net(netdev); in ifalias_store()
411 if (dev_isalive(netdev)) { in ifalias_store()
412 ret = dev_set_alias(netdev, buf, count); in ifalias_store()
416 netdev_state_change(netdev); in ifalias_store()
427 const struct net_device *netdev = to_net_dev(dev); in ifalias_show() local
431 ret = dev_get_alias(netdev, tmp, sizeof(tmp)); in ifalias_show()
461 struct net_device *netdev = to_net_dev(dev); in proto_down_store() local
466 if (!netdev->netdev_ops->ndo_change_proto_down) in proto_down_store()
476 struct net_device *netdev = to_net_dev(dev); in phys_port_id_show() local
482 if (!netdev->netdev_ops->ndo_get_phys_port_id) in phys_port_id_show()
488 if (dev_isalive(netdev)) { in phys_port_id_show()
491 ret = dev_get_phys_port_id(netdev, &ppid); in phys_port_id_show()
504 struct net_device *netdev = to_net_dev(dev); in phys_port_name_show() local
510 if (!netdev->netdev_ops->ndo_get_phys_port_name && in phys_port_name_show()
511 !netdev->netdev_ops->ndo_get_devlink_port) in phys_port_name_show()
517 if (dev_isalive(netdev)) { in phys_port_name_show()
520 ret = dev_get_phys_port_name(netdev, name, sizeof(name)); in phys_port_name_show()
533 struct net_device *netdev = to_net_dev(dev); in phys_switch_id_show() local
540 if (!netdev->netdev_ops->ndo_get_port_parent_id && in phys_switch_id_show()
541 !netdev->netdev_ops->ndo_get_devlink_port) in phys_switch_id_show()
547 if (dev_isalive(netdev)) { in phys_switch_id_show()
550 ret = dev_get_port_parent_id(netdev, &ppid, false); in phys_switch_id_show()