mirror of
https://github.com/ipxe/ipxe
synced 2025-12-27 18:12:36 +03:00
Simplify RX data path.
Kill off the static single net device and move to proper dynamic registration (which we need with the new device model). Break the (flawed) assumption that all network-layer protocols can use ARP; such network-layer protocols (i.e. IPv4) must now register as an ARP protocol using ARP_NET_PROTOCOL() and provide a single method for checking the existence of a local network-layer address.
This commit is contained in:
@@ -18,11 +18,14 @@ extern struct ll_protocol ethernet_protocol;
|
||||
* @v priv_size Size of driver private data
|
||||
* @ret netdev Network device, or NULL
|
||||
*/
|
||||
#define alloc_etherdev( priv_size ) ( { \
|
||||
struct net_device *netdev; \
|
||||
netdev = alloc_netdev ( priv_size ); \
|
||||
if ( netdev ) \
|
||||
netdev->ll_protocol = ðernet_protocol; \
|
||||
netdev; } )
|
||||
static inline struct net_device * alloc_etherdev ( size_t priv_size ) {
|
||||
struct net_device *netdev;
|
||||
|
||||
netdev = alloc_netdev ( priv_size );
|
||||
if ( netdev ) {
|
||||
netdev->ll_protocol = ðernet_protocol;
|
||||
}
|
||||
return netdev;
|
||||
}
|
||||
|
||||
#endif /* _GPXE_ETHERNET_H */
|
||||
|
||||
Reference in New Issue
Block a user