Re: [PATCH net-next v2] net: ifdefy the wireless pointers in struct net_device

From
Sven Eckelmann <sven@narfation.org>
Date
2022-05-19 06:53:50
Also in
linux-wireless
Reply to
Jakub Kicinski, 2022-05-18
On Wednesday, 18 May 2022 20:18:07 CEST Jakub Kicinski wrote:
quoted hunk ↗ jump to hunk
diff --git a/net/batman-adv/hard-interface.c b/net/batman-adv/hard-interface.c
index 83fb51b6e299..b8f8da7ee3de 100644
--- a/net/batman-adv/hard-interface.c
+++ b/net/batman-adv/hard-interface.c
@@ -307,9 +307,11 @@ static bool batadv_is_cfg80211_netdev(struct net_device *net_device)
        if (!net_device)
                return false;
 
+#if IS_ENABLED(CONFIG_CFG80211)
        /* cfg80211 drivers have to set ieee80211_ptr */
        if (net_device->ieee80211_ptr)
                return true;
+#endif
 
        return false;
 }
Acked-by: Sven Eckelmann <sven@narfation.org>

Attachments

Thread (5 messages) 5 messages, 4 authors, last reply 2022-05-19
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help