diff mbox

netdevice: Support DSA tagging when DSA is built as a module

Message ID 20140913015950.26705.51106.stgit@ahduyck-workstation.home
State Superseded, archived
Delegated to: David Miller
Headers show

Commit Message

Alexander H Duyck Sept. 13, 2014, 1:59 a.m. UTC
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(-)


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Florian Fainelli Sept. 13, 2014, 10:06 a.m. UTC | #1
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
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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