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

From: Kalle Valo <[email-masked]>
Date: Tue, 17 May 2022 07:36:54 +0300

Jakub Kicinski <[email-masked]> 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 <[email-masked]>
> ---
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]
> CC: [email-masked]

[...]

> --- 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

[...]

> --- 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