Преглед на файлове

Added netdev_priv() to ease Linux driver compatibility.

tags/v0.9.3
Michael Brown преди 17 години
родител
ревизия
99411e36da
променени са 1 файла, в които са добавени 11 реда и са изтрити 0 реда
  1. 11
    0
      src/include/gpxe/netdevice.h

+ 11
- 0
src/include/gpxe/netdevice.h Целия файл

@@ -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…
Отказ
Запис