mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: Fix some build problems
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
2d546792fc
commit
add1bba8bc
3 changed files with 25 additions and 5 deletions
|
@ -1829,9 +1829,9 @@ static void traffic_status_watchdog(struct adapter *padapter)
|
|||
if (((pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod +
|
||||
pmlmepriv->LinkDetectInfo.NumTxOkInPeriod) > 8 ) ||
|
||||
(pmlmepriv->LinkDetectInfo.NumRxUnicastOkInPeriod > 2))
|
||||
bEnterPS = false;
|
||||
else
|
||||
bEnterPS = true;
|
||||
bEnterPS = false;
|
||||
else
|
||||
bEnterPS = true;
|
||||
|
||||
/* LeisurePS only work in infra mode. */
|
||||
if (bEnterPS)
|
||||
|
|
|
@ -309,9 +309,19 @@ exit:
|
|||
return;
|
||||
}
|
||||
|
||||
static void pwr_state_check_handler(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void pwr_state_check_handler(RTW_TIMER_HDL_ARGS)
|
||||
#else
|
||||
void pwr_state_check_handler(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||
#else
|
||||
struct dvobj_priv *dvobj = from_timer(dvobj, t, pwrctl_priv.pwr_state_check_timer);
|
||||
struct adapter *padapter = dvobj->
|
||||
#endif
|
||||
|
||||
rtw_ps_cmd(padapter);
|
||||
}
|
||||
|
||||
|
@ -693,7 +703,11 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
|||
|
||||
pwrctrlpriv->btcoex_rfon = false;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&(pwrctrlpriv->pwr_state_check_timer), padapter->pnetdev, pwr_state_check_handler, (u8 *)padapter);
|
||||
#else
|
||||
timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
#ifndef __OSDEP_SERVICE_H_
|
||||
#define __OSDEP_SERVICE_H_
|
||||
|
||||
#include <linux/version.h>
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
|
||||
#include <linux/sched/signal.h>
|
||||
#endif
|
||||
#include <drv_conf.h>
|
||||
#include <basic_types.h>
|
||||
|
||||
|
@ -202,12 +206,14 @@ __inline static void rtw_list_delete(struct list_head *plist)
|
|||
list_del_init(plist);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
__inline static void _init_timer(struct timer_list *ptimer,struct net_device * nic_hdl,void *pfunc,void* cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->data = (unsigned long)cntx;
|
||||
init_timer(ptimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
__inline static void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue