Lines Matching refs:netdev

132 	struct eth_device	netdev;  member
165 #define to_macb(_nd) container_of(_nd, struct macb_device, netdev)
700 macb->phydev = phy_connect(macb->bus, macb->phy_addr, &macb->netdev, in macb_phy_init()
1164 static int macb_send(struct eth_device *netdev, void *packet, int length) in macb_send() argument
1166 struct macb_device *macb = to_macb(netdev); in macb_send()
1168 return _macb_send(macb, netdev->name, packet, length); in macb_send()
1171 static int macb_recv(struct eth_device *netdev) in macb_recv() argument
1173 struct macb_device *macb = to_macb(netdev); in macb_recv()
1190 static int macb_init(struct eth_device *netdev, struct bd_info *bd) in macb_init() argument
1192 struct macb_device *macb = to_macb(netdev); in macb_init()
1194 return _macb_init(macb, netdev->name); in macb_init()
1197 static void macb_halt(struct eth_device *netdev) in macb_halt() argument
1199 struct macb_device *macb = to_macb(netdev); in macb_halt()
1204 static int macb_write_hwaddr(struct eth_device *netdev) in macb_write_hwaddr() argument
1206 struct macb_device *macb = to_macb(netdev); in macb_write_hwaddr()
1208 return _macb_write_hwaddr(macb, netdev->enetaddr); in macb_write_hwaddr()
1214 struct eth_device *netdev; in macb_eth_initialize() local
1223 netdev = &macb->netdev; in macb_eth_initialize()
1229 sprintf(netdev->name, "gmac%d", id); in macb_eth_initialize()
1231 sprintf(netdev->name, "macb%d", id); in macb_eth_initialize()
1233 netdev->init = macb_init; in macb_eth_initialize()
1234 netdev->halt = macb_halt; in macb_eth_initialize()
1235 netdev->send = macb_send; in macb_eth_initialize()
1236 netdev->recv = macb_recv; in macb_eth_initialize()
1237 netdev->write_hwaddr = macb_write_hwaddr; in macb_eth_initialize()
1241 eth_register(netdev); in macb_eth_initialize()
1248 strncpy(mdiodev->name, netdev->name, MDIO_NAME_LEN); in macb_eth_initialize()
1255 macb->bus = miiphy_get_dev_by_name(netdev->name); in macb_eth_initialize()