mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Update for driver to build on kernel 4.19
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
f62909c0c1
commit
9d1d96c95d
23 changed files with 435 additions and 687 deletions
|
@ -4028,7 +4028,7 @@ exit:
|
|||
/*#define DBG_SWTIMER_BASED_TXBCN*/
|
||||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
void tx_beacon_handlder(struct dvobj_priv *pdvobj)
|
||||
void tx_beacon_handler(struct dvobj_priv *pdvobj)
|
||||
{
|
||||
#define BEACON_EARLY_TIME 20 /* unit:TU*/
|
||||
_irqL irqL;
|
||||
|
@ -4159,7 +4159,7 @@ void tx_beacon_handlder(struct dvobj_priv *pdvobj)
|
|||
|
||||
}
|
||||
|
||||
void tx_beacon_timer_handlder(struct dvobj_priv *pdvobj)
|
||||
void tx_beacon_timer_handler(struct dvobj_priv *pdvobj)
|
||||
{
|
||||
_adapter *padapter = pdvobj->padapters[0];
|
||||
|
||||
|
|
|
@ -3494,10 +3494,17 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_dfs_master_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
#else
|
||||
void rtw_dfs_master_timer_hdl(strust timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, dfs_master_timer);
|
||||
#endif
|
||||
rtw_dfs_master_cmd(adapter, _TRUE);
|
||||
}
|
||||
|
||||
|
|
|
@ -888,18 +888,18 @@ void rtw_mi_buddy_adapter_reset(_adapter *padapter)
|
|||
_rtw_mi_adapter_reset(padapter, _TRUE);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_dynamic_check_timer_handlder(_adapter *adapter, void *data)
|
||||
static u8 _rtw_mi_dynamic_check_timer_handler(_adapter *adapter, void *data)
|
||||
{
|
||||
rtw_iface_dynamic_check_timer_handlder(adapter);
|
||||
rtw_iface_dynamic_check_timer_handler(adapter);
|
||||
return _TRUE;
|
||||
}
|
||||
u8 rtw_mi_dynamic_check_timer_handlder(_adapter *padapter)
|
||||
u8 rtw_mi_dynamic_check_timer_handler(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_check_timer_handlder);
|
||||
return _rtw_mi_process(padapter, _FALSE, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
}
|
||||
u8 rtw_mi_buddy_dynamic_check_timer_handlder(_adapter *padapter)
|
||||
u8 rtw_mi_buddy_dynamic_check_timer_handler(_adapter *padapter)
|
||||
{
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_check_timer_handlder);
|
||||
return _rtw_mi_process(padapter, _TRUE, NULL, _rtw_mi_dynamic_check_timer_handler);
|
||||
}
|
||||
|
||||
static u8 _rtw_mi_dev_unload(_adapter *adapter, void *data)
|
||||
|
|
|
@ -2908,7 +2908,7 @@ static u8 is_drv_in_lps(_adapter *adapter)
|
|||
#endif /* CONFIG_LPS_LCLK_WD_TIMER*/
|
||||
return is_in_lps;
|
||||
}
|
||||
void rtw_iface_dynamic_check_timer_handlder(_adapter *adapter)
|
||||
void rtw_iface_dynamic_check_timer_handler(_adapter *adapter)
|
||||
{
|
||||
#ifdef CONFIG_AP_MODE
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
@ -2960,7 +2960,7 @@ void rtw_iface_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
|
||||
if (adapter->pppoe_connection_in_progress > 0)
|
||||
adapter->pppoe_connection_in_progress--;
|
||||
/* due to rtw_dynamic_check_timer_handlder() is called every 2 seconds */
|
||||
/* due to rtw_dynamic_check_timer_handler() is called every 2 seconds */
|
||||
if (adapter->pppoe_connection_in_progress > 0)
|
||||
adapter->pppoe_connection_in_progress--;
|
||||
}
|
||||
|
@ -3014,7 +3014,7 @@ static void collect_traffic_statistics(_adapter *padapter)
|
|||
#endif
|
||||
}
|
||||
|
||||
void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
||||
void rtw_dynamic_check_timer_handler(_adapter *adapter)
|
||||
{
|
||||
if (!adapter)
|
||||
return;
|
||||
|
@ -3027,7 +3027,7 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
|
||||
collect_traffic_statistics(adapter);
|
||||
|
||||
rtw_mi_dynamic_check_timer_handlder(adapter);
|
||||
rtw_mi_dynamic_check_timer_handler(adapter);
|
||||
|
||||
if (!is_drv_in_lps(adapter))
|
||||
rtw_dynamic_chk_wk_cmd(adapter);
|
||||
|
|
|
@ -15011,7 +15011,7 @@ u8 tx_beacon_hdl(_adapter *padapter, unsigned char *pbuf)
|
|||
|
||||
#ifdef CONFIG_SWTIMER_BASED_TXBCN
|
||||
|
||||
tx_beacon_handlder(padapter->dvobj);
|
||||
tx_beacon_handler(padapter->dvobj);
|
||||
|
||||
#else
|
||||
|
||||
|
|
|
@ -3368,9 +3368,17 @@ exit:
|
|||
return ret;
|
||||
}
|
||||
|
||||
static void ro_ch_timer_process(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void ro_ch_timer_process (void *FunctionContext)
|
||||
#else
|
||||
static void ro_ch_timer_process(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, cfg80211_wdinfo.remain_on_ch_timer);
|
||||
#endif
|
||||
|
||||
p2p_cancel_roch_cmd(adapter, 0, NULL, 0);
|
||||
}
|
||||
|
@ -4216,7 +4224,11 @@ 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)
|
||||
_init_timer(&pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter);
|
||||
#else
|
||||
timer_setup(&pcfg80211_wdinfo->remain_on_ch_timer, ro_ch_timer_process, 0);
|
||||
#endif
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
|
@ -4532,9 +4544,17 @@ exit:
|
|||
}
|
||||
#endif /* CONFIG_P2P_PS */
|
||||
|
||||
static void reset_ch_sitesurvey_timer_process(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void reset_ch_sitesurvey_timer_process (void *FunctionContext)
|
||||
#else
|
||||
static void reset_ch_sitesurvey_timer_process(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey);
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -4551,9 +4571,17 @@ static void reset_ch_sitesurvey_timer_process(void *FunctionContext)
|
|||
pwdinfo->rx_invitereq_info.scan_op_ch_only = 0;
|
||||
}
|
||||
|
||||
static void reset_ch_sitesurvey_timer_process2(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void reset_ch_sitesurvey_timer_process2 (void *FunctionContext)
|
||||
#else
|
||||
static void reset_ch_sitesurvey_timer_process2(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.reset_ch_sitesurvey2);
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -4570,9 +4598,18 @@ static void reset_ch_sitesurvey_timer_process2(void *FunctionContext)
|
|||
pwdinfo->p2p_info.scan_op_ch_only = 0;
|
||||
}
|
||||
|
||||
static void restore_p2p_state_timer_process(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void restore_p2p_state_timer_process (void *FunctionContext)
|
||||
#else
|
||||
static void restore_p2p_state_timer_process(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t,
|
||||
wdinfo.restore_p2p_state_timer);
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -4581,9 +4618,17 @@ static void restore_p2p_state_timer_process(void *FunctionContext)
|
|||
p2p_protocol_wk_cmd(adapter, P2P_RESTORE_STATE_WK);
|
||||
}
|
||||
|
||||
static void pre_tx_scan_timer_process(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void pre_tx_scan_timer_process (void *FunctionContext)
|
||||
#else
|
||||
static void pre_tx_scan_timer_process(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
_adapter *adapter = (_adapter *) FunctionContext;
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *) FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.pre_tx_scan_timer);
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
_irqL irqL;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
@ -4613,9 +4658,17 @@ static void pre_tx_scan_timer_process(void *FunctionContext)
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
static void find_phase_timer_process(void *FunctionContext)
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
static void find_phase_timer_process (void *FunctionContext)
|
||||
#else
|
||||
static void find_phase_timer_process(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, wdinfo.find_phase_timer);
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -4872,6 +4925,7 @@ void rtw_init_wifidirect_timers(_adapter *padapter)
|
|||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_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);
|
||||
|
@ -4880,6 +4934,20 @@ 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
|
||||
#else
|
||||
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, padapter);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_init_wifidirect_addrs(_adapter *padapter, u8 *dev_addr, u8 *iface_addr)
|
||||
|
@ -5261,8 +5329,13 @@ 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(padapter);
|
||||
reset_ch_sitesurvey_timer_process2(padapter);
|
||||
#else
|
||||
reset_ch_sitesurvey_timer_process(&padapter->wdinfo.reset_ch_sitesurvey);
|
||||
reset_ch_sitesurvey_timer_process(&padapter->wdinfo.reset_ch_sitesurvey2);
|
||||
#endif
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
#endif
|
||||
|
|
|
@ -393,10 +393,19 @@ exit:
|
|||
return;
|
||||
}
|
||||
|
||||
void pwr_state_check_handler(RTW_TIMER_HDL_ARGS);
|
||||
#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
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *padapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
struct pwrctrl_priv *pwrpriv = from_timer(pwrpriv, t, pwr_state_check_timer);
|
||||
_adapter *padapter = pwrpriv->padapter;
|
||||
#endif
|
||||
|
||||
rtw_ps_cmd(padapter);
|
||||
}
|
||||
|
||||
|
@ -1939,12 +1948,6 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
pwrctrlpriv->pnp_current_pwr_state = NdisDeviceStateD0;
|
||||
#endif
|
||||
|
||||
_init_pwrlock(&pwrctrlpriv->lock);
|
||||
_init_pwrlock(&pwrctrlpriv->check_32k_lock);
|
||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
|
@ -1962,6 +1965,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
pwrctrlpriv->bInternalAutoSuspend = _FALSE;
|
||||
pwrctrlpriv->bInSuspend = _FALSE;
|
||||
pwrctrlpriv->bkeepfwalive = _FALSE;
|
||||
pwrctrlpriv->padapter = padapter;
|
||||
|
||||
#ifdef CONFIG_AUTOSUSPEND
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
|
@ -2008,7 +2012,11 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
#endif /* CONFIG_LPS_RPWM_TIMER */
|
||||
#endif /* CONFIG_LPS_LCLK */
|
||||
|
||||
rtw_init_timer(&pwrctrlpriv->pwr_state_check_timer, padapter, pwr_state_check_handler);
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&pwrctrlpriv->pwr_state_check_timer, padapter->pnetdev, pwr_state_check_handler, padapter);
|
||||
#else
|
||||
timer_setup(&pwrctrlpriv->pwr_state_check_timer, pwr_state_check_handler, 0);
|
||||
#endif
|
||||
|
||||
pwrctrlpriv->wowlan_mode = _FALSE;
|
||||
pwrctrlpriv->wowlan_ap_mode = _FALSE;
|
||||
|
@ -2057,7 +2065,6 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
|||
|
||||
}
|
||||
|
||||
|
||||
void rtw_free_pwrctrl_priv(PADAPTER adapter)
|
||||
{
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
|
||||
|
|
|
@ -30,7 +30,11 @@
|
|||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
|
||||
#else
|
||||
void rtw_signal_stat_timer_hdl(struct timer_list *t);
|
||||
#endif
|
||||
|
||||
enum {
|
||||
SIGNAL_STAT_CALC_PROFILE_0 = 0,
|
||||
|
@ -144,7 +148,11 @@ sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
|||
res = rtw_hal_init_recv_priv(padapter);
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
rtw_init_timer(&precvpriv->signal_stat_timer, padapter, RTW_TIMER_HDL_NAME(signal_stat));
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter);
|
||||
#else
|
||||
timer_setup(&precvpriv->signal_stat_timer, RTW_TIMER_HDL_NAME(signal_stat), 9);
|
||||
#endif
|
||||
|
||||
precvpriv->signal_stat_sampling_interval = 2000; /* ms */
|
||||
/* precvpriv->signal_stat_converging_constant = 5000; */ /* ms */
|
||||
|
@ -159,7 +167,6 @@ exit:
|
|||
|
||||
}
|
||||
|
||||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv);
|
||||
void rtw_mfree_recv_priv_lock(struct recv_priv *precvpriv)
|
||||
{
|
||||
_rtw_spinlock_free(&precvpriv->lock);
|
||||
|
@ -4312,9 +4319,17 @@ _recv_entry_drop:
|
|||
}
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS)
|
||||
#else
|
||||
void rtw_signal_stat_timer_hdl(struct timer_list *t)
|
||||
#endif
|
||||
{
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
|
||||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
#else
|
||||
_adapter *adapter = from_timer(adapter, t, recvpriv.signal_stat_timer);
|
||||
#endif
|
||||
struct recv_priv *recvpriv = &adapter->recvpriv;
|
||||
|
||||
u32 tmp_s, tmp_q;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue