1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2025-01-03 21:04:05 +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:
Christian B 2017-12-06 19:53:59 +01:00 committed by GitHub
parent 1f817479ee
commit 998339a855
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1826,20 +1826,21 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
mlmeext_set_scan_state(&padapter->mlmeextpriv, SCAN_DISABLE);
#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);
#endif
#endif
return ret8;
}
u8 rtw_init_drv_sw(_adapter *padapter)
{
u8 ret8 = _SUCCESS;
_rtw_init_listhead(&padapter->list);
ret8 = rtw_init_default_value(padapter);
@ -1956,8 +1957,6 @@ u8 rtw_init_drv_sw(_adapter *padapter)
exit:
return ret8;
}
@ -2074,7 +2073,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
rtw_hal_free_data(padapter);
/* free the old_pnetdev */
if (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;
#endif
/****** hook vir if into dvobj ******/
pdvobjpriv = adapter_to_dvobj(padapter);
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)
goto free_drv_sw;
/*get mac address from primary_padapter*/
_rtw_memcpy(mac, adapter_mac_addr(primary_padapter), ETH_ALEN);
@ -2777,7 +2773,6 @@ netdev_open_error:
return _FAIL;
}
int rtw_ips_pwr_up(_adapter *padapter)
{
int result;
@ -2841,7 +2836,6 @@ void rtw_ips_dev_unload(_adapter *padapter)
}
int pm_netdev_open(struct net_device *pnetdev, u8 bnormal)
{
int status = 0;
@ -3302,7 +3296,6 @@ void rtw_dev_unload(PADAPTER padapter)
rtw_intf_stop(padapter);
if (!pwrctl->bInternalAutoSuspend)
rtw_stop_drv_threads(padapter);
@ -3317,7 +3310,6 @@ void rtw_dev_unload(PADAPTER padapter)
}
}
/* check the status of IPS */
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__);
@ -3429,7 +3421,6 @@ int rtw_suspend_wow(_adapter *padapter)
RTW_INFO("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
RTW_INFO("wowlan_mode: %d\n", pwrpriv->wowlan_mode);
RTW_INFO("wowlan_pno_enable: %d\n", pwrpriv->wowlan_pno_enable);
#ifdef CONFIG_P2P_WOWLAN
@ -3639,7 +3630,6 @@ int rtw_suspend_ap_wow(_adapter *padapter)
}
#endif /* #ifdef CONFIG_AP_WOWLAN */
int rtw_suspend_normal(_adapter *padapter)
{
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -3658,7 +3648,6 @@ int rtw_suspend_normal(_adapter *padapter)
|| (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_off))
RTW_PRINT("%s: ### ERROR #### driver in IPS ####ERROR###!!!\n", __FUNCTION__);
#ifdef CONFIG_CONCURRENT_MODE
rtw_mi_buddy_dev_unload(padapter);
#endif
@ -3759,7 +3748,6 @@ int rtw_suspend_common(_adapter *padapter)
} else
rtw_suspend_normal(padapter);
RTW_PRINT("rtw suspend success in %d ms\n",
rtw_get_passing_time_ms(start_time));
@ -3841,7 +3829,6 @@ int rtw_resume_process_wow(_adapter *padapter)
if (psta)
set_sta_rate(padapter, psta);
rtw_clr_drv_stopped(padapter);
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;
}
#ifdef CONFIG_LPS
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "AP-WOWLAN");
#endif /* CONFIG_LPS */
@ -4191,7 +4177,6 @@ int rtw_resume_common(_adapter *padapter)
RTW_PRINT("%s:%d in %d ms\n", __FUNCTION__ , ret,
rtw_get_passing_time_ms(start_time));
return ret;
}