mirror of
https://github.com/amazingfate/rtl8723ds.git
synced 2026-01-29 06:13:23 +00:00
rtl8723ds: Update source for recent API changes
The source will now compile on kernels up to 4.20. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
@@ -542,7 +542,11 @@ u32 halbtcoutsrc_GetWifiLinkStatus(PBTC_COEXIST pBtCoexist)
|
||||
return retVal;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void _btmpoper_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
static void _btmpoper_timer_hdl(void *p)
|
||||
#endif
|
||||
{
|
||||
if (GLBtcBtMpRptWait) {
|
||||
GLBtcBtMpRptWait = 0;
|
||||
@@ -2411,7 +2415,11 @@ u8 EXhalbtcoutsrc_InitlizeVariables(void *padapter)
|
||||
/* BT Control H2C/C2H*/
|
||||
GLBtcBtMpOperSeq = 0;
|
||||
_rtw_mutex_init(&GLBtcBtMpOperLock);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&GLBtcBtMpOperTimer, _btmpoper_timer_hdl, 0);
|
||||
#else
|
||||
_init_timer(&GLBtcBtMpOperTimer, ((PADAPTER)padapter)->pnetdev, _btmpoper_timer_hdl, pBtCoexist);
|
||||
#endif
|
||||
_rtw_init_sema(&GLBtcBtMpRptSema, 0);
|
||||
GLBtcBtMpRptSeq = 0;
|
||||
GLBtcBtMpRptStatus = 0;
|
||||
|
||||
@@ -823,9 +823,17 @@ void BlinkHandler(PLED_SDIO pLed)
|
||||
* Callback function of LED BlinkTimer,
|
||||
* it just schedules to corresponding BlinkWorkItem/led_blink_hdl
|
||||
* */
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void BlinkTimerCallback(struct timer_list *t)
|
||||
#else
|
||||
void BlinkTimerCallback(void *data)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
PLED_SDIO pLed = from_timer(pLed, t, BlinkTimer);
|
||||
#else
|
||||
PLED_SDIO pLed = (PLED_SDIO)data;
|
||||
#endif
|
||||
_adapter *padapter = pLed->padapter;
|
||||
|
||||
/* RTW_INFO("%s\n", __FUNCTION__); */
|
||||
@@ -1994,8 +2002,11 @@ InitLed(
|
||||
|
||||
ResetLedStatus(pLed);
|
||||
|
||||
_init_timer(&(pLed->BlinkTimer), padapter->pnetdev, BlinkTimerCallback, pLed);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0);
|
||||
#else
|
||||
_init_timer(&pLed->BlinkTimer, padapter->pnetdev, linkTimerCallback, pLed);
|
||||
#endif
|
||||
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||
}
|
||||
|
||||
|
||||
@@ -5306,8 +5306,12 @@ ODM_AntDivTimers(
|
||||
if(state==INIT_ANTDIV_TIMMER)
|
||||
{
|
||||
#ifdef CONFIG_S0S1_SW_ANTENNA_DIVERSITY
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
setup_timer(&pDM_Odm->DM_SWAT_Table.phydm_SwAntennaSwitchTimer, ODM_SW_AntDiv_Callback, 0)
|
||||
#else
|
||||
ODM_InitializeTimer(pDM_Odm, &(pDM_Odm->DM_SWAT_Table.phydm_SwAntennaSwitchTimer),
|
||||
(RT_TIMER_CALL_BACK)ODM_SW_AntDiv_Callback, NULL, "phydm_SwAntennaSwitchTimer");
|
||||
#endif
|
||||
#elif ( defined(CONFIG_5G_CG_SMART_ANT_DIVERSITY) ) ||( defined(CONFIG_2G_CG_SMART_ANT_DIVERSITY) )
|
||||
ODM_InitializeTimer(pDM_Odm,&pDM_Odm->FastAntTrainingTimer,
|
||||
(RT_TIMER_CALL_BACK)odm_FastAntTrainingCallback, NULL, "FastAntTrainingTimer");
|
||||
|
||||
@@ -561,6 +561,7 @@ ODM_SetTimer(
|
||||
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
VOID
|
||||
ODM_InitializeTimer(
|
||||
IN PDM_ODM_T pDM_Odm,
|
||||
@@ -570,20 +571,10 @@ ODM_InitializeTimer(
|
||||
IN const char* szID
|
||||
)
|
||||
{
|
||||
#if (DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||
init_timer(pTimer);
|
||||
pTimer->function = CallBackFunc;
|
||||
pTimer->data = (unsigned long)pDM_Odm;
|
||||
/*mod_timer(pTimer, jiffies+RTL_MILISECONDS_TO_JIFFIES(10)); */
|
||||
#elif(DM_ODM_SUPPORT_TYPE & ODM_CE)
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
_init_timer(pTimer,Adapter->pnetdev,CallBackFunc,pDM_Odm);
|
||||
#elif(DM_ODM_SUPPORT_TYPE & ODM_WIN)
|
||||
PADAPTER Adapter = pDM_Odm->Adapter;
|
||||
PlatformInitializeTimer(Adapter, pTimer, CallBackFunc,pContext,szID);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
VOID
|
||||
ODM_CancelTimer(
|
||||
|
||||
Reference in New Issue
Block a user