mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-22 13:24:36 +00:00
Add support for network namespaces
This commit is contained in:
parent
2895761219
commit
0194d03956
@ -6316,6 +6316,9 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
||||
#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
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||
#endif
|
||||
|
||||
|
@ -1365,6 +1365,9 @@ int rtw_os_ndev_register(_adapter *adapter, 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 //defined(CONFIG_NET_NS)
|
||||
|
||||
/* Tell the network stack we exist */
|
||||
if (register_netdev(ndev) != 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user