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:
@@ -339,14 +339,18 @@ static const struct ieee80211_txrx_stypes
|
||||
|
||||
static u64 rtw_get_systime_us(void)
|
||||
{
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 20, 0))
|
||||
ktime_t ts;
|
||||
ts = ktime_get_boottime();
|
||||
return do_div(ts, 1000);
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39))
|
||||
struct timespec ts;
|
||||
get_monotonic_boottime(&ts);
|
||||
return ((u64)ts.tv_sec * 1000000) + ts.tv_nsec / 1000;
|
||||
return ((u64)ts.tv_sec*1000000) + ts.tv_nsec / 1000;
|
||||
#else
|
||||
struct timeval tv;
|
||||
do_gettimeofday(&tv);
|
||||
return ((u64)tv.tv_sec * 1000000) + tv.tv_usec;
|
||||
return ((u64)tv.tv_sec*1000000) + tv.tv_usec;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,10 @@ int rtw_mp_write_reg(struct net_device *dev,
|
||||
u32 addr, data;
|
||||
int ret;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
@@ -130,7 +133,7 @@ int rtw_mp_read_reg(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
char *pch, *pnext, *ptmp;
|
||||
char *width_str;
|
||||
char width;
|
||||
@@ -139,7 +142,6 @@ int rtw_mp_read_reg(struct net_device *dev,
|
||||
u32 i = 0, j = 0, ret = 0, data32 = 0;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
@@ -262,8 +264,10 @@ int rtw_mp_write_rf(struct net_device *dev,
|
||||
u32 path, addr, data;
|
||||
int ret;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
_rtw_memset(input, 0, wrqu->length);
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
@@ -304,7 +308,7 @@ int rtw_mp_read_rf(struct net_device *dev,
|
||||
struct iw_request_info *info,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
char *pch, *pnext, *ptmp;
|
||||
char data[20], tmp[20], buf[3];
|
||||
u32 path, addr, strtou;
|
||||
@@ -455,10 +459,13 @@ int rtw_mp_rate(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
u32 rate = MPT_RATE_1M;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
PMPT_CONTEXT pMptCtx = &(padapter->mppriv.MptCtx);
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -503,10 +510,13 @@ int rtw_mp_channel(struct net_device *dev,
|
||||
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
u32 channel = 1;
|
||||
int cur_ch_offset;
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -531,7 +541,10 @@ int rtw_mp_bandwidth(struct net_device *dev,
|
||||
int cur_ch_offset;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
@@ -564,7 +577,7 @@ int rtw_mp_txpower_index(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
u32 rfpath;
|
||||
u32 txpower_inx;
|
||||
|
||||
@@ -589,11 +602,14 @@ int rtw_mp_txpower(struct net_device *dev,
|
||||
{
|
||||
u32 idx_a = 0, idx_b = 0, idx_c = 0, idx_d = 0, status = 0;
|
||||
int MsetPower = 1;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
PMPT_CONTEXT pMptCtx = &(padapter->mppriv.MptCtx);
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -627,11 +643,14 @@ int rtw_mp_ant_tx(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
u8 i;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
u16 antenna = 0;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -673,10 +692,13 @@ int rtw_mp_ant_rx(struct net_device *dev,
|
||||
{
|
||||
u8 i;
|
||||
u16 antenna = 0;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
/*RTW_INFO("%s: input=%s\n", __func__, input);*/
|
||||
@@ -849,9 +871,12 @@ int rtw_mp_disable_bt_coexist(struct net_device *dev,
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
struct hal_ops *pHalFunc = &padapter->HalFunc;
|
||||
|
||||
u8 input[wrqu->data.length];
|
||||
u8 input[128];
|
||||
u32 bt_coexist;
|
||||
|
||||
if (wrqu->data.length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->data.pointer, wrqu->data.length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -883,13 +908,16 @@ int rtw_mp_arx(struct net_device *dev,
|
||||
{
|
||||
int bStartRx = 0, bStopRx = 0, bQueryPhy = 0, bQueryMac = 0, bSetBssid = 0;
|
||||
int bmac_filter = 0, bfilter_init = 0, bmon = 0, bSmpCfg = 0, bloopbk = 0;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
char *pch, *ptmp, *token, *tmp[2] = {NULL, NULL};
|
||||
u32 i = 0, ii = 0, jj = 0, kk = 0, cnts = 0, ret;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
struct mp_priv *pmppriv = &padapter->mppriv;
|
||||
struct dbg_rx_counter rx_counter;
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -1062,7 +1090,10 @@ int rtw_mp_pwrtrk(struct net_device *dev,
|
||||
s32 ret;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
@@ -1100,7 +1131,10 @@ int rtw_mp_psd(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
@@ -1213,11 +1247,14 @@ int rtw_mp_dump(struct net_device *dev,
|
||||
struct mp_priv *pmp_priv;
|
||||
struct pkt_attrib *pattrib;
|
||||
u32 value;
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
u8 rf_type, path_nums = 0;
|
||||
u32 i, j = 1, path;
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
pmp_priv = &padapter->mppriv;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
@@ -1239,9 +1276,12 @@ int rtw_mp_phypara(struct net_device *dev,
|
||||
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
u32 valxcap, ret;
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
@@ -1265,9 +1305,12 @@ int rtw_mp_SetRFPath(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
char input[wrqu->length];
|
||||
char input[128];
|
||||
int bMain = 1, bTurnoff = 1;
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
RTW_INFO("%s:iwpriv in=%s\n", __func__, input);
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
@@ -1300,11 +1343,13 @@ int rtw_mp_QueryDrv(struct net_device *dev,
|
||||
union iwreq_data *wrqu, char *extra)
|
||||
{
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
char input[wrqu->data.length];
|
||||
char input[128];
|
||||
int qAutoLoad = 1;
|
||||
|
||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
if (wrqu->data.length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->data.pointer, wrqu->data.length))
|
||||
return -EFAULT;
|
||||
RTW_INFO("%s:iwpriv in=%s\n", __func__, input);
|
||||
@@ -1329,9 +1374,12 @@ int rtw_mp_PwrCtlDM(struct net_device *dev,
|
||||
struct iw_point *wrqu, char *extra)
|
||||
{
|
||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||
u8 input[wrqu->length];
|
||||
u8 input[128];
|
||||
int bstart = 1;
|
||||
|
||||
if (wrqu->length > 128)
|
||||
return -EFAULT;
|
||||
|
||||
if (copy_from_user(input, wrqu->pointer, wrqu->length))
|
||||
return -EFAULT;
|
||||
|
||||
|
||||
@@ -68,23 +68,47 @@ void sitesurvey_ctrl_handler(void *FunctionContext)
|
||||
}
|
||||
*/
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_join_timeout_handler(struct timer_list *t)
|
||||
#else
|
||||
void rtw_join_timeout_handler(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, mlmepriv.assoc_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
_rtw_join_timeout_handler(adapter);
|
||||
}
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_scan_timeout_handler(struct timer_list *t)
|
||||
#else
|
||||
void _rtw_scan_timeout_handler(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, mlmepriv.scan_to_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
rtw_scan_timeout_handler(adapter);
|
||||
}
|
||||
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _dynamic_check_timer_handlder(struct timer_list *t)
|
||||
#else
|
||||
void _dynamic_check_timer_handlder(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
struct dvobj_priv *pdvobj = from_timer(pdvobj, t, dynamic_chk_timer);
|
||||
#else
|
||||
struct dvobj_priv *pdvobj = (struct dvobj_priv *)FunctionContext;
|
||||
#endif
|
||||
_adapter *adapter = dvobj_get_primary_adapter(pdvobj);
|
||||
|
||||
#if (MP_DRIVER == 1)
|
||||
@@ -101,9 +125,17 @@ void _dynamic_check_timer_handlder(void *FunctionContext)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SET_SCAN_DENY_TIMER
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_set_scan_deny_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _rtw_set_scan_deny_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, mlmepriv.set_scan_deny_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
rtw_set_scan_deny_timer_hdl(adapter);
|
||||
}
|
||||
#endif
|
||||
@@ -113,17 +145,31 @@ void rtw_init_mlme_timer(_adapter *padapter)
|
||||
{
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
_init_timer(&(pmlmepriv->assoc_timer), padapter->pnetdev, rtw_join_timeout_handler, padapter);
|
||||
/* _init_timer(&(pmlmepriv->sitesurveyctrl.sitesurvey_ctrl_timer), padapter->pnetdev, sitesurvey_ctrl_handler, padapter); */
|
||||
_init_timer(&(pmlmepriv->scan_to_timer), padapter->pnetdev, _rtw_scan_timeout_handler, padapter);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pmlmepriv->assoc_timer, rtw_join_timeout_handler, 0);
|
||||
timer_setup(&pmlmepriv->scan_to_timer, _rtw_scan_timeout_handler, 0);
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
timer_setup(&pmlmepriv->dfs_master_timer, rtw_dfs_master_timer_hdl, 0);
|
||||
#endif
|
||||
#ifdef CONFIG_SET_SCAN_DENY_TIMER
|
||||
timer_setup(&pmlmepriv->set_scan_deny_timer,
|
||||
_rtw_set_scan_deny_timer_hdl, 0);
|
||||
#endif
|
||||
#else
|
||||
_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);
|
||||
|
||||
#ifdef CONFIG_DFS_MASTER
|
||||
_init_timer(&(pmlmepriv->dfs_master_timer), padapter->pnetdev, rtw_dfs_master_timer_hdl, padapter);
|
||||
_init_timer(&(pmlmepriv->dfs_master_timer), padapter->pnetdev,
|
||||
rtw_dfs_master_timer_hdl, padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SET_SCAN_DENY_TIMER
|
||||
_init_timer(&(pmlmepriv->set_scan_deny_timer), padapter->pnetdev, _rtw_set_scan_deny_timer_hdl, padapter);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
_init_workitem(&(pmlmepriv->Linkup_workitem), Linkup_workitem_callback, padapter);
|
||||
@@ -156,8 +202,6 @@ void rtw_os_indicate_connect(_adapter *adapter)
|
||||
#ifdef RTK_DMP_PLATFORM
|
||||
_set_workitem(&adapter->mlmepriv.Linkup_workitem);
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
extern void indicate_wx_scan_complete_event(_adapter *padapter);
|
||||
@@ -199,7 +243,6 @@ void rtw_reset_securitypriv(_adapter *adapter)
|
||||
pmlmeext->mgnt_80211w_IPN_rx = 0;
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
_rtw_memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv));
|
||||
/* _init_timer(&(adapter->securitypriv.tkip_timer),adapter->pnetdev, rtw_use_tkipkey_handler, adapter); */
|
||||
|
||||
/* Added by Albert 2009/02/18 */
|
||||
/* Restore the PMK information to securitypriv structure for the following connection. */
|
||||
@@ -300,38 +343,78 @@ void rtw_report_sec_ie(_adapter *adapter, u8 authmode, u8 *sec_ie)
|
||||
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _survey_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _survey_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.survey_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
|
||||
survey_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _link_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _link_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.link_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
link_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _ft_link_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _ft_link_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.ft_link_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
|
||||
ft_link_timer_hdl(padapter);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _ft_roam_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _ft_roam_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, mlmeextpriv.ft_roam_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
|
||||
ft_roam_timer_hdl(padapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _addba_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _addba_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
struct sta_info *psta = from_timer(psta, t, addba_retry_timer);
|
||||
#else
|
||||
struct sta_info *psta = (struct sta_info *)FunctionContext;
|
||||
#endif
|
||||
addba_timer_hdl(psta);
|
||||
}
|
||||
|
||||
@@ -346,7 +429,12 @@ void _sa_query_timer_hdl(void *FunctionContext)
|
||||
|
||||
void init_dot11w_expire_timer(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
_init_timer(&psta->dot11w_expire_timer, padapter->pnetdev, _sa_query_timer_hdl, psta);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&psta->dot11w_expire_timer, _sa_query_timer_hdl, psta, 0);
|
||||
#else
|
||||
_init_timer(&psta->dot11w_expire_timer, padapter->pnetdev,
|
||||
_sa_query_timer_hdl, psta);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
@@ -354,7 +442,12 @@ void init_dot11w_expire_timer(_adapter *padapter, struct sta_info *psta)
|
||||
void init_addba_retry_timer(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
|
||||
_init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl, psta);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&psta->addba_retry_timer, _addba_timer_hdl, 0);
|
||||
#else
|
||||
_init_timer(&psta->addba_retry_timer, padapter->pnetdev, _addba_timer_hdl,
|
||||
psta);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -375,17 +468,21 @@ void init_mlme_ext_timer(_adapter *padapter)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pmlmeext->survey_timer, _survey_timer_hdl, 0);
|
||||
timer_setup(&pmlmeext->link_timer, _link_timer_hdl, 0);
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
timer_setup(&pmlmeext->ft_link_timer, _ft_link_timer_hdl, 0);
|
||||
timer_setup(&pmlmeext->ft_roam_timer, _ft_roam_timer_hdl, 0);
|
||||
#endif
|
||||
#else
|
||||
_init_timer(&pmlmeext->survey_timer, padapter->pnetdev, _survey_timer_hdl, padapter);
|
||||
_init_timer(&pmlmeext->link_timer, padapter->pnetdev, _link_timer_hdl, padapter);
|
||||
#ifdef CONFIG_RTW_80211R
|
||||
_init_timer(&pmlmeext->ft_link_timer, padapter->pnetdev, _ft_link_timer_hdl, padapter);
|
||||
_init_timer(&pmlmeext->ft_roam_timer, padapter->pnetdev, _ft_roam_timer_hdl, padapter);
|
||||
#endif
|
||||
|
||||
/* _init_timer(&pmlmeext->ADDBA_timer, padapter->pnetdev, _addba_timer_hdl, padapter); */
|
||||
|
||||
/* _init_timer(&pmlmeext->reauth_timer, padapter->pnetdev, _reauth_timer_hdl, padapter); */
|
||||
/* _init_timer(&pmlmeext->reassoc_timer, padapter->pnetdev, _reassoc_timer_hdl, padapter); */
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_AP_MODE
|
||||
|
||||
@@ -1069,11 +1069,14 @@ unsigned int rtw_classify8021d(struct sk_buff *skb)
|
||||
|
||||
|
||||
static u16 rtw_select_queue(struct net_device *dev, struct sk_buff *skb
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
, void *accel_priv
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0)
|
||||
, select_queue_fallback_t fallback
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0))
|
||||
,struct net_device *sb_dev
|
||||
,select_queue_fallback_t fallback
|
||||
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
|
||||
,void *unused
|
||||
,select_queue_fallback_t fallback
|
||||
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3, 13, 0)
|
||||
, void *accel_priv
|
||||
#endif
|
||||
)
|
||||
{
|
||||
@@ -1732,9 +1735,17 @@ u8 rtw_init_default_value(_adapter *padapter)
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void _tx_beacon_timer_handlder(void *FunctionContext)
|
||||
#else
|
||||
void _tx_beacon_timer_handlder(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
struct dvobj_priv *pdvobj = (struct dvobj_priv *)FunctionContext;
|
||||
#else
|
||||
struct dvobj_priv *pdvobj = from_timer(pdvobj, t, ro_ch_timer_process);
|
||||
#endif
|
||||
|
||||
tx_beacon_timer_handlder(pdvobj);
|
||||
}
|
||||
@@ -1778,11 +1789,21 @@ struct dvobj_priv *devobj_init(void)
|
||||
pdvobj->inter_bcn_space = DEFAULT_BCN_INTERVAL; /* default value is equal to the default beacon_interval (100ms) */
|
||||
_rtw_init_queue(&pdvobj->ap_if_q);
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
_init_timer(&(pdvobj->txbcn_timer), NULL, _tx_beacon_timer_handlder, pdvobj);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&pdvobj->txbcn_timer, NULL, _tx_beacon_timer_handlder,
|
||||
pdvobj);
|
||||
#else
|
||||
timer_setup(&pdvobj->txbcn_timer, _tx_beacon_timer_handlder, 0);
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
_init_timer(&(pdvobj->dynamic_chk_timer), NULL, _dynamic_check_timer_handlder, pdvobj);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&(pdvobj->dynamic_chk_timer), NULL,
|
||||
_dynamic_check_timer_handlder, pdvobj);
|
||||
#else
|
||||
timer_setup(&pdvobj->dynamic_chk_timer, _dynamic_check_timer_handlder, 0);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_MCC_MODE
|
||||
_rtw_mutex_init(&(pdvobj->mcc_objpriv.mcc_mutex));
|
||||
|
||||
@@ -867,10 +867,17 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
#endif
|
||||
|
||||
}
|
||||
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _rtw_reordering_ctrl_timeout_handler(struct timer_list *t)
|
||||
#else
|
||||
void _rtw_reordering_ctrl_timeout_handler(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
struct recv_reorder_ctrl *preorder_ctrl = from_timer(preorder_ctrl, t, reordering_ctrl_timer);
|
||||
#else
|
||||
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)FunctionContext;
|
||||
#endif
|
||||
rtw_reordering_ctrl_timeout_handler(preorder_ctrl);
|
||||
}
|
||||
|
||||
@@ -878,6 +885,9 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
|
||||
{
|
||||
_adapter *padapter = preorder_ctrl->padapter;
|
||||
|
||||
_init_timer(&(preorder_ctrl->reordering_ctrl_timer), padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&preorder_ctrl->reordering_ctrl_timer, _rtw_reordering_ctrl_timeout_handler, 0);
|
||||
#else
|
||||
_init_timer(&preorder_ctrl->reordering_ctrl_timer, padapter->pnetdev, _rtw_reordering_ctrl_timeout_handler, preorder_ctrl);
|
||||
#endif
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user