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

Fix problem where interfaces are down at start

This commit is contained in:
kimocoder 2019-11-11 03:54:59 +01:00
parent 968d16bb56
commit 7b0ba5a1ca

View File

@ -2786,6 +2786,8 @@ static int netdev_vir_if_close(struct net_device *pnetdev)
#endif #endif
#ifdef CONFIG_IOCTL_CFG80211 #ifdef CONFIG_IOCTL_CFG80211
wdev->iftype = NL80211_IFTYPE_MONITOR;
wdev->current_bss = NULL;
rtw_scan_abort(padapter); rtw_scan_abort(padapter);
rtw_cfg80211_wait_scan_req_empty(padapter, 200); rtw_cfg80211_wait_scan_req_empty(padapter, 200);
adapter_wdev_data(padapter)->bandroid_scan = _FALSE; adapter_wdev_data(padapter)->bandroid_scan = _FALSE;
@ -3314,7 +3316,7 @@ int _netdev_open(struct net_device *pnetdev)
} }
#endif /*CONFIG_AUTOSUSPEND*/ #endif /*CONFIG_AUTOSUSPEND*/
if (!rtw_is_hw_init_completed(padapter)) { // ips if (!rtw_is_hw_init_completed(padapter)) { // ips
rtw_clr_surprise_removed(padapter); rtw_clr_surprise_removed(padapter);
rtw_clr_drv_stopped(padapter); rtw_clr_drv_stopped(padapter);
RTW_ENABLE_FUNC(padapter, DF_RX_BIT); RTW_ENABLE_FUNC(padapter, DF_RX_BIT);
@ -3412,12 +3414,14 @@ int _netdev_open(struct net_device *pnetdev)
{ {
uint status; uint status;
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev); _adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
#ifdef CONFIG_IOCTL_CFG80211
struct wireless_dev *wdev = padapter->rtw_wdev;
#endif
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
#ifdef CONFIG_BT_COEXIST_SOCKET_TRX #ifdef CONFIG_BT_COEXIST_SOCKET_TRX
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup); RTW_INFO(FUNC_NDEV_FMT" , bup=%d\n", FUNC_NDEV_ARG(pnetdev), padapter->bup);
padapter->netif_up = _TRUE; padapter->netif_up = _TRUE;
@ -3515,7 +3519,6 @@ int _netdev_open(struct net_device *pnetdev)
RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n"); RTW_INFO("CONFIG_BT_COEXIST: VIRTUAL_ADAPTER\n");
#endif /* CONFIG_BT_COEXIST_SOCKET_TRX */ #endif /* CONFIG_BT_COEXIST_SOCKET_TRX */
netdev_open_normal_process: netdev_open_normal_process:
#ifdef CONFIG_CONCURRENT_MODE #ifdef CONFIG_CONCURRENT_MODE