Thread (12 messages) 12 messages, 5 authors, 2013-01-30
STALE4868d
Revisions (14)
  1. v1 [diff vs current]
  2. v1 [diff vs current]
  3. v1 [diff vs current]
  4. v1 [diff vs current]
  5. v1 current
  6. v1 [diff vs current]
  7. v1 [diff vs current]
  8. v1 [diff vs current]
  9. v2 [diff vs current]
  10. v2 [diff vs current]
  11. v2 [diff vs current]
  12. v3 [diff vs current]
  13. v3 [diff vs current]
  14. v4 [diff vs current]

Re: [PATCH 2/2] drivers: net:ethernet: cpsw: add support for VLAN

From: Richard Cochran <richardcochran@gmail.com>
Date: 2013-01-29 07:36:26
Also in: linux-arm-kernel, linux-omap

On Tue, Jan 29, 2013 at 01:42:25AM +0530, Mugunthan V N wrote:
quoted hunk ↗ jump to hunk
@@ -947,6 +1042,10 @@ static const struct net_device_ops cpsw_netdev_ops = {
 #ifdef CONFIG_NET_POLL_CONTROLLER
 	.ndo_poll_controller	= cpsw_ndo_poll_controller,
 #endif
+#ifdef VLAN_SUPPORT
+	.ndo_vlan_rx_add_vid	= cpsw_ndo_vlan_rx_add_vid,
+	.ndo_vlan_rx_kill_vid	= cpsw_ndo_vlan_rx_kill_vid,
+#endif
These are not compile time conditionals in net_device_ops, so I wonder
(after reading Felipe's comments) whether you can simply keep the VLAN
code always present.

As long as the driver still compiles and loads, when VLAN is missing
from the stack, then I don't see why you can't just leave it in,
without all the ifdefs.

Thanks,
Richard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help