Lines Matching refs:netdev

119 	struct net_device *netdev = fcoe_get_netdev(lport);  in fcoe_link_speed_update()  local
122 if (!__ethtool_get_link_ksettings(netdev, &ecmd)) { in fcoe_link_speed_update()
171 struct net_device *netdev) in __fcoe_get_lesb() argument
194 htonl(dev_get_stats(netdev, &temp)->rx_crc_errors); in __fcoe_get_lesb()
206 struct net_device *netdev = fcoe_get_netdev(lport); in fcoe_get_lesb() local
208 __fcoe_get_lesb(lport, fc_lesb, netdev); in fcoe_get_lesb()
221 struct net_device *netdev = fcoe_get_netdev(fip->lp); in fcoe_ctlr_get_lesb() local
225 __fcoe_get_lesb(fip->lp, fc_lesb, netdev); in fcoe_ctlr_get_lesb()
291 int fcoe_get_wwn(struct net_device *netdev, u64 *wwn, int type) in fcoe_get_wwn() argument
293 const struct net_device_ops *ops = netdev->netdev_ops; in fcoe_get_wwn()
296 return ops->ndo_fcoe_get_wwn(netdev, wwn, type); in fcoe_get_wwn()
512 static struct fcoe_transport *fcoe_transport_lookup(struct net_device *netdev) in fcoe_transport_lookup() argument
517 if (ft->match && ft->match(netdev)) in fcoe_transport_lookup()
580 ft->name, nm->netdev->name); in fcoe_transport_detach()
636 static int fcoe_add_netdev_mapping(struct net_device *netdev, in fcoe_add_netdev_mapping() argument
647 nm->netdev = netdev; in fcoe_add_netdev_mapping()
657 static void fcoe_del_netdev_mapping(struct net_device *netdev) in fcoe_del_netdev_mapping() argument
663 if (nm->netdev == netdev) { in fcoe_del_netdev_mapping()
684 static struct fcoe_transport *fcoe_netdev_map_lookup(struct net_device *netdev) in fcoe_netdev_map_lookup() argument
691 if (netdev == nm->netdev) { in fcoe_netdev_map_lookup()
736 struct net_device *netdev = netdev_notifier_info_to_dev(ptr); in libfcoe_device_notification() local
741 netdev->name); in libfcoe_device_notification()
742 fcoe_del_netdev_mapping(netdev); in libfcoe_device_notification()
751 struct net_device *netdev = NULL; in fcoe_ctlr_create_store() local
758 netdev = fcoe_if_to_netdev(buf); in fcoe_ctlr_create_store()
759 if (!netdev) { in fcoe_ctlr_create_store()
765 ft = fcoe_netdev_map_lookup(netdev); in fcoe_ctlr_create_store()
769 ft->name, netdev->name); in fcoe_ctlr_create_store()
774 ft = fcoe_transport_lookup(netdev); in fcoe_ctlr_create_store()
777 netdev->name); in fcoe_ctlr_create_store()
783 err = ft->alloc ? ft->alloc(netdev) : -ENODEV; in fcoe_ctlr_create_store()
785 fcoe_del_netdev_mapping(netdev); in fcoe_ctlr_create_store()
790 err = fcoe_add_netdev_mapping(netdev, ft); in fcoe_ctlr_create_store()
794 ft->name, netdev->name); in fcoe_ctlr_create_store()
800 ft->name, netdev->name); in fcoe_ctlr_create_store()
803 dev_put(netdev); in fcoe_ctlr_create_store()
815 struct net_device *netdev = NULL; in fcoe_ctlr_destroy_store() local
820 netdev = fcoe_if_to_netdev(buf); in fcoe_ctlr_destroy_store()
821 if (!netdev) { in fcoe_ctlr_destroy_store()
826 ft = fcoe_netdev_map_lookup(netdev); in fcoe_ctlr_destroy_store()
829 netdev->name); in fcoe_ctlr_destroy_store()
834 rc = ft->destroy(netdev); in fcoe_ctlr_destroy_store()
838 fcoe_del_netdev_mapping(netdev); in fcoe_ctlr_destroy_store()
841 netdev->name); in fcoe_ctlr_destroy_store()
844 dev_put(netdev); in fcoe_ctlr_destroy_store()
864 struct net_device *netdev = NULL; in fcoe_transport_create() local
870 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_create()
871 if (!netdev) { in fcoe_transport_create()
876 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_create()
880 ft->name, netdev->name); in fcoe_transport_create()
885 ft = fcoe_transport_lookup(netdev); in fcoe_transport_create()
888 netdev->name); in fcoe_transport_create()
892 rc = fcoe_add_netdev_mapping(netdev, ft); in fcoe_transport_create()
896 ft->name, netdev->name); in fcoe_transport_create()
901 rc = ft->create ? ft->create(netdev, fip_mode) : -ENODEV; in fcoe_transport_create()
903 fcoe_del_netdev_mapping(netdev); in fcoe_transport_create()
907 netdev->name); in fcoe_transport_create()
910 dev_put(netdev); in fcoe_transport_create()
930 struct net_device *netdev = NULL; in fcoe_transport_destroy() local
935 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_destroy()
936 if (!netdev) { in fcoe_transport_destroy()
941 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_destroy()
944 netdev->name); in fcoe_transport_destroy()
949 rc = ft->destroy ? ft->destroy(netdev) : -ENODEV; in fcoe_transport_destroy()
950 fcoe_del_netdev_mapping(netdev); in fcoe_transport_destroy()
953 netdev->name); in fcoe_transport_destroy()
956 dev_put(netdev); in fcoe_transport_destroy()
975 struct net_device *netdev = NULL; in fcoe_transport_disable() local
980 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_disable()
981 if (!netdev) in fcoe_transport_disable()
984 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_disable()
988 rc = ft->disable ? ft->disable(netdev) : -ENODEV; in fcoe_transport_disable()
991 dev_put(netdev); in fcoe_transport_disable()
1010 struct net_device *netdev = NULL; in fcoe_transport_enable() local
1015 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_enable()
1016 if (!netdev) in fcoe_transport_enable()
1019 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_enable()
1023 rc = ft->enable ? ft->enable(netdev) : -ENODEV; in fcoe_transport_enable()
1026 dev_put(netdev); in fcoe_transport_enable()