mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 14:32:49 +03:00
[netdevice] Record whether or not interrupts are currently enabled
Signed-off-by: Michael Brown <mcb30@etherboot.org>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user