* [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check
@ 2014-09-05 0:12 Anish Bhatt
2014-09-05 0:35 ` Anish Bhatt
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Anish Bhatt @ 2014-09-05 0:12 UTC (permalink / raw)
To: netdev
Cc: davem, jitendra.kalsaria, mchan, eddie.wai, randy.dunlap,
Anish Bhatt
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>
diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
index 7dcfb19..d8d07a8 100644
--- a/drivers/net/ethernet/broadcom/Kconfig
+++ b/drivers/net/ethernet/broadcom/Kconfig
@@ -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---
diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
index 27861a6..a6a9f28 100644
--- a/drivers/net/ethernet/broadcom/cnic.c
+++ b/drivers/net/ethernet/broadcom/cnic.c
@@ -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>
@@ -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));
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* RE: [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check
2014-09-05 0:12 [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check Anish Bhatt
@ 2014-09-05 0:35 ` Anish Bhatt
2014-09-05 1:18 ` Michael Chan
2014-09-06 3:47 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Anish Bhatt @ 2014-09-05 0:35 UTC (permalink / raw)
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, mchan@broadcom.com, eddie.wai@broadcom.com,
ameen.rahman@qlogic.com
Most of the people identified by get_maintainers.pl don't seem to be at the
script identified email addresses, modifying the cc list accordingly.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check
2014-09-05 0:12 [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check Anish Bhatt
2014-09-05 0:35 ` Anish Bhatt
@ 2014-09-05 1:18 ` Michael Chan
2014-09-06 3:47 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Michael Chan @ 2014-09-05 1:18 UTC (permalink / raw)
To: Anish Bhatt; +Cc: netdev, davem, jitendra.kalsaria, eddie.wai, randy.dunlap
On Thu, 2014-09-04 at 17:12 -0700, Anish Bhatt wrote:
> 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>
>
> diff --git a/drivers/net/ethernet/broadcom/Kconfig b/drivers/net/ethernet/broadcom/Kconfig
> index 7dcfb19..d8d07a8 100644
> --- a/drivers/net/ethernet/broadcom/Kconfig
> +++ b/drivers/net/ethernet/broadcom/Kconfig
> @@ -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---
> diff --git a/drivers/net/ethernet/broadcom/cnic.c b/drivers/net/ethernet/broadcom/cnic.c
> index 27861a6..a6a9f28 100644
> --- a/drivers/net/ethernet/broadcom/cnic.c
> +++ b/drivers/net/ethernet/broadcom/cnic.c
> @@ -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>
> @@ -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));
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check
2014-09-05 0:12 [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check Anish Bhatt
2014-09-05 0:35 ` Anish Bhatt
2014-09-05 1:18 ` Michael Chan
@ 2014-09-06 3:47 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2014-09-06 3:47 UTC (permalink / raw)
To: anish; +Cc: netdev, jitendra.kalsaria, mchan, eddie.wai, randy.dunlap
From: Anish Bhatt <anish@chelsio.com>
Date: Thu, 4 Sep 2014 17:12:57 -0700
> 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>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-06 4:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-05 0:12 [PATCH net] cnic : Cleanup CONFIG_IPV6 & VLAN check Anish Bhatt
2014-09-05 0:35 ` Anish Bhatt
2014-09-05 1:18 ` Michael Chan
2014-09-06 3:47 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox