mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-10 15:23:06 +00:00
rtl8188eu: rtw_get_current_time() is jiffies
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
209e50ad60
commit
61690cbca6
16 changed files with 46 additions and 53 deletions
|
@ -1168,7 +1168,7 @@ netdev_open_error:
|
|||
int rtw_ips_pwr_up(struct adapter *padapter)
|
||||
{
|
||||
int result;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
DBG_88E("===> rtw_ips_pwr_up..............\n");
|
||||
rtw_reset_drv_sw(padapter);
|
||||
|
||||
|
@ -1182,7 +1182,7 @@ int rtw_ips_pwr_up(struct adapter *padapter)
|
|||
|
||||
void rtw_ips_pwr_down(struct adapter *padapter)
|
||||
{
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
DBG_88E("===> rtw_ips_pwr_down...................\n");
|
||||
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
|
|
|
@ -159,11 +159,6 @@ void _rtw_init_queue(struct __queue *pqueue)
|
|||
spin_lock_init(&(pqueue->lock));
|
||||
}
|
||||
|
||||
u32 rtw_get_current_time(void)
|
||||
{
|
||||
return jiffies;
|
||||
}
|
||||
|
||||
inline u32 rtw_systime_to_ms(u32 systime)
|
||||
{
|
||||
return systime * 1000 / HZ;
|
||||
|
@ -174,8 +169,7 @@ inline u32 rtw_ms_to_systime(u32 ms)
|
|||
return ms * HZ / 1000;
|
||||
}
|
||||
|
||||
/* the input parameter start use the same unit as returned by
|
||||
* rtw_get_current_time */
|
||||
/* the input parameter start use the same unit as jiffies */
|
||||
inline s32 rtw_get_passing_time_ms(u32 start)
|
||||
{
|
||||
return rtw_systime_to_ms(jiffies-start);
|
||||
|
|
|
@ -90,16 +90,16 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
|
|||
u32 cur_time = 0;
|
||||
|
||||
if (psecuritypriv->last_mic_err_time == 0) {
|
||||
psecuritypriv->last_mic_err_time = rtw_get_current_time();
|
||||
psecuritypriv->last_mic_err_time = jiffies;
|
||||
} else {
|
||||
cur_time = rtw_get_current_time();
|
||||
cur_time = jiffies;
|
||||
|
||||
if (cur_time - psecuritypriv->last_mic_err_time < 60*HZ) {
|
||||
psecuritypriv->btkip_countermeasure = true;
|
||||
psecuritypriv->last_mic_err_time = 0;
|
||||
psecuritypriv->btkip_countermeasure_time = cur_time;
|
||||
} else {
|
||||
psecuritypriv->last_mic_err_time = rtw_get_current_time();
|
||||
psecuritypriv->last_mic_err_time = jiffies;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -475,7 +475,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
|
||||
|
||||
int ret = 0;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
|
||||
|
||||
DBG_88E("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
|
||||
|
@ -555,7 +555,7 @@ int rtw_resume_process(struct adapter *padapter)
|
|||
struct net_device *pnetdev;
|
||||
struct pwrctrl_priv *pwrpriv = NULL;
|
||||
int ret = -1;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
|
||||
DBG_88E("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
|
||||
|
||||
|
|
|
@ -144,7 +144,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||
}
|
||||
|
||||
haldata = GET_HAL_DATA(padapter);
|
||||
haldata->srestpriv.last_tx_complete_time = rtw_get_current_time();
|
||||
haldata->srestpriv.last_tx_complete_time = jiffies;
|
||||
|
||||
check_completion:
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx,
|
||||
|
@ -225,7 +225,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
|||
if (!status) {
|
||||
struct hal_data_8188e *haldata = GET_HAL_DATA(padapter);
|
||||
|
||||
haldata->srestpriv.last_tx_time = rtw_get_current_time();
|
||||
haldata->srestpriv.last_tx_time = jiffies;
|
||||
} else {
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR);
|
||||
DBG_88E("usb_write_port, status =%d\n", status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue