mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-23 08:34:20 +00:00
rtl8188eu: Updates for timer changes in kernel 4.15
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e472b5d684
commit
1f08a062ad
13 changed files with 196 additions and 7 deletions
|
@ -1744,9 +1744,17 @@ exit:
|
|||
return res;
|
||||
}
|
||||
|
||||
#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)
|
||||
struct adapter *adapter = from_timer(adapter, t, pwrctrlpriv.pwr_state_check_timer);
|
||||
#else
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -1758,9 +1766,17 @@ 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)
|
||||
struct adapter *adapter = from_timer(adapter, t, pwrctrlpriv.pwr_state_check_timer);
|
||||
#else
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -1772,9 +1788,17 @@ 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)
|
||||
struct adapter *adapter = from_timer(adapter, t, wdinfo.restore_p2p_state_timer);
|
||||
#else
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -1783,9 +1807,17 @@ 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)
|
||||
struct adapter *adapter = from_timer(adapter, t, wdinfo.pre_tx_scan_timer);
|
||||
#else
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
||||
|
@ -1813,9 +1845,17 @@ static void pre_tx_scan_timer_process(void *FunctionContext)
|
|||
spin_unlock_bh(&pmlmepriv->lock);
|
||||
}
|
||||
|
||||
#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)
|
||||
struct adapter *adapter = from_timer(adapter, t, wdinfo.find_phase_timer);
|
||||
#else
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
#endif
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
|
@ -1841,11 +1881,19 @@ void rtw_init_wifidirect_timers(struct 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);
|
||||
#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);
|
||||
_init_timer(&pwdinfo->reset_ch_sitesurvey, padapter->pnetdev, reset_ch_sitesurvey_timer_process, padapter);
|
||||
_init_timer(&pwdinfo->reset_ch_sitesurvey2, padapter->pnetdev, reset_ch_sitesurvey_timer_process2, padapter);
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_init_wifidirect_addrs(struct adapter *padapter, u8 *dev_addr, u8 *iface_addr)
|
||||
|
@ -1987,8 +2035,11 @@ int rtw_p2p_enable(struct 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)
|
||||
#else
|
||||
reset_ch_sitesurvey_timer_process(padapter);
|
||||
reset_ch_sitesurvey_timer_process2(padapter);
|
||||
#endif
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DISABLE);
|
||||
memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue