diff options
Diffstat (limited to 'drivers/staging/rtl8188eu/core/rtw_recv.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_recv.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_recv.c b/drivers/staging/rtl8188eu/core/rtw_recv.c index bd79e9e..cda725a 100644 --- a/drivers/staging/rtl8188eu/core/rtw_recv.c +++ b/drivers/staging/rtl8188eu/core/rtw_recv.c @@ -41,7 +41,7 @@ static u8 rtw_rfc1042_header[] = { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; -void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS); +void rtw_signal_stat_timer_hdl(unsigned long data); void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv) { @@ -98,7 +98,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter) res = rtw_hal_init_recv_priv(padapter); - _init_timer(&precvpriv->signal_stat_timer, padapter->pnetdev, RTW_TIMER_HDL_NAME(signal_stat), padapter); + setup_timer(&precvpriv->signal_stat_timer, + rtw_signal_stat_timer_hdl, + (unsigned long)padapter); precvpriv->signal_stat_sampling_interval = 1000; /* ms */ @@ -1927,7 +1929,8 @@ static int recv_indicatepkt_reorder(struct adapter *padapter, /* recv_indicatepkts_in_order(padapter, preorder_ctrl, true); */ if (recv_indicatepkts_in_order(padapter, preorder_ctrl, false)) { - _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); + mod_timer(&preorder_ctrl->reordering_ctrl_timer, + jiffies + msecs_to_jiffies(REORDER_WAIT_TIME)); spin_unlock_bh(&ppending_recvframe_queue->lock); } else { spin_unlock_bh(&ppending_recvframe_queue->lock); @@ -1945,9 +1948,9 @@ _err_exit: return _FAIL; } -void rtw_reordering_ctrl_timeout_handler(void *pcontext) +void rtw_reordering_ctrl_timeout_handler(unsigned long data) { - struct recv_reorder_ctrl *preorder_ctrl = pcontext; + struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)data; struct adapter *padapter = preorder_ctrl->padapter; struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue; @@ -1957,7 +1960,8 @@ void rtw_reordering_ctrl_timeout_handler(void *pcontext) spin_lock_bh(&ppending_recvframe_queue->lock); if (recv_indicatepkts_in_order(padapter, preorder_ctrl, true) == true) - _set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME); + mod_timer(&preorder_ctrl->reordering_ctrl_timer, + jiffies + msecs_to_jiffies(REORDER_WAIT_TIME)); spin_unlock_bh(&ppending_recvframe_queue->lock); } @@ -2130,9 +2134,9 @@ _recv_entry_drop: return ret; } -void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS) +void rtw_signal_stat_timer_hdl(unsigned long data) { - struct adapter *adapter = (struct adapter *)FunctionContext; + struct adapter *adapter = (struct adapter *)data; struct recv_priv *recvpriv = &adapter->recvpriv; u32 tmp_s, tmp_q; @@ -2159,7 +2163,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS) /* update value of signal_strength, rssi, signal_qual */ if (check_fwstate(&adapter->mlmepriv, _FW_UNDER_SURVEY) == false) { - tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength); + tmp_s = avg_signal_strength+(_alpha-1)*recvpriv->signal_strength; if (tmp_s % _alpha) tmp_s = tmp_s/_alpha + 1; else @@ -2167,7 +2171,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS) if (tmp_s > 100) tmp_s = 100; - tmp_q = (avg_signal_qual+(_alpha-1)*recvpriv->signal_qual); + tmp_q = avg_signal_qual+(_alpha-1)*recvpriv->signal_qual; if (tmp_q % _alpha) tmp_q = tmp_q/_alpha + 1; else |