[sundance] Add reset completion check
[gpxe.git] / src / include / gpxe / ethernet.h
blobff0fd6c1171a1523d3f0a6af95989007d1d38a64
1 #ifndef _GPXE_ETHERNET_H
2 #define _GPXE_ETHERNET_H
4 /** @file
6 * Ethernet protocol
8 */
10 #include <stdint.h>
11 #include <gpxe/netdevice.h>
12 #include <gpxe/if_ether.h>
14 extern struct ll_protocol ethernet_protocol;
16 extern const char * eth_ntoa ( const void *ll_addr );
18 /**
19 * Allocate Ethernet device
21 * @v priv_size Size of driver private data
22 * @ret netdev Network device, or NULL
24 static inline struct net_device * alloc_etherdev ( size_t priv_size ) {
25 struct net_device *netdev;
27 netdev = alloc_netdev ( priv_size );
28 if ( netdev ) {
29 netdev->ll_protocol = &ethernet_protocol;
30 netdev->max_pkt_len = ETH_FRAME_LEN;
32 return netdev;
35 #endif /* _GPXE_ETHERNET_H */