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

From
Kalle Valo <kvalo@kernel.org>
Date
2022-05-17 04:37:07
Also in
linux-wireless
Reply to
Jakub Kicinski, 2022-05-16
Jakub Kicinski [off-list ref] writes:
Most protocol-specific pointers in struct net_device are under
a respective ifdef. Wireless is the notable exception. Since
there's a sizable number of custom-built kernels for datacenter
workloads which don't build wireless it seems reasonable to
ifdefy those pointers as well.

While at it move IPv4 and IPv6 pointers up, those are special
for obvious reasons.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
CC: johannes@sipsolutions.net
CC: alex.aring@gmail.com
CC: stefan@datenfreihafen.org
CC: <redacted>
CC: sw@simonwunderlich.de
CC: <redacted>
CC: sven@narfation.org
CC: <redacted>
CC: <redacted>
[...]
quoted hunk ↗ jump to hunk
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -8004,10 +8004,7 @@ int cfg80211_register_netdevice(struct net_device *dev);
  *
  * Requires the RTNL and wiphy mutex to be held.
  */
-static inline void cfg80211_unregister_netdevice(struct net_device *dev)
-{
-	cfg80211_unregister_wdev(dev->ieee80211_ptr);
-}
+void cfg80211_unregister_netdevice(struct net_device *dev);
 
 /**
  * struct cfg80211_ft_event_params - FT Information Elements
[...]
quoted hunk ↗ jump to hunk
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1374,6 +1374,12 @@ int cfg80211_register_netdevice(struct net_device *dev)
 }
 EXPORT_SYMBOL(cfg80211_register_netdevice);
 
+void cfg80211_unregister_netdevice(struct net_device *dev)
+{
+	cfg80211_unregister_wdev(dev->ieee80211_ptr);
+}
+EXPORT_SYMBOL(cfg80211_unregister_netdevice);
Why moving this to a proper function? Just curious, I couldn't figure it
out.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
Thread (14 messages) 14 messages, 7 authors, last reply 2022-05-17
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