[ipxe-devel] [PATCH 2/2] Sync VLAN irq operation with trunk irq opertaion.

Wissam Shoukair wissams at mellanox.com
Wed Mar 5 12:44:43 UTC 2014


[vlan.c] If trunk netdevice doesn't support interrupts, VLAN irq operation should
be NULL.

Signed-off-by: Wissam Shoukair <wissams at mellanox.com>
---
 src/net/vlan.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/net/vlan.c b/src/net/vlan.c
index 502432d..bfa3b58 100644
--- a/src/net/vlan.c
+++ b/src/net/vlan.c
@@ -399,6 +399,11 @@ struct net_device *vlan_create ( struct net_device *trunk, unsigned int tag,
 		goto err_alloc_etherdev;
 	}
 	netdev_init ( netdev, &vlan_operations );
+	/* Nullify irq function if the trunk doesnt support interrupts */
+	if ( ! netdev_irq_supported( trunk ) ) {
+		netdev->op->irq = NULL;
+	}
+
 	netdev->dev = trunk->dev;
 	memcpy ( netdev->hw_addr, trunk->ll_addr, ETH_ALEN );
 	vlan = netdev->priv;
-- 
1.7.11.1




More information about the ipxe-devel mailing list