From: Michael Brown Date: Thu, 13 Sep 2007 12:34:38 +0000 (+0100) Subject: Added netdev_priv() to ease Linux driver compatibility. X-Git-Tag: v0.9.3~84^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99411e36da52884257c8645beda2f601827fbb22;p=thirdparty%2Fipxe.git Added netdev_priv() to ease Linux driver compatibility. --- diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h index d82c6d8f4..b96b3c041 100644 --- a/src/include/gpxe/netdevice.h +++ b/src/include/gpxe/netdevice.h @@ -326,6 +326,17 @@ netdev_put ( struct net_device *netdev ) { ref_put ( &netdev->refcnt ); } +/** + * Get driver private area for this network device + * + * @v netdev Network device + * @ret priv Driver private area for this network device + */ +static inline __attribute__ (( always_inline )) void * +netdev_priv ( struct net_device *netdev ) { + return netdev->priv; +} + extern int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ); extern void netdev_tx_complete_err ( struct net_device *netdev, struct io_buffer *iobuf, int rc );