vmnet: fix wireless device detection
Mainline commit c304eddcecfe ("net: wrap the wireless pointers in struct net_device in an ifdef") in 5.19-rc1 makess ieee80211_ptr member present in struct net_device only if CONFIG_CFG80211 is enabled. Do the same for the code testing its value in VNetBridgeIsDeviceWireless() to fix build against kernel with CONFIG_CFG80211 disabled. Functionally, this is equivalent to newly introduced wireless_group_needed() helper in upstream kernel code. We can use the same code also for older kernels as with CONFIG_CFG80211 disabled, the pointer should be null anyway.
This commit is contained in:
parent
6e536a375e
commit
a069c3055e
|
@ -809,10 +809,14 @@ static Bool
|
|||
VNetBridgeIsDeviceWireless(struct net_device *dev) //IN: sock
|
||||
{
|
||||
#if defined(CONFIG_WIRELESS_EXT)
|
||||
return dev->ieee80211_ptr != NULL || dev->wireless_handlers != NULL;
|
||||
#else
|
||||
return dev->ieee80211_ptr != NULL;
|
||||
if (dev->wireless_handlers)
|
||||
return true;
|
||||
#endif
|
||||
#if IS_ENABLED(CONFIG_CFG80211)
|
||||
if (dev->ieee80211_ptr)
|
||||
return true;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue