mirror of
https://github.com/cilynx/rtl88x2bu
synced 2025-08-31 14:26:03 +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:
1
Makefile
1
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
|
||||
|
@@ -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 */
|
||||
|
@@ -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 */
|
||||
|
||||
|
Reference in New Issue
Block a user