diff --git a/Makefile b/Makefile index e6dc559..a7ede49 100755 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ CONFIG_PCI_HCI = n CONFIG_SDIO_HCI = n CONFIG_GSPI_HCI = n ########################## Features ########################### +CONFIG_NET_NS=y CONFIG_MP_INCLUDED = y CONFIG_POWER_SAVING = y CONFIG_IPS_MODE = default diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index e12d4c6..7750fc3 100755 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -9799,6 +9799,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy) #endif #if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) +#if defined(CONFIG_NET_NS) + wiphy->flags |= WIPHY_FLAG_NETNS_OK; +#endif //CONFIG_NET_NS wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME; /* remove WIPHY_FLAG_OFFCHAN_TX, because we not support this feature */ diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index cd2d48b..8ca79d7 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -1916,6 +1916,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name) rtw_init_netdev_name(ndev, name); _rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); +#if defined(CONFIG_NET_NS) + dev_net_set(ndev, wiphy_net(adapter_to_wiphy(adapter))); +#endif //CONFIG_NET_NS /* Tell the network stack we exist */