2
0
mirror of https://github.com/cilynx/rtl88x2bu synced 2025-08-31 22:35:44 +00:00

Support for network namespaces

- Make configuration parameter
    - Add WIPHY_FLAG_NETNS_OK if linux kernel >= 3.3.0
This commit is contained in:
Max Görner
2021-03-08 20:30:24 +01:00
parent e4704d8a4f
commit f50e14e4de
3 changed files with 7 additions and 0 deletions

View File

@@ -46,6 +46,7 @@ CONFIG_PCI_HCI = n
CONFIG_SDIO_HCI = n CONFIG_SDIO_HCI = n
CONFIG_GSPI_HCI = n CONFIG_GSPI_HCI = n
########################## Features ########################### ########################## Features ###########################
CONFIG_NET_NS=y
CONFIG_MP_INCLUDED = y CONFIG_MP_INCLUDED = y
CONFIG_POWER_SAVING = y CONFIG_POWER_SAVING = y
CONFIG_IPS_MODE = default CONFIG_IPS_MODE = default

View File

@@ -9799,6 +9799,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
#endif #endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 3, 0)) #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_HAS_REMAIN_ON_CHANNEL;
wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME; wiphy->flags |= WIPHY_FLAG_HAVE_AP_SME;
/* remove WIPHY_FLAG_OFFCHAN_TX, because we not support this feature */ /* remove WIPHY_FLAG_OFFCHAN_TX, because we not support this feature */

View File

@@ -1916,6 +1916,9 @@ int rtw_os_ndev_register(_adapter *adapter, const char *name)
rtw_init_netdev_name(ndev, name); rtw_init_netdev_name(ndev, name);
_rtw_memcpy(ndev->dev_addr, adapter_mac_addr(adapter), ETH_ALEN); _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 */ /* Tell the network stack we exist */