1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-26 15:14:02 +00:00

A fix to avoid freeze on unplugging adapter

This commit is contained in:
kimocoder 2019-11-11 02:54:47 +01:00
parent bcd541ad4d
commit ad32b0d9a8
2 changed files with 5 additions and 11 deletions

View File

@ -28,11 +28,9 @@
#define CONFIG_USB_HCI #define CONFIG_USB_HCI
#define PLATFORM_LINUX #define PLATFORM_LINUX
#define CONFIG_IOCTL_CFG80211 1
/* #define CONFIG_IOCTL_CFG80211 1 */
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
/* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */ /* #define RTW_USE_CFG80211_STA_EVENT */ /* Indecate new sta asoc through cfg80211_new_sta */

View File

@ -1763,10 +1763,6 @@ void rtw_os_ndev_unregister(_adapter *adapter)
netdev = adapter->pnetdev; netdev = adapter->pnetdev;
#if defined(CONFIG_IOCTL_CFG80211)
rtw_cfg80211_ndev_res_unregister(adapter);
#endif
if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) { if ((adapter->DriverState != DRIVER_DISAPPEAR) && netdev) {
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj); u8 rtnl_lock_needed = rtw_rtnl_lock_needed(dvobj);
@ -1776,6 +1772,9 @@ void rtw_os_ndev_unregister(_adapter *adapter)
else else
unregister_netdevice(netdev); unregister_netdevice(netdev);
} }
#if defined(CONFIG_IOCTL_CFG80211)
rtw_cfg80211_ndev_res_unregister(adapter);
#endif
#if defined(CONFIG_IOCTL_CFG80211) && !defined(RTW_SINGLE_WIPHY) #if defined(CONFIG_IOCTL_CFG80211) && !defined(RTW_SINGLE_WIPHY)
#ifdef CONFIG_RFKILL_POLL #ifdef CONFIG_RFKILL_POLL
@ -2055,10 +2054,8 @@ u8 rtw_init_default_value(_adapter *padapter)
psecuritypriv->dot118021x_bmc_cam_id = INVALID_SEC_MAC_CAM_ID; psecuritypriv->dot118021x_bmc_cam_id = INVALID_SEC_MAC_CAM_ID;
#endif #endif
/* pwrctrl_priv */ /* pwrctrl_priv */
/* registry_priv */ /* registry_priv */
rtw_init_registrypriv_dev_network(padapter); rtw_init_registrypriv_dev_network(padapter);
rtw_update_registrypriv_dev_network(padapter); rtw_update_registrypriv_dev_network(padapter);
@ -2198,7 +2195,6 @@ struct dvobj_priv *devobj_init(void)
pdvobj->en_napi_dynamic = 0; pdvobj->en_napi_dynamic = 0;
#endif /* CONFIG_RTW_NAPI_DYNAMIC */ #endif /* CONFIG_RTW_NAPI_DYNAMIC */
#ifdef CONFIG_RTW_TPT_MODE #ifdef CONFIG_RTW_TPT_MODE
pdvobj->tpt_mode = 0; pdvobj->tpt_mode = 0;
pdvobj->edca_be_ul = 0x5ea42b; pdvobj->edca_be_ul = 0x5ea42b;