[PATCH] net: vlan: fix compile breakage from 69ecca8

From: David Lamparter
Date: Wed Jul 20 2011 - 16:07:22 EST

well, there was too much wood to see the tree and I messed up the
configuration dependencies. let's make it work with unset
CONFIG_VLAN_8021Q and remove the second definition of vlan_find_dev.

Signed-off-by: David Lamparter <equinox@xxxxxxxxxx>
Cc: linux-driver@xxxxxxxxxx
Cc: Anirban Chakraborty <anirban.chakraborty@xxxxxxxxxx>
Cc: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Randy Dunlap <rdunlap@xxxxxxxxxxxx>
sorry for the mess-up... compiled with CONFIG_VLAN_8021Q=n,m and y
this time; don't have qlcnic hw to test.

drivers/net/qlcnic/qlcnic_main.c | 4 +++-
include/linux/if_vlan.h | 5 -----
2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/net/qlcnic/qlcnic_main.c b/drivers/net/qlcnic/qlcnic_main.c
index 3579229..a2c39e9 100644
--- a/drivers/net/qlcnic/qlcnic_main.c
+++ b/drivers/net/qlcnic/qlcnic_main.c
@@ -4198,13 +4198,15 @@ static void
qlcnic_restore_indev_addr(struct net_device *netdev, unsigned long event)
struct qlcnic_adapter *adapter = netdev_priv(netdev);
- struct vlan_group *grp;
+ struct vlan_group *grp = NULL;
struct net_device *dev;
u16 vid;

qlcnic_config_indev_addr(adapter, netdev, event);

+#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
grp = rcu_dereference_rtnl(netdev->vlgrp);
if (!grp)

diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index bc03e40..dbe41dc 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -135,11 +135,6 @@ vlan_gro_frags(struct napi_struct *napi, struct vlan_group *grp,
unsigned int vlan_tci);

-static inline struct net_device *vlan_find_dev(struct net_device *real_dev,
- u16 vlan_id)
- return NULL;

static inline struct net_device *vlan_dev_real_dev(const struct net_device *dev)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/