1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-29 08:27:41 +00:00

do not remove device if it is not of type monitor

This commit is contained in:
kimocoder 2019-03-29 00:31:26 +01:00
parent cc869e3f33
commit 2c782c73b7
2 changed files with 6 additions and 2 deletions

View File

@ -105,7 +105,7 @@ CONFIG_PLATFORM_ARM_RPI = n
CONFIG_PLATFORM_ARM64_RPI = n CONFIG_PLATFORM_ARM64_RPI = n
CONFIG_PLATFORM_ANDROID_X86 = n CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_ARM_NETHUNTER = y CONFIG_PLATFORM_ARM_NETHUNTER = n
CONFIG_PLATFORM_JB_X86 = n CONFIG_PLATFORM_JB_X86 = n
CONFIG_PLATFORM_ARM_S3C2K4 = n CONFIG_PLATFORM_ARM_S3C2K4 = n
CONFIG_PLATFORM_ARM_PXA2XX = n CONFIG_PLATFORM_ARM_PXA2XX = n

View File

@ -4347,6 +4347,10 @@ static int cfg80211_rtw_del_virtual_intf(struct wiphy *wiphy,
pwdev_priv = adapter_wdev_data(adapter); pwdev_priv = adapter_wdev_data(adapter);
if (ndev == pwdev_priv->pmon_ndev) { if (ndev == pwdev_priv->pmon_ndev) {
/* unregister only monitor device
* because only monitor can be added
*/
if(wdev->iftype == NL80211_IFTYPE_MONITOR)
unregister_netdevice(ndev); unregister_netdevice(ndev);
pwdev_priv->pmon_ndev = NULL; pwdev_priv->pmon_ndev = NULL;
pwdev_priv->ifname_mon[0] = '\0'; pwdev_priv->ifname_mon[0] = '\0';