mirror of
https://github.com/chinawrj/rtl8812au
synced 2024-11-14 09:55:50 +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:
parent
62b52f686b
commit
1f817479ee
@ -18,7 +18,6 @@
|
|||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#define _OSDEP_SERVICE_C_
|
#define _OSDEP_SERVICE_C_
|
||||||
|
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
@ -32,7 +31,6 @@ atomic_t _malloc_size = ATOMIC_INIT(0);
|
|||||||
#endif
|
#endif
|
||||||
#endif /* DBG_MEMORY_LEAK */
|
#endif /* DBG_MEMORY_LEAK */
|
||||||
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_LINUX)
|
||||||
/*
|
/*
|
||||||
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
|
||||||
@ -998,20 +996,15 @@ void rtw_list_insert_tail(_list *plist, _list *phead)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||||
void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc)
|
void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc)
|
||||||
{
|
{
|
||||||
_adapter *adapter = (_adapter *)padapter;
|
_adapter *adapter = (_adapter *)padapter;
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
_init_timer(ptimer, adapter->pnetdev, pfunc, adapter);
|
_init_timer(ptimer, adapter->pnetdev, pfunc, adapter);
|
||||||
#endif
|
|
||||||
#ifdef PLATFORM_FREEBSD
|
|
||||||
_init_timer(ptimer, adapter->pifp, pfunc, adapter->mlmepriv.nic_hdl);
|
|
||||||
#endif
|
|
||||||
#ifdef PLATFORM_WINDOWS
|
|
||||||
_init_timer(ptimer, adapter->hndis_adapter, pfunc, adapter->mlmepriv.nic_hdl);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
||||||
@ -1019,7 +1012,6 @@ Caller must check if the list is empty before calling rtw_list_delete
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void _rtw_init_sema(_sema *sema, int init_val)
|
void _rtw_init_sema(_sema *sema, int init_val)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1212,7 +1204,6 @@ void rtw_mtx_unlock(_lock *plock)
|
|||||||
}
|
}
|
||||||
#endif /* PLATFORM_FREEBSD */
|
#endif /* PLATFORM_FREEBSD */
|
||||||
|
|
||||||
|
|
||||||
void _rtw_spinlock(_lock *plock)
|
void _rtw_spinlock(_lock *plock)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1288,8 +1279,6 @@ void _rtw_spinunlock_ex(_lock *plock)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void _rtw_init_queue(_queue *pqueue)
|
void _rtw_init_queue(_queue *pqueue)
|
||||||
{
|
{
|
||||||
_rtw_init_listhead(&(pqueue->queue));
|
_rtw_init_listhead(&(pqueue->queue));
|
||||||
@ -1389,7 +1378,6 @@ inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_sleep_schedulable(int ms)
|
void rtw_sleep_schedulable(int ms)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1420,7 +1408,6 @@ void rtw_sleep_schedulable(int ms)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void rtw_msleep_os(int ms)
|
void rtw_msleep_os(int ms)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1445,7 +1432,6 @@ void rtw_msleep_os(int ms)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void rtw_usleep_os(int us)
|
void rtw_usleep_os(int us)
|
||||||
{
|
{
|
||||||
@ -1474,10 +1460,8 @@ void rtw_usleep_os(int us)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef DBG_DELAY_OS
|
#ifdef DBG_DELAY_OS
|
||||||
void _rtw_mdelay_os(int ms, const char *func, const int line)
|
void _rtw_mdelay_os(int ms, const char *func, const int line)
|
||||||
{
|
{
|
||||||
@ -1488,7 +1472,6 @@ void _rtw_mdelay_os(int ms, const char *func, const int line)
|
|||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
RTW_INFO("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
|
RTW_INFO("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms);
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_LINUX)
|
||||||
@ -1501,7 +1484,6 @@ void _rtw_mdelay_os(int ms, const char *func, const int line)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void _rtw_udelay_os(int us, const char *func, const int line)
|
void _rtw_udelay_os(int us, const char *func, const int line)
|
||||||
{
|
{
|
||||||
@ -1517,7 +1499,6 @@ void _rtw_udelay_os(int us, const char *func, const int line)
|
|||||||
|
|
||||||
RTW_INFO("%s:%d %s(%d)\n", func, line, __FUNCTION__, us);
|
RTW_INFO("%s:%d %s(%d)\n", func, line, __FUNCTION__, us);
|
||||||
|
|
||||||
|
|
||||||
#if defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_LINUX)
|
||||||
|
|
||||||
udelay((unsigned long)us);
|
udelay((unsigned long)us);
|
||||||
@ -1548,7 +1529,6 @@ void rtw_mdelay_os(int ms)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
void rtw_udelay_os(int us)
|
void rtw_udelay_os(int us)
|
||||||
{
|
{
|
||||||
@ -1872,7 +1852,6 @@ inline int ATOMIC_DEC_RETURN(ATOMIC_T *v)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef PLATFORM_LINUX
|
#ifdef PLATFORM_LINUX
|
||||||
/*
|
/*
|
||||||
* Open a file with the specific @param path, @param flag, @param mode
|
* Open a file with the specific @param path, @param flag, @param mode
|
||||||
@ -2280,7 +2259,6 @@ copy_to_user(void *to, const void *from, unsigned long n)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The usb_register and usb_deregister functions are used to register
|
* The usb_register and usb_deregister functions are used to register
|
||||||
* usb drivers with the usb subsystem. In this compatibility layer
|
* usb drivers with the usb subsystem. In this compatibility layer
|
||||||
@ -2296,7 +2274,6 @@ usb_register(struct usb_driver *driver)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
usb_deregister(struct usb_driver *driver)
|
usb_deregister(struct usb_driver *driver)
|
||||||
{
|
{
|
||||||
@ -2412,7 +2389,6 @@ keep_ori:
|
|||||||
rtw_mfree(ori, ori_len);
|
rtw_mfree(ori, ori_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* rtw_cbuf_full - test if cbuf is full
|
* rtw_cbuf_full - test if cbuf is full
|
||||||
* @cbuf: pointer of struct rtw_cbuf
|
* @cbuf: pointer of struct rtw_cbuf
|
||||||
|
Loading…
Reference in New Issue
Block a user