[netdevice] Record whether or not interrupts are currently enabled

Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
Michael Brown
2010-03-23 00:55:19 +00:00
parent 88e436376c
commit 4a7648bd3d
2 changed files with 21 additions and 0 deletions

View File

@@ -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;
}
/**