mirror of
https://github.com/aircrack-ng/rtl8812au.git
synced 2024-12-31 07:03:59 +00:00
Merge pull request #70 from kimocoder/v5.1.5
Cleanup kernel v4.15 support + prepare for another patch
This commit is contained in:
commit
72918db78d
4
Makefile
4
Makefile
@ -62,10 +62,10 @@ CONFIG_TRAFFIC_PROTECT = y
|
||||
CONFIG_LOAD_PHY_PARA_FROM_FILE = y
|
||||
CONFIG_CALIBRATE_TX_POWER_BY_REGULATORY = n
|
||||
CONFIG_CALIBRATE_TX_POWER_TO_MAX = y
|
||||
CONFIG_RTW_ADAPTIVITY_EN = auto
|
||||
CONFIG_RTW_ADAPTIVITY_EN = disable
|
||||
CONFIG_RTW_ADAPTIVITY_MODE = normal
|
||||
CONFIG_SIGNAL_SCALE_MAPPING = n
|
||||
CONFIG_80211W = y
|
||||
CONFIG_80211W = n
|
||||
CONFIG_REDUCE_TX_CPU_LOADING = n
|
||||
CONFIG_BR_EXT = y
|
||||
CONFIG_TDLS = n
|
||||
|
@ -1228,11 +1228,7 @@ void rtw_surveydone_event_callback(_adapter *adapter, u8 *pbuf)
|
||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&adapter->recvpriv.signal_stat_timer, adapter->recvpriv.signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(&adapter->recvpriv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (pmlmepriv->to_join == _TRUE) {
|
||||
@ -1829,11 +1825,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
||||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&padapter->recvpriv.signal_stat_timer, padapter->recvpriv.signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
#endif
|
||||
padapter->recvpriv.signal_strength = ptarget_wlan->network.PhyInfo.SignalStrength;
|
||||
padapter->recvpriv.signal_qual = ptarget_wlan->network.PhyInfo.SignalQuality;
|
||||
@ -1849,11 +1841,7 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
||||
);
|
||||
#endif
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&padapter->recvpriv.signal_stat_timer, padapter->recvpriv.signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* update fw_state */ /* will clr _FW_UNDER_LINKING here indirectly */
|
||||
|
@ -3269,17 +3269,9 @@ static void ro_ch_handler(_adapter *padapter)
|
||||
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void ro_ch_timer_process(struct timer_list *t)
|
||||
#else
|
||||
static void ro_ch_timer_process(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, cfg80211_wdinfo.remain_on_ch_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
|
||||
|
||||
/* printk("%s\n", __FUNCTION__); */
|
||||
@ -4074,11 +4066,7 @@ void rtw_init_cfg80211_wifidirect_info(_adapter *padapter)
|
||||
|
||||
_rtw_memset(pcfg80211_wdinfo, 0x00, sizeof(struct cfg80211_wifidirect_info));
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pcfg80211_wdinfo->remain_on_ch_timer, ro_ch_timer_process, 0);
|
||||
#else
|
||||
_init_timer(&pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
@ -4381,17 +4369,9 @@ exit:
|
||||
}
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void reset_ch_sitesurvey_timer_process(struct timer_list *t)
|
||||
#else
|
||||
static void reset_ch_sitesurvey_timer_process(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
@ -4408,17 +4388,9 @@ static void reset_ch_sitesurvey_timer_process(void *FunctionContext)
|
||||
pwdinfo->rx_invitereq_info.scan_op_ch_only = 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void reset_ch_sitesurvey_timer_process2(struct timer_list *t)
|
||||
#else
|
||||
static void reset_ch_sitesurvey_timer_process2(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey2);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
@ -4435,17 +4407,9 @@ static void reset_ch_sitesurvey_timer_process2(void *FunctionContext)
|
||||
pwdinfo->p2p_info.scan_op_ch_only = 0;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void restore_p2p_state_timer_process (struct timer_list *t)
|
||||
#else
|
||||
static void restore_p2p_state_timer_process(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.restore_p2p_state_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
@ -4454,17 +4418,9 @@ static void restore_p2p_state_timer_process(void *FunctionContext)
|
||||
p2p_protocol_wk_cmd(adapter, P2P_RESTORE_STATE_WK);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void pre_tx_scan_timer_process (struct timer_list *t)
|
||||
#else
|
||||
static void pre_tx_scan_timer_process(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.pre_tx_scan_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *) FunctionContext;
|
||||
#endif
|
||||
_adapter *adapter = (_adapter *) FunctionContext;
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
@ -4493,17 +4449,9 @@ static void pre_tx_scan_timer_process(void *FunctionContext)
|
||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
static void find_phase_timer_process(struct timer_list *t)
|
||||
#else
|
||||
static void find_phase_timer_process(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.find_phase_timer);
|
||||
#else
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
@ -4760,16 +4708,6 @@ void rtw_init_wifidirect_timers(_adapter *padapter)
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pwdinfo->find_phase_timer, find_phase_timer_process, 0);
|
||||
timer_setup(&pwdinfo->restore_p2p_state_timer, restore_p2p_state_timer_process, 0);
|
||||
timer_setup(&pwdinfo->pre_tx_scan_timer, pre_tx_scan_timer_process, 0);
|
||||
timer_setup(&pwdinfo->reset_ch_sitesurvey, reset_ch_sitesurvey_timer_process, 0);
|
||||
timer_setup(&pwdinfo->reset_ch_sitesurvey2, reset_ch_sitesurvey_timer_process2, 0);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
timer_setup(&pwdinfo->ap_p2p_switch_timer, ap_p2p_switch_timer_process, 0);
|
||||
#endif
|
||||
#else
|
||||
_init_timer(&pwdinfo->find_phase_timer, padapter->pnetdev, find_phase_timer_process, padapter);
|
||||
_init_timer(&pwdinfo->restore_p2p_state_timer, padapter->pnetdev, restore_p2p_state_timer_process, padapter);
|
||||
_init_timer(&pwdinfo->pre_tx_scan_timer, padapter->pnetdev, pre_tx_scan_timer_process, padapter);
|
||||
@ -4778,7 +4716,6 @@ void rtw_init_wifidirect_timers(_adapter *padapter)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_init_timer(&pwdinfo->ap_p2p_switch_timer, padapter->pnetdev, ap_p2p_switch_timer_process, padapter);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_init_wifidirect_addrs(_adapter *padapter, u8 *dev_addr, u8 *iface_addr)
|
||||
@ -5141,13 +5078,10 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
||||
_cancel_timer_ex(&pwdinfo->pre_tx_scan_timer);
|
||||
_cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey);
|
||||
_cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey2);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
reset_ch_sitesurvey_timer_process(&pwdinfo->reset_ch_sitesurvey);
|
||||
reset_ch_sitesurvey_timer_process2(&pwdinfo->reset_ch_sitesurvey2);
|
||||
#else
|
||||
|
||||
reset_ch_sitesurvey_timer_process(padapter);
|
||||
reset_ch_sitesurvey_timer_process2(padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
#endif
|
||||
|
@ -393,17 +393,10 @@ exit:
|
||||
return;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void pwr_state_check_handler(struct timer_list *t)
|
||||
#else
|
||||
void pwr_state_check_handler(RTW_TIMER_HDL_ARGS);
|
||||
void pwr_state_check_handler(RTW_TIMER_HDL_ARGS)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, pwrctrlpriv.pwr_state_check_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
rtw_ps_cmd(padapter);
|
||||
}
|
||||
|
||||
@ -1975,11 +1968,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
||||
#endif /* CONFIG_LPS_RPWM_TIMER */
|
||||
#endif /* CONFIG_LPS_LCLK */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0);
|
||||
#else
|
||||
rtw_init_timer(&pwrctrlpriv->pwr_state_check_timer, padapter, pwr_state_check_handler);
|
||||
#endif
|
||||
|
||||
pwrctrlpriv->wowlan_mode = _FALSE;
|
||||
pwrctrlpriv->wowlan_ap_mode = _FALSE;
|
||||
|
@ -29,11 +29,7 @@
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_signal_stat_timer_hdl(struct timer_list *t);
|
||||
#else
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
||||
#endif
|
||||
|
||||
enum {
|
||||
SIGNAL_STAT_CALC_PROFILE_0 = 0,
|
||||
@ -137,20 +133,12 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
||||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&precvpriv->signal_stat_timer, rtw_signal_stat_timer_hdl, 0);
|
||||
#else
|
||||
rtw_init_timer(&precvpriv->signal_stat_timer, padapter, RTW_TIMER_HDL_NAME(signal_stat));
|
||||
#endif
|
||||
|
||||
precvpriv->signal_stat_sampling_interval = 2000; /* ms */
|
||||
/* precvpriv->signal_stat_converging_constant = 5000; */ /* ms */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&precvpriv->signal_stat_timer, precvpriv->signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(precvpriv);
|
||||
#endif
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
exit:
|
||||
@ -4188,18 +4176,11 @@ _recv_entry_drop:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_signal_stat_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = from_timer(padapter, t, recvpriv.signal_stat_timer);
|
||||
#else
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#endif
|
||||
struct recv_priv *recvpriv = &padapter->recvpriv;
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||
|
||||
u32 tmp_s, tmp_q;
|
||||
u8 avg_signal_strength = 0;
|
||||
@ -4208,10 +4189,10 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
u32 num_signal_qual = 0;
|
||||
u8 ratio_pre_stat = 0, ratio_curr_stat = 0, ratio_total = 0, ratio_profile = SIGNAL_STAT_CALC_PROFILE_0;
|
||||
|
||||
if(padapter->recvpriv.is_signal_dbg) {
|
||||
if (adapter->recvpriv.is_signal_dbg) {
|
||||
/* update the user specific value, signal_strength_dbg, to signal_strength, rssi */
|
||||
padapter->recvpriv.signal_strength = padapter->recvpriv.signal_strength_dbg;
|
||||
padapter->recvpriv.rssi=(s8)translate_percentage_to_dbm((u8)padapter->recvpriv.signal_strength_dbg);
|
||||
adapter->recvpriv.signal_strength = adapter->recvpriv.signal_strength_dbg;
|
||||
adapter->recvpriv.rssi = (s8)translate_percentage_to_dbm((u8)adapter->recvpriv.signal_strength_dbg);
|
||||
} else {
|
||||
|
||||
if (recvpriv->signal_strength_data.update_req == 0) { /* update_req is clear, means we got rx */
|
||||
@ -4229,14 +4210,14 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
}
|
||||
|
||||
if (num_signal_strength == 0) {
|
||||
if (rtw_get_on_cur_ch_time(padapter) == 0
|
||||
|| rtw_get_passing_time_ms(rtw_get_on_cur_ch_time(padapter)) < 2 * padapter->mlmeextpriv.mlmext_info.bcn_interval
|
||||
if (rtw_get_on_cur_ch_time(adapter) == 0
|
||||
|| rtw_get_passing_time_ms(rtw_get_on_cur_ch_time(adapter)) < 2 * adapter->mlmeextpriv.mlmext_info.bcn_interval
|
||||
)
|
||||
goto set_timer;
|
||||
}
|
||||
|
||||
if (check_fwstate(&padapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE
|
||||
|| check_fwstate(&padapter->mlmepriv, _FW_LINKED) == _FALSE
|
||||
if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == _TRUE
|
||||
|| check_fwstate(&adapter->mlmepriv, _FW_LINKED) == _FALSE
|
||||
)
|
||||
goto set_timer;
|
||||
|
||||
@ -4289,12 +4270,10 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
}
|
||||
|
||||
set_timer:
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&recvpriv->signal_stat_timer, recvpriv->signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(recvpriv);
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
}
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
static void rx_process_rssi(_adapter *padapter, union recv_frame *prframe)
|
||||
{
|
||||
|
@ -3141,17 +3141,9 @@ void rtw_build_tunneled_probe_rsp_ies(_adapter *padapter, struct xmit_frame *pxm
|
||||
}
|
||||
#endif /* CONFIG_WFD */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void _tdls_tpk_timer_hdl(struct timer_list *t)
|
||||
#else
|
||||
void _tdls_tpk_timer_hdl(void *FunctionContext)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
struct sta_info *ptdls_sta = from_timer(ptdls_sta, t, sta.TPK_timer);
|
||||
#else
|
||||
struct sta_info *ptdls_sta = (struct sta_info *)FunctionContext;
|
||||
#endif
|
||||
struct tdls_txmgmt txmgmt;
|
||||
|
||||
_rtw_memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
|
||||
@ -3254,11 +3246,7 @@ void _tdls_pti_timer_hdl(void *FunctionContext)
|
||||
void rtw_init_tdls_timer(_adapter *padapter, struct sta_info *psta)
|
||||
{
|
||||
psta->padapter = padapter;
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&psta->TPK_timer, _TPK_timer_hdl, 0);
|
||||
#else
|
||||
_init_timer(&psta->TPK_timer, padapter->pnetdev, _tdls_tpk_timer_hdl, psta);
|
||||
#endif
|
||||
#ifdef CONFIG_TDLS_CH_SW
|
||||
_init_timer(&psta->ch_sw_timer, padapter->pnetdev, _tdls_ch_switch_timer_hdl, psta);
|
||||
_init_timer(&psta->delay_timer, padapter->pnetdev, _tdls_delay_timer_hdl, psta);
|
||||
|
@ -1815,17 +1815,9 @@ void BlinkHandler(PLED_USB 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_USB pLed = from_timer(pLed, t, BlinkTimer);
|
||||
#else
|
||||
PLED_USB pLed = (PLED_USB)data;
|
||||
#endif
|
||||
_adapter *padapter = pLed->padapter;
|
||||
|
||||
/* RTW_INFO("%s\n", __FUNCTION__); */
|
||||
@ -4237,11 +4229,7 @@ InitLed(
|
||||
pLed->LedPin = LedPin;
|
||||
|
||||
ResetLedStatus(pLed);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
timer_setup(&pLed->BlinkTimer, BlinkTimerCallback, 0);
|
||||
#else
|
||||
_init_timer(&pLed->BlinkTimer, padapter->pnetdev, BlinkTimerCallback, pLed);
|
||||
#endif
|
||||
_init_timer(&(pLed->BlinkTimer), padapter->pnetdev, BlinkTimerCallback, pLed);
|
||||
_init_workitem(&(pLed->BlinkWorkItem), BlinkWorkItemCallback, pLed);
|
||||
}
|
||||
|
||||
|
@ -269,14 +269,13 @@ __inline static void rtw_list_delete(_list *plist)
|
||||
}
|
||||
|
||||
#define RTW_TIMER_HDL_ARGS void *FunctionContext
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
__inline static void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
|
||||
{
|
||||
/* setup_timer(ptimer, pfunc,(u32)cntx); */
|
||||
ptimer->function = pfunc;
|
||||
ptimer->data = (unsigned long)cntx;
|
||||
init_timer(ptimer);
|
||||
}
|
||||
#endif
|
||||
|
||||
__inline static void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
{
|
||||
|
@ -771,13 +771,8 @@ extern void rtw_wmm_event_callback(PADAPTER padapter, u8 *pbuf);
|
||||
void rtw_sta_timeout_event_callback(_adapter *adapter, u8 *pbuf);
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_join_timeout_handler(struct timer_list *t);
|
||||
void _rtw_scan_timeout_handler(struct timer_list *t);
|
||||
#else
|
||||
extern void rtw_join_timeout_handler(RTW_TIMER_HDL_ARGS);
|
||||
extern void _rtw_scan_timeout_handler(RTW_TIMER_HDL_ARGS);
|
||||
#endif
|
||||
|
||||
thread_return event_thread(thread_context context);
|
||||
|
||||
|
@ -482,9 +482,7 @@ struct recv_priv {
|
||||
};
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
#define rtw_set_signal_stat_timer(recvpriv) _set_timer(&(recvpriv)->signal_stat_timer, (recvpriv)->signal_stat_sampling_interval)
|
||||
#endif
|
||||
#endif /* CONFIG_NEW_SIGNAL_STAT_PROCESS */
|
||||
|
||||
struct sta_recv_priv {
|
||||
|
@ -1826,11 +1826,7 @@ u8 rtw_reset_drv_sw(_adapter *padapter)
|
||||
mlmeext_set_scan_state(&padapter->mlmeextpriv, SCAN_DISABLE);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
|
||||
_set_timer(&padapter->recvpriv.signal_stat_timer, padapter->recvpriv.signal_stat_sampling_interval);
|
||||
#else
|
||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return ret8;
|
||||
|
@ -784,17 +784,10 @@ void rtw_os_read_port(_adapter *padapter, struct recv_buf *precvbuf)
|
||||
|
||||
}
|
||||
|
||||
#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);
|
||||
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);
|
||||
}
|
||||
|
||||
@ -802,9 +795,5 @@ void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl)
|
||||
{
|
||||
_adapter *padapter = preorder_ctrl->padapter;
|
||||
|
||||
#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
|
||||
}
|
||||
|
@ -996,15 +996,21 @@ 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)
|
||||
{
|
||||
_adapter *adapter = (_adapter *)padapter;
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_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
|
||||
|
||||
/*
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user