From 761f1d94a50104edd0907c70a7085d8160c3b339 Mon Sep 17 00:00:00 2001 From: Daan van Gorkum Date: Sat, 9 May 2020 16:03:35 +0800 Subject: [PATCH] Bugfix: Phy cannot be moved into another namespace When CONFIG_NET_NS is enabled one would assume the device can be moved into another namespace. Currently it will fail with: command failed: Operation not supported (-95) There's a check if the kernel is between 2.6.38 and 3.0.0 before it adds the netns flag to wiphy->flags. With this commit it will always add the netns flag when CONFIG_NET_NS is enabled. Signed-off-by: Daan van Gorkum Fixes: https://github.com/aircrack-ng/rtl8812au/issues/518 --- os_dep/linux/ioctl_cfg80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 610c32a..fe7374d 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -9614,10 +9614,10 @@ struct ieee80211_supported_band *band; wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(BAND_ON_5G); #endif -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) #if defined(CONFIG_NET_NS) wiphy->flags |= WIPHY_FLAG_NETNS_OK; #endif //CONFIG_NET_NS +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0)) wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS; #endif