diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/gpxe/netdevice.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/gpxe/netdevice.h b/src/include/gpxe/netdevice.h index 4f469e6b2..97bf1685c 100644 --- a/src/include/gpxe/netdevice.h +++ b/src/include/gpxe/netdevice.h @@ -329,6 +329,9 @@ struct net_device { /** Network device is open */ #define NETDEV_OPEN 0x0001 +/** Network device interrupts are enabled */ +#define NETDEV_IRQ_ENABLED 0x0002 + /** Link-layer protocol table */ #define LL_PROTOCOLS __table ( struct ll_protocol, "ll_protocols" ) @@ -491,6 +494,17 @@ netdev_is_open ( struct net_device *netdev ) { return ( netdev->state & NETDEV_OPEN ); } +/** + * Check whether or not network device interrupts are currently enabled + * + * @v netdev Network device + * @v irq_enabled Network device interrupts are enabled + */ +static inline __attribute__ (( always_inline )) int +netdev_irq_enabled ( struct net_device *netdev ) { + return ( netdev->state & NETDEV_IRQ_ENABLED ); +} + extern void netdev_link_down ( struct net_device *netdev ); extern int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf ); extern void netdev_tx_complete_err ( struct net_device *netdev, |
