diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/drivers/driver_ops.h | 19 | ||||
-rw-r--r-- | include/drivers/r8169.h | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/include/drivers/driver_ops.h b/include/drivers/driver_ops.h new file mode 100644 index 0000000..2c3c016 --- /dev/null +++ b/include/drivers/driver_ops.h @@ -0,0 +1,19 @@ +#ifndef _DRIVER_OPS_H +#define _DRIVER_OPS_H +#include <mm_api.h> + +struct driver_ops { + __u16 vendor; + __u16 device; + /* VFIO/PCI quirks */ + int (*vfio_quirks)(void); + /* prepare Tx descriptors */ + int (*rx_fill)(int device, void *rxring, struct iomem *data, char *rx_buf[]); + /* prepare Tx descriptors */ + int (*tx_fill)(int device, void *txring, struct iomem *data); + /* receive */ + void (*recv)(void *rxring, char *rxbuffers[]); + /* xmit */ + void (*xmit)(void); +}; +#endif diff --git a/include/drivers/r8169.h b/include/drivers/r8169.h index d3aca73..6bbcb61 100644 --- a/include/drivers/r8169.h +++ b/include/drivers/r8169.h @@ -1,5 +1,6 @@ #ifndef _R8169_H_ #define _R8169_H_ +#include <linux/types.h> #define COMPILER_BARRIER() asm volatile("" ::: "memory") #define MEMORY_BARRIER() asm volatile ("mfence" ::: "memory") #define STORE_BARRIER() asm volatile ("sfence" ::: "memory") |