Lines Matching refs:netdev

125 	struct eth_device	netdev;  member
141 #define to_macb(_nd) container_of(_nd, struct macb_device, netdev)
535 macb->phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev, in macb_phy_init()
897 static int macb_send(struct eth_device *netdev, void *packet, int length) in macb_send() argument
899 struct macb_device *macb = to_macb(netdev); in macb_send()
901 return _macb_send(macb, netdev->name, packet, length); in macb_send()
904 static int macb_recv(struct eth_device *netdev) in macb_recv() argument
906 struct macb_device *macb = to_macb(netdev); in macb_recv()
923 static int macb_init(struct eth_device *netdev, bd_t *bd) in macb_init() argument
925 struct macb_device *macb = to_macb(netdev); in macb_init()
927 return _macb_init(macb, netdev->name); in macb_init()
930 static void macb_halt(struct eth_device *netdev) in macb_halt() argument
932 struct macb_device *macb = to_macb(netdev); in macb_halt()
937 static int macb_write_hwaddr(struct eth_device *netdev) in macb_write_hwaddr() argument
939 struct macb_device *macb = to_macb(netdev); in macb_write_hwaddr()
941 return _macb_write_hwaddr(macb, netdev->enetaddr); in macb_write_hwaddr()
947 struct eth_device *netdev; in macb_eth_initialize() local
956 netdev = &macb->netdev; in macb_eth_initialize()
962 sprintf(netdev->name, "gmac%d", id); in macb_eth_initialize()
964 sprintf(netdev->name, "macb%d", id); in macb_eth_initialize()
966 netdev->init = macb_init; in macb_eth_initialize()
967 netdev->halt = macb_halt; in macb_eth_initialize()
968 netdev->send = macb_send; in macb_eth_initialize()
969 netdev->recv = macb_recv; in macb_eth_initialize()
970 netdev->write_hwaddr = macb_write_hwaddr; in macb_eth_initialize()
974 eth_register(netdev); in macb_eth_initialize()
981 strncpy(mdiodev->name, netdev->name, MDIO_NAME_LEN); in macb_eth_initialize()
988 macb->bus = miiphy_get_dev_by_name(netdev->name); in macb_eth_initialize()