summaryrefslogtreecommitdiffstats
path: root/src/net
diff options
context:
space:
mode:
authorMichael Brown2010-03-23 01:55:19 +0100
committerMichael Brown2010-03-23 01:55:47 +0100
commit4a7648bd3d811c10f272608cf5a64ab5eb2cd728 (patch)
tree96783a9651fe3e56fc508452364156a86e81dd60 /src/net
parent[netdevice] Add netdev_is_open() wrapper function (diff)
downloadipxe-4a7648bd3d811c10f272608cf5a64ab5eb2cd728.tar.gz
ipxe-4a7648bd3d811c10f272608cf5a64ab5eb2cd728.tar.xz
ipxe-4a7648bd3d811c10f272608cf5a64ab5eb2cd728.zip
[netdevice] Record whether or not interrupts are currently enabled
Signed-off-by: Michael Brown <mcb30@etherboot.org>
Diffstat (limited to 'src/net')
-rw-r--r--src/net/netdevice.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 2e781d76..b91f98c4 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -460,7 +460,14 @@ void unregister_netdev ( struct net_device *netdev ) {
* @v enable Interrupts should be enabled
*/
void netdev_irq ( struct net_device *netdev, int enable ) {
+
+ /* Enable or disable device interrupts */
netdev->op->irq ( netdev, enable );
+
+ /* Record interrupt enabled state */
+ netdev->state &= ~NETDEV_IRQ_ENABLED;
+ if ( enable )
+ netdev->state |= NETDEV_IRQ_ENABLED;
}
/**