mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-07-18 01:59:04 +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
|
@ -1611,13 +1611,12 @@ static int rtw_wx_get_essid(struct net_device *dev,
|
|||
if ((check_fwstate(pmlmepriv, _FW_LINKED)) ||
|
||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))) {
|
||||
len = pcur_bss->Ssid.SsidLength;
|
||||
memcpy(extra, pcur_bss->Ssid.Ssid, len);
|
||||
} else {
|
||||
len = 0;
|
||||
*extra = 0;
|
||||
}
|
||||
wrqu->essid.length = len;
|
||||
|
||||
memcpy(extra, pcur_bss->Ssid.Ssid, len);
|
||||
|
||||
wrqu->essid.flags = 1;
|
||||
|
||||
exit:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -242,11 +242,19 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
|
|||
(unsigned char *)precvbuf);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void _rtw_reordering_ctrl_timeout_handler(void *func_context)
|
||||
#else
|
||||
static void _rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
struct recv_reorder_ctrl *preorder_ctrl;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
preorder_ctrl = (struct recv_reorder_ctrl *)func_context;
|
||||
#else
|
||||
preorder_ctrl = from_timer(preorder_ctrl, t, reordering_ctrl_timer);
|
||||
#endif
|
||||
rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
|
||||
}
|
||||
|
||||
|
@ -254,5 +262,9 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
|
|||
{
|
||||
struct adapter *padapter = preorder_ctrl->padapter;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
|
||||
#else
|
||||
timer_setup(&preorder_ctrl->reordering_ctrl_timer, _rtw_reordering_ctrl_timeout_handler, 0);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue