Skip to content

Commit

Permalink
cnic : Cleanup CONFIG_IPV6 & VLAN check
Browse files Browse the repository at this point in the history
The cnic module needs to ensure that if ipv6 support is compiled as a module,
then the cnic module cannot be compiled as built-in as it depends on ipv6.
Made this check cleaner via Kconfig

Use simpler IS_ENABLED for CONFIG_VLAN_8021Q check

Signed-off-by: Anish Bhatt <anish@chelsio.com>
Acked-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Anish Bhatt authored and David S. Miller committed Sep 6, 2014
1 parent e793c0f commit c99d667
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/broadcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ config BNX2

config CNIC
tristate "QLogic CNIC support"
depends on PCI
depends on PCI && (IPV6 || IPV6=n)
select BNX2
select UIO
---help---
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/ethernet/broadcom/cnic.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <linux/if_vlan.h>
#include <linux/prefetch.h>
#include <linux/random.h>
#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
#if IS_ENABLED(CONFIG_VLAN_8021Q)
#define BCM_VLAN 1
#endif
#include <net/ip.h>
Expand Down Expand Up @@ -3685,7 +3685,7 @@ static int cnic_get_v4_route(struct sockaddr_in *dst_addr,
static int cnic_get_v6_route(struct sockaddr_in6 *dst_addr,
struct dst_entry **dst)
{
#if defined(CONFIG_IPV6) || (defined(CONFIG_IPV6_MODULE) && defined(MODULE))
#if IS_ENABLED(CONFIG_IPV6)
struct flowi6 fl6;

memset(&fl6, 0, sizeof(fl6));
Expand Down

0 comments on commit c99d667

Please sign in to comment.