All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] netdevice: Support DSA tagging when DSA is built as a module
@ 2014-09-13  1:59 Alexander Duyck
  2014-09-13 10:06 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Duyck @ 2014-09-13  1:59 UTC (permalink / raw)
  To: netdev; +Cc: f.fainelli, davem, kernel

This change corrects an error seen when DSA tagging is built as a module.
Without this change it is not possible to get XDSA tagged frames as the
test for tagging is stripped by the #ifdef check.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
---
 include/linux/netdevice.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index ba72f6b..c8f3806 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1789,7 +1789,7 @@ void dev_net_set(struct net_device *dev, struct net *net)
 
 static inline bool netdev_uses_dsa(struct net_device *dev)
 {
-#ifdef CONFIG_NET_DSA
+#if IS_ENABLED(CONFIG_NET_DSA)
 	if (dev->dsa_ptr != NULL)
 		return dsa_uses_tagged_protocol(dev->dsa_ptr);
 #endif

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] netdevice: Support DSA tagging when DSA is built as a module
  2014-09-13  1:59 [PATCH] netdevice: Support DSA tagging when DSA is built as a module Alexander Duyck
@ 2014-09-13 10:06 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2014-09-13 10:06 UTC (permalink / raw)
  To: Alexander Duyck, netdev; +Cc: davem, kernel

Le 12/09/2014 18:59, Alexander Duyck a écrit :
> This change corrects an error seen when DSA tagging is built as a module.
> Without this change it is not possible to get XDSA tagged frames as the
> test for tagging is stripped by the #ifdef check.
>
> Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>

> ---
>   include/linux/netdevice.h |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index ba72f6b..c8f3806 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1789,7 +1789,7 @@ void dev_net_set(struct net_device *dev, struct net *net)
>
>   static inline bool netdev_uses_dsa(struct net_device *dev)
>   {
> -#ifdef CONFIG_NET_DSA
> +#if IS_ENABLED(CONFIG_NET_DSA)
>   	if (dev->dsa_ptr != NULL)
>   		return dsa_uses_tagged_protocol(dev->dsa_ptr);
>   #endif
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-09-13  3:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-13  1:59 [PATCH] netdevice: Support DSA tagging when DSA is built as a module Alexander Duyck
2014-09-13 10:06 ` Florian Fainelli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.