summaryrefslogtreecommitdiffstats
path: root/src/net/netdevice.c
diff options
context:
space:
mode:
authorMichael Brown2011-01-25 15:16:11 +0100
committerMichael Brown2011-01-25 15:16:11 +0100
commit66caec3f005f3ae2a9cd3d131af710e60d246182 (patch)
treeb1fe9e875425ba47b5b5736efb7f0f108a97dd15 /src/net/netdevice.c
parent[pci] Auto-resize VPD fields used for non-volatile storage (diff)
downloadipxe-66caec3f005f3ae2a9cd3d131af710e60d246182.tar.gz
ipxe-66caec3f005f3ae2a9cd3d131af710e60d246182.tar.xz
ipxe-66caec3f005f3ae2a9cd3d131af710e60d246182.zip
[netdevice] Allow devices to indicate that interrupts are not supported
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/netdevice.c')
-rw-r--r--src/net/netdevice.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index c7e907ad..81382376 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -542,6 +542,10 @@ void unregister_netdev ( struct net_device *netdev ) {
*/
void netdev_irq ( struct net_device *netdev, int enable ) {
+ /* Do nothing if device does not support interrupts */
+ if ( ! netdev_irq_supported ( netdev ) )
+ return;
+
/* Enable or disable device interrupts */
netdev->op->irq ( netdev, enable );