]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
netdevice: Support DSA tagging when DSA is built as a module
authorAlexander Duyck <alexander.h.duyck@intel.com>
Sat, 13 Sep 2014 06:12:46 +0000 (23:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 13 Sep 2014 21:37:15 +0000 (17:37 -0400)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index ee38b948d9a0cf37b0a40185f09f3a082da7438a..f9e81d10a3b9704b409756fb98ce0e0a268dc1f9 100644 (file)
@@ -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