Lines Matching refs:netdev

110 	struct eth_device	netdev;  member
126 #define to_macb(_nd) container_of(_nd, struct macb_device, netdev)
506 macb->phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev, in macb_phy_init()
850 static int macb_send(struct eth_device *netdev, void *packet, int length) in macb_send() argument
852 struct macb_device *macb = to_macb(netdev); in macb_send()
854 return _macb_send(macb, netdev->name, packet, length); in macb_send()
857 static int macb_recv(struct eth_device *netdev) in macb_recv() argument
859 struct macb_device *macb = to_macb(netdev); in macb_recv()
876 static int macb_init(struct eth_device *netdev, bd_t *bd) in macb_init() argument
878 struct macb_device *macb = to_macb(netdev); in macb_init()
880 return _macb_init(macb, netdev->name); in macb_init()
883 static void macb_halt(struct eth_device *netdev) in macb_halt() argument
885 struct macb_device *macb = to_macb(netdev); in macb_halt()
890 static int macb_write_hwaddr(struct eth_device *netdev) in macb_write_hwaddr() argument
892 struct macb_device *macb = to_macb(netdev); in macb_write_hwaddr()
894 return _macb_write_hwaddr(macb, netdev->enetaddr); in macb_write_hwaddr()
900 struct eth_device *netdev; in macb_eth_initialize() local
909 netdev = &macb->netdev; in macb_eth_initialize()
915 sprintf(netdev->name, "gmac%d", id); in macb_eth_initialize()
917 sprintf(netdev->name, "macb%d", id); in macb_eth_initialize()
919 netdev->init = macb_init; in macb_eth_initialize()
920 netdev->halt = macb_halt; in macb_eth_initialize()
921 netdev->send = macb_send; in macb_eth_initialize()
922 netdev->recv = macb_recv; in macb_eth_initialize()
923 netdev->write_hwaddr = macb_write_hwaddr; in macb_eth_initialize()
927 eth_register(netdev); in macb_eth_initialize()
934 strncpy(mdiodev->name, netdev->name, MDIO_NAME_LEN); in macb_eth_initialize()
941 macb->bus = miiphy_get_dev_by_name(netdev->name); in macb_eth_initialize()