mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2025-01-05 21:56:08 +00:00
Fix API change in kernel v4.15
In this kernel, the timer setup and handlers changed quite a bit.
This commit is contained in:
parent
1f817479ee
commit
998339a855
@ -1826,20 +1826,21 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
|
|||||||
mlmeext_set_scan_state(&padapter->mlmeextpriv, SCAN_DISABLE);
|
mlmeext_set_scan_state(&padapter->mlmeextpriv, SCAN_DISABLE);
|
||||||
|
|
||||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||||
|
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||||
|
_set_timer(&padapter->recvpriv.signal_stat_timer, padapter->recvpriv.signal_stat_sampling_interval);
|
||||||
|
#else
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret8;
|
return ret8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8 rtw_init_drv_sw(_adapter *padapter)
|
u8 rtw_init_drv_sw(_adapter *padapter)
|
||||||
{
|
{
|
||||||
|
|
||||||
u8 ret8 = _SUCCESS;
|
u8 ret8 = _SUCCESS;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
_rtw_init_listhead(&padapter->list);
|
_rtw_init_listhead(&padapter->list);
|
||||||
|
|
||||||
ret8 = rtw_init_default_value(padapter);
|
ret8 = rtw_init_default_value(padapter);
|
||||||
@ -1956,8 +1957,6 @@ u8 rtw_init_drv_sw(_adapter *padapter)
|
|||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ret8;
|
return ret8;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -2074,7 +2073,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
|
|||||||
|
|
||||||
rtw_hal_free_data(padapter);
|
rtw_hal_free_data(padapter);
|
||||||
|
|
||||||
|
|
||||||
/* free the old_pnetdev */
|
/* free the old_pnetdev */
|
||||||
if (padapter->rereg_nd_name_priv.old_pnetdev) {
|
if (padapter->rereg_nd_name_priv.old_pnetdev) {
|
||||||
free_netdev(padapter->rereg_nd_name_priv.old_pnetdev);
|
free_netdev(padapter->rereg_nd_name_priv.old_pnetdev);
|
||||||
@ -2278,7 +2276,6 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||||||
padapter->hw_port = HW_PORT1;
|
padapter->hw_port = HW_PORT1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/****** hook vir if into dvobj ******/
|
/****** hook vir if into dvobj ******/
|
||||||
pdvobjpriv = adapter_to_dvobj(padapter);
|
pdvobjpriv = adapter_to_dvobj(padapter);
|
||||||
padapter->iface_id = pdvobjpriv->iface_nums;
|
padapter->iface_id = pdvobjpriv->iface_nums;
|
||||||
@ -2296,7 +2293,6 @@ _adapter *rtw_drv_add_vir_if(_adapter *primary_padapter,
|
|||||||
if (rtw_init_drv_sw(padapter) != _SUCCESS)
|
if (rtw_init_drv_sw(padapter) != _SUCCESS)
|
||||||
goto free_drv_sw;
|
goto free_drv_sw;
|
||||||
|
|
||||||
|
|
||||||
/*get mac address from primary_padapter*/
|
/*get mac address from primary_padapter*/
|
||||||
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
|
||||||
|
|
||||||
@ -2777,7 +2773,6 @@ netdev_open_error:
|
|||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int rtw_ips_pwr_up(_adapter *padapter)
|
int rtw_ips_pwr_up(_adapter *padapter)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
@ -2841,7 +2836,6 @@ void rtw_ips_dev_unload(_adapter *padapter)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
|
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
@ -3302,7 +3296,6 @@ void rtw_dev_unload(PADAPTER padapter)
|
|||||||
|
|
||||||
rtw_intf_stop(padapter);
|
rtw_intf_stop(padapter);
|
||||||
|
|
||||||
|
|
||||||
if (!pwrctl->bInternalAutoSuspend)
|
if (!pwrctl->bInternalAutoSuspend)
|
||||||
rtw_stop_drv_threads(padapter);
|
rtw_stop_drv_threads(padapter);
|
||||||
|
|
||||||
@ -3317,7 +3310,6 @@ void rtw_dev_unload(PADAPTER padapter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* check the status of IPS */
|
/* check the status of IPS */
|
||||||
if (rtw_hal_check_ips_status(padapter) == _TRUE || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */
|
if (rtw_hal_check_ips_status(padapter) == _TRUE || pwrctl->rf_pwrstate == rf_off) { /* check HW status and SW state */
|
||||||
RTW_PRINT("%s: driver in IPS-FWLPS\n", __func__);
|
RTW_PRINT("%s: driver in IPS-FWLPS\n", __func__);
|
||||||
@ -3429,7 +3421,6 @@ int rtw_suspend_wow(_adapter *padapter)
|
|||||||
|
|
||||||
RTW_INFO("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
|
RTW_INFO("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
|
||||||
|
|
||||||
RTW_INFO("wowlan_mode: %d\n", pwrpriv->wowlan_mode);
|
RTW_INFO("wowlan_mode: %d\n", pwrpriv->wowlan_mode);
|
||||||
RTW_INFO("wowlan_pno_enable: %d\n", pwrpriv->wowlan_pno_enable);
|
RTW_INFO("wowlan_pno_enable: %d\n", pwrpriv->wowlan_pno_enable);
|
||||||
#ifdef CONFIG_P2P_WOWLAN
|
#ifdef CONFIG_P2P_WOWLAN
|
||||||
@ -3639,7 +3630,6 @@ int rtw_suspend_ap_wow(_adapter *padapter)
|
|||||||
}
|
}
|
||||||
#endif /* #ifdef CONFIG_AP_WOWLAN */
|
#endif /* #ifdef CONFIG_AP_WOWLAN */
|
||||||
|
|
||||||
|
|
||||||
int rtw_suspend_normal(_adapter *padapter)
|
int rtw_suspend_normal(_adapter *padapter)
|
||||||
{
|
{
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
@ -3658,7 +3648,6 @@ int rtw_suspend_normal(_adapter *padapter)
|
|||||||
|| (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off))
|
|| (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off))
|
||||||
RTW_PRINT("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __FUNCTION__);
|
RTW_PRINT("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __FUNCTION__);
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_CONCURRENT_MODE
|
#ifdef CONFIG_CONCURRENT_MODE
|
||||||
rtw_mi_buddy_dev_unload(padapter);
|
rtw_mi_buddy_dev_unload(padapter);
|
||||||
#endif
|
#endif
|
||||||
@ -3759,7 +3748,6 @@ int rtw_suspend_common(_adapter *padapter)
|
|||||||
} else
|
} else
|
||||||
rtw_suspend_normal(padapter);
|
rtw_suspend_normal(padapter);
|
||||||
|
|
||||||
|
|
||||||
RTW_PRINT("rtw suspend success in %d ms\n",
|
RTW_PRINT("rtw suspend success in %d ms\n",
|
||||||
rtw_get_passing_time_ms(start_time));
|
rtw_get_passing_time_ms(start_time));
|
||||||
|
|
||||||
@ -3841,7 +3829,6 @@ int rtw_resume_process_wow(_adapter *padapter)
|
|||||||
if (psta)
|
if (psta)
|
||||||
set_sta_rate(padapter, psta);
|
set_sta_rate(padapter, psta);
|
||||||
|
|
||||||
|
|
||||||
rtw_clr_drv_stopped(padapter);
|
rtw_clr_drv_stopped(padapter);
|
||||||
RTW_INFO("%s: wowmode resuming, DriverStopped:%s\n", __func__, rtw_is_drv_stopped(padapter) ? "True" : "False");
|
RTW_INFO("%s: wowmode resuming, DriverStopped:%s\n", __func__, rtw_is_drv_stopped(padapter) ? "True" : "False");
|
||||||
|
|
||||||
@ -3963,7 +3950,6 @@ int rtw_resume_process_ap_wow(_adapter *padapter)
|
|||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_LPS
|
#ifdef CONFIG_LPS
|
||||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
|
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
|
||||||
#endif /* CONFIG_LPS */
|
#endif /* CONFIG_LPS */
|
||||||
@ -4191,7 +4177,6 @@ int rtw_resume_common(_adapter *padapter)
|
|||||||
RTW_PRINT("%s:%d in %d ms\n", __FUNCTION__ , ret,
|
RTW_PRINT("%s:%d in %d ms\n", __FUNCTION__ , ret,
|
||||||
rtw_get_passing_time_ms(start_time));
|
rtw_get_passing_time_ms(start_time));
|
||||||
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user