Browse Source

Added netdev_priv() to ease Linux driver compatibility.

tags/v0.9.3
Michael Brown 17 years ago
parent
commit
99411e36da
1 changed files with 11 additions and 0 deletions
  1. 11
    0
      src/include/gpxe/netdevice.h

+ 11
- 0
src/include/gpxe/netdevice.h View File

@@ -326,6 +326,17 @@ netdev_put ( struct net_device *netdev ) {
326 326
 	ref_put ( &netdev->refcnt );
327 327
 }
328 328
 
329
+/**
330
+ * Get driver private area for this network device
331
+ *
332
+ * @v netdev		Network device
333
+ * @ret priv		Driver private area for this network device
334
+ */
335
+static inline __attribute__ (( always_inline )) void *
336
+netdev_priv ( struct net_device *netdev ) {
337
+        return netdev->priv;
338
+}
339
+
329 340
 extern int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf );
330 341
 extern void netdev_tx_complete_err ( struct net_device *netdev,
331 342
 				 struct io_buffer *iobuf, int rc );

Loading…
Cancel
Save