qcacmn: Add new cfg80211 wrapper for registering net device
Add a new wrapper wlan_cfg80211_register_netdevice() that calls cfg80211_register_netdevice for Kernel 5.12+. Change-Id: I17655f1e3123d663d25b9dfc82e7c6f737486391 CRs-Fixed: 3133310
This commit is contained in:

committed by
Madan Koyyalamudi

parent
f4a25a4af0
commit
51637c64bb
@@ -473,4 +473,29 @@ wlan_cfg80211_nla_strscpy(char *dst, const struct nlattr *nla, size_t dstsize)
|
||||
return nla_strscpy(dst, nla, dstsize);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
static inline int wlan_cfg80211_register_netdevice(struct net_device *dev)
|
||||
{
|
||||
return cfg80211_register_netdevice(dev);
|
||||
}
|
||||
#else
|
||||
static inline int wlan_cfg80211_register_netdevice(struct net_device *dev)
|
||||
{
|
||||
return register_netdevice(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0)
|
||||
static inline void wlan_cfg80211_unregister_netdevice(struct net_device *dev)
|
||||
{
|
||||
cfg80211_unregister_netdevice(dev);
|
||||
}
|
||||
#else
|
||||
static inline void wlan_cfg80211_unregister_netdevice(struct net_device *dev)
|
||||
{
|
||||
unregister_netdevice(dev);
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user