Lines Matching refs:netdev
118 struct net_device *netdev = fcoe_get_netdev(lport); in fcoe_link_speed_update() local
121 if (!__ethtool_get_link_ksettings(netdev, &ecmd)) { in fcoe_link_speed_update()
170 struct net_device *netdev) in __fcoe_get_lesb() argument
193 htonl(dev_get_stats(netdev, &temp)->rx_crc_errors); in __fcoe_get_lesb()
205 struct net_device *netdev = fcoe_get_netdev(lport); in fcoe_get_lesb() local
207 __fcoe_get_lesb(lport, fc_lesb, netdev); in fcoe_get_lesb()
220 struct net_device *netdev = fcoe_get_netdev(fip->lp); in fcoe_ctlr_get_lesb() local
224 __fcoe_get_lesb(fip->lp, fc_lesb, netdev); in fcoe_ctlr_get_lesb()
290 int fcoe_get_wwn(struct net_device *netdev, u64 *wwn, int type) in fcoe_get_wwn() argument
292 const struct net_device_ops *ops = netdev->netdev_ops; in fcoe_get_wwn()
295 return ops->ndo_fcoe_get_wwn(netdev, wwn, type); in fcoe_get_wwn()
511 static struct fcoe_transport *fcoe_transport_lookup(struct net_device *netdev) in fcoe_transport_lookup() argument
516 if (ft->match && ft->match(netdev)) in fcoe_transport_lookup()
579 ft->name, nm->netdev->name); in fcoe_transport_detach()
635 static int fcoe_add_netdev_mapping(struct net_device *netdev, in fcoe_add_netdev_mapping() argument
646 nm->netdev = netdev; in fcoe_add_netdev_mapping()
656 static void fcoe_del_netdev_mapping(struct net_device *netdev) in fcoe_del_netdev_mapping() argument
662 if (nm->netdev == netdev) { in fcoe_del_netdev_mapping()
683 static struct fcoe_transport *fcoe_netdev_map_lookup(struct net_device *netdev) in fcoe_netdev_map_lookup() argument
690 if (netdev == nm->netdev) { in fcoe_netdev_map_lookup()
735 struct net_device *netdev = netdev_notifier_info_to_dev(ptr); in libfcoe_device_notification() local
740 netdev->name); in libfcoe_device_notification()
741 fcoe_del_netdev_mapping(netdev); in libfcoe_device_notification()
750 struct net_device *netdev = NULL; in fcoe_ctlr_create_store() local
757 netdev = fcoe_if_to_netdev(buf); in fcoe_ctlr_create_store()
758 if (!netdev) { in fcoe_ctlr_create_store()
764 ft = fcoe_netdev_map_lookup(netdev); in fcoe_ctlr_create_store()
768 ft->name, netdev->name); in fcoe_ctlr_create_store()
773 ft = fcoe_transport_lookup(netdev); in fcoe_ctlr_create_store()
776 netdev->name); in fcoe_ctlr_create_store()
782 err = ft->alloc ? ft->alloc(netdev) : -ENODEV; in fcoe_ctlr_create_store()
784 fcoe_del_netdev_mapping(netdev); in fcoe_ctlr_create_store()
789 err = fcoe_add_netdev_mapping(netdev, ft); in fcoe_ctlr_create_store()
793 ft->name, netdev->name); in fcoe_ctlr_create_store()
799 ft->name, netdev->name); in fcoe_ctlr_create_store()
802 dev_put(netdev); in fcoe_ctlr_create_store()
814 struct net_device *netdev = NULL; in fcoe_ctlr_destroy_store() local
819 netdev = fcoe_if_to_netdev(buf); in fcoe_ctlr_destroy_store()
820 if (!netdev) { in fcoe_ctlr_destroy_store()
825 ft = fcoe_netdev_map_lookup(netdev); in fcoe_ctlr_destroy_store()
828 netdev->name); in fcoe_ctlr_destroy_store()
833 rc = ft->destroy(netdev); in fcoe_ctlr_destroy_store()
837 fcoe_del_netdev_mapping(netdev); in fcoe_ctlr_destroy_store()
840 netdev->name); in fcoe_ctlr_destroy_store()
843 dev_put(netdev); in fcoe_ctlr_destroy_store()
863 struct net_device *netdev = NULL; in fcoe_transport_create() local
869 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_create()
870 if (!netdev) { in fcoe_transport_create()
875 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_create()
879 ft->name, netdev->name); in fcoe_transport_create()
884 ft = fcoe_transport_lookup(netdev); in fcoe_transport_create()
887 netdev->name); in fcoe_transport_create()
891 rc = fcoe_add_netdev_mapping(netdev, ft); in fcoe_transport_create()
895 ft->name, netdev->name); in fcoe_transport_create()
900 rc = ft->create ? ft->create(netdev, fip_mode) : -ENODEV; in fcoe_transport_create()
902 fcoe_del_netdev_mapping(netdev); in fcoe_transport_create()
906 netdev->name); in fcoe_transport_create()
909 dev_put(netdev); in fcoe_transport_create()
929 struct net_device *netdev = NULL; in fcoe_transport_destroy() local
934 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_destroy()
935 if (!netdev) { in fcoe_transport_destroy()
940 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_destroy()
943 netdev->name); in fcoe_transport_destroy()
948 rc = ft->destroy ? ft->destroy(netdev) : -ENODEV; in fcoe_transport_destroy()
949 fcoe_del_netdev_mapping(netdev); in fcoe_transport_destroy()
952 netdev->name); in fcoe_transport_destroy()
955 dev_put(netdev); in fcoe_transport_destroy()
974 struct net_device *netdev = NULL; in fcoe_transport_disable() local
979 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_disable()
980 if (!netdev) in fcoe_transport_disable()
983 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_disable()
987 rc = ft->disable ? ft->disable(netdev) : -ENODEV; in fcoe_transport_disable()
990 dev_put(netdev); in fcoe_transport_disable()
1009 struct net_device *netdev = NULL; in fcoe_transport_enable() local
1014 netdev = fcoe_if_to_netdev(buffer); in fcoe_transport_enable()
1015 if (!netdev) in fcoe_transport_enable()
1018 ft = fcoe_netdev_map_lookup(netdev); in fcoe_transport_enable()
1022 rc = ft->enable ? ft->enable(netdev) : -ENODEV; in fcoe_transport_enable()
1025 dev_put(netdev); in fcoe_transport_enable()