[PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support

STALE5524d

4 messages, 3 authors, 2011-06-17 · open the first message on its own page

[PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support

From: Antoine Reversat <hidden>
Date: 2011-06-16 20:47:14

This patch removes the call to ndo_vlan_rx_register if the underlying
device doesn't have hardware support for VLAN.
Signed-off-by: Antoine Reversat <redacted>
---
--- linux-2.6.39/net/8021q/vlan.c	2011-05-19 00:06:34.000000000 -0400
+++ linux-2.6.39-fixed/net/8021q/vlan.c	2011-06-16 16:39:25.933742004 -0400
@@ -211,7 +211,7 @@ int register_vlan_dev(struct net_device
 	grp->nr_vlans++;

 	if (ngrp) {
-		if (ops->ndo_vlan_rx_register)
+		if (ops->ndo_vlan_rx_register && (real_dev->features & NETIF_F_HW_VLAN_RX))
 			ops->ndo_vlan_rx_register(real_dev, ngrp);
 		rcu_assign_pointer(real_dev->vlgrp, ngrp);
 	}

Re: [PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support

From: David Miller <davem@davemloft.net>
Date: 2011-06-17 04:13:13

From: Antoine Reversat <redacted>
Date: Thu, 16 Jun 2011 16:47:13 -0400
This patch removes the call to ndo_vlan_rx_register if the underlying
device doesn't have hardware support for VLAN.
Signed-off-by: Antoine Reversat <redacted>
Applied, thanks.

Re: [PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support

From: Stephen Hemminger <hidden>
Date: 2011-06-17 19:00:36

On Fri, 17 Jun 2011 00:13:10 -0400 (EDT)
David Miller [off-list ref] wrote:
From: Antoine Reversat <redacted>
Date: Thu, 16 Jun 2011 16:47:13 -0400
quoted
This patch removes the call to ndo_vlan_rx_register if the underlying
device doesn't have hardware support for VLAN.
Signed-off-by: Antoine Reversat <redacted>
Applied, thanks.
Need same check for unregister?

Re: [PATCH 001/001] vlan: don't call ndo_vlan_rx_register on hardware that doesn't have vlan support

From: David Miller <davem@davemloft.net>
Date: 2011-06-17 19:11:57

From: Stephen Hemminger <redacted>
Date: Fri, 17 Jun 2011 12:00:32 -0700
On Fri, 17 Jun 2011 00:13:10 -0400 (EDT)
David Miller [off-list ref] wrote:
quoted
From: Antoine Reversat <redacted>
Date: Thu, 16 Jun 2011 16:47:13 -0400
quoted
This patch removes the call to ndo_vlan_rx_register if the underlying
device doesn't have hardware support for VLAN.
Signed-off-by: Antoine Reversat <redacted>
Applied, thanks.
Need same check for unregister?
What unregister?  There is only ->ndo_vlan_rx_register(), no such
->ndo_vlan_rx_unregister() op exists.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help