|
@@ -329,6 +329,9 @@ struct net_device {
|
329
|
329
|
/** Network device is open */
|
330
|
330
|
#define NETDEV_OPEN 0x0001
|
331
|
331
|
|
|
332
|
+/** Network device interrupts are enabled */
|
|
333
|
+#define NETDEV_IRQ_ENABLED 0x0002
|
|
334
|
+
|
332
|
335
|
/** Link-layer protocol table */
|
333
|
336
|
#define LL_PROTOCOLS __table ( struct ll_protocol, "ll_protocols" )
|
334
|
337
|
|
|
@@ -491,6 +494,17 @@ netdev_is_open ( struct net_device *netdev ) {
|
491
|
494
|
return ( netdev->state & NETDEV_OPEN );
|
492
|
495
|
}
|
493
|
496
|
|
|
497
|
+/**
|
|
498
|
+ * Check whether or not network device interrupts are currently enabled
|
|
499
|
+ *
|
|
500
|
+ * @v netdev Network device
|
|
501
|
+ * @v irq_enabled Network device interrupts are enabled
|
|
502
|
+ */
|
|
503
|
+static inline __attribute__ (( always_inline )) int
|
|
504
|
+netdev_irq_enabled ( struct net_device *netdev ) {
|
|
505
|
+ return ( netdev->state & NETDEV_IRQ_ENABLED );
|
|
506
|
+}
|
|
507
|
+
|
494
|
508
|
extern void netdev_link_down ( struct net_device *netdev );
|
495
|
509
|
extern int netdev_tx ( struct net_device *netdev, struct io_buffer *iobuf );
|
496
|
510
|
extern void netdev_tx_complete_err ( struct net_device *netdev,
|