mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Updates for timer changes in kernel 4.15
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e472b5d684
commit
1f08a062ad
13 changed files with 196 additions and 7 deletions
|
@ -24,23 +24,47 @@
|
|||
#include <drv_types.h>
|
||||
#include <mlme_osdep.h>
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_join_timeout_handler (void *FunctionContext)
|
||||
#else
|
||||
void rtw_join_timeout_handler (struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct adapter *adapter = from_timer(adapter, t, mlmepriv.assoc_timer);
|
||||
#endif
|
||||
|
||||
_rtw_join_timeout_handler(adapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_scan_timeout_handler (void *FunctionContext)
|
||||
#else
|
||||
void _rtw_scan_timeout_handler (struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
|
||||
#endif
|
||||
|
||||
rtw_scan_timeout_handler(adapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _dynamic_check_timer_handlder(void *FunctionContext)
|
||||
#else
|
||||
static void _dynamic_check_timer_handlder(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct adapter *adapter = from_timer(adapter, t, mlmepriv.dynamic_chk_timer);
|
||||
#endif
|
||||
|
||||
if (adapter->registrypriv.mp_mode == 1)
|
||||
return;
|
||||
|
@ -52,9 +76,15 @@ void rtw_init_mlme_timer(struct adapter *padapter)
|
|||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter);
|
||||
_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
|
||||
_init_timer(&(pmlmepriv->dynamic_chk_timer), padapter->pnetdev, _dynamic_check_timer_handlder, padapter);
|
||||
#else
|
||||
timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0);
|
||||
timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0);
|
||||
timer_setup(&pmlmepriv->dynamic_chk_timer, _dynamic_check_timer_handlder, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_os_indicate_connect(struct adapter *adapter)
|
||||
|
@ -156,36 +186,69 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
|
|||
}
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _survey_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
static void _survey_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct adapter *padapter = from_timer(padapter, t, mlmeextpriv.survey_timer);
|
||||
#endif
|
||||
|
||||
survey_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _link_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
static void _link_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct adapter *padapter = from_timer(padapter, t, mlmeextpriv.link_timer);
|
||||
#endif
|
||||
link_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _addba_timer_hdl(void *FunctionContext)
|
||||
#else
|
||||
static void _addba_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct sta_info *psta = (struct sta_info *)FunctionContext;
|
||||
#else
|
||||
struct sta_info *psta = from_timer(psta, t, addba_retry_timer);
|
||||
#endif
|
||||
addba_timer_hdl(psta);
|
||||
}
|
||||
|
||||
void init_addba_retry_timer(struct adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta);
|
||||
#else
|
||||
timer_setup(&psta->addba_retry_timer, _addba_timer_hdl, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void init_mlme_ext_timer(struct adapter *padapter)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, _survey_timer_hdl, padapter);
|
||||
_init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter);
|
||||
#else
|
||||
timer_setup(&pmlmeext->survey_timer, _survey_timer_hdl, 0);
|
||||
timer_setup(&pmlmeext->link_timer, _link_timer_hdl, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_88EU_AP_MODE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue