mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-11-26 07:04:12 +00:00
Fix the Network Namespace (CONFIG_NET_NS) support
This commit is contained in:
parent
ecd3fdea37
commit
6deda60be2
@ -9546,6 +9546,9 @@ struct ieee80211_supported_band *band;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
|
#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;
|
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1726,9 +1726,11 @@ 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 //defined(CONFIG_NET_NS)
|
||||||
|
|
||||||
/* Tell the network stack we exist */
|
/* Tell the network stack we exist */
|
||||||
|
|
||||||
if (rtnl_lock_needed)
|
if (rtnl_lock_needed)
|
||||||
ret = (register_netdev(ndev) == 0) ? _SUCCESS : _FAIL;
|
ret = (register_netdev(ndev) == 0) ? _SUCCESS : _FAIL;
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user