Skip to content

Commit

Permalink
rtl8188ee: Fix timer setup changes
Browse files Browse the repository at this point in the history
Signed-off-by: Larry Finger <[email protected]>
  • Loading branch information
lwfinger committed Feb 14, 2021
1 parent 274bb94 commit d411519
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/rtw_tdls.c
Original file line number Diff line number Diff line change
Expand Up @@ -3266,9 +3266,17 @@ 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(void *FunctionContext)
#else
void _tdls_tpk_timer_hdl(struct timer_list *t)
#endif
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
struct sta_info *ptdls_sta = (struct sta_info *)FunctionContext;
#else
struct sta_info *ptdls_sta = from_timer(ptdls_sta, (struct sta_info *)FunctionContext;
#endif
struct tdls_txmgmt txmgmt;

_rtw_memset(&txmgmt, 0x00, sizeof(struct tdls_txmgmt));
Expand Down Expand Up @@ -3376,6 +3384,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)
rtw_init_timer(&psta->TPK_timer, padapter, _tdls_tpk_timer_hdl, psta);
#ifdef CONFIG_TDLS_CH_SW
rtw_init_timer(&psta->ch_sw_timer, padapter, _tdls_ch_switch_timer_hdl, psta);
Expand All @@ -3385,6 +3394,17 @@ void rtw_init_tdls_timer(_adapter *padapter, struct sta_info *psta)
#endif
rtw_init_timer(&psta->handshake_timer, padapter, _tdls_handshake_timer_hdl, psta);
rtw_init_timer(&psta->pti_timer, padapter, _tdls_pti_timer_hdl, psta);
#else
timer_setup(&psta->TPK_timer, _tdls_tpk_timer_hdl, 0);
#ifdef CONFIG_TDLS_CH_SW
timer_setup(&psta->ch_sw_timer, _tdls_ch_switch_timer_hdl, 0);
timer_setup(&psta->delay_timer, _tdls_delay_timer_hdl, 0);
timer_setup(&psta->stay_on_base_chnl_timer, _tdls_stay_on_base_chnl_timer_hdl, 0);
timer_setup(&psta->ch_sw_monitor_timer, _tdls_ch_switch_monitor_timer_hdl, 0);
#endif
timer_setup(&psta->handshake_timer, _tdls_handshake_timer_hdl, 0);
timer_setup(&psta->pti_timer, _tdls_pti_timer_hdl, 0);
#endif
}

void rtw_free_tdls_timer(struct sta_info *psta)
Expand Down

0 comments on commit d411519

Please sign in to comment.