mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove wrapper routine rtw_get_current_time()
This wrapper can be replaced with jiffies. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e6a0d110e4
commit
1e6accffc4
21 changed files with 67 additions and 82 deletions
|
@ -4292,7 +4292,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
|
|||
u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq);
|
||||
u8 category, action;
|
||||
int type = (-1);
|
||||
u32 start = rtw_get_current_time();
|
||||
u32 start = jiffies;
|
||||
|
||||
/* cookie generation */
|
||||
*cookie = (unsigned long) buf;
|
||||
|
|
|
@ -1582,7 +1582,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
u32 curr_time, delta_time;
|
||||
|
||||
/* under DHCP(Special packet) */
|
||||
curr_time = rtw_get_current_time();
|
||||
curr_time = jiffies;
|
||||
delta_time = curr_time - adapter_to_pwrctl(padapter)->DelayLPSLastTimeStamp;
|
||||
delta_time = rtw_systime_to_ms(delta_time);
|
||||
if (delta_time < 500) /* 500ms */
|
||||
|
|
|
@ -1217,7 +1217,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_871X("===> rtw_ips_pwr_up..............\n");
|
||||
rtw_reset_drv_sw(padapter);
|
||||
|
||||
|
@ -1232,7 +1232,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_871X("===> rtw_ips_pwr_down...................\n");
|
||||
|
||||
padapter->bCardDisableWOHSM = true;
|
||||
|
|
|
@ -282,7 +282,7 @@ void rtw_mstat_update(const enum mstat_f flags, const MSTAT_STATUS status, u32 s
|
|||
|
||||
/* if (rtw_get_passing_time_ms(update_time) > 5000) { */
|
||||
/* rtw_mstat_dump(); */
|
||||
update_time=rtw_get_current_time();
|
||||
update_time=jiffies;
|
||||
/* */
|
||||
}
|
||||
|
||||
|
@ -663,11 +663,6 @@ u32 rtw_end_of_queue_search(struct list_head *head, struct list_head *plist)
|
|||
}
|
||||
|
||||
|
||||
u32 rtw_get_current_time(void)
|
||||
{
|
||||
return jiffies;
|
||||
}
|
||||
|
||||
inline u32 rtw_systime_to_ms(u32 systime)
|
||||
{
|
||||
return systime * 1000 / HZ;
|
||||
|
@ -678,7 +673,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 jiffies */
|
||||
inline s32 rtw_get_passing_time_ms(u32 start)
|
||||
{
|
||||
return rtw_systime_to_ms(jiffies-start);
|
||||
|
|
|
@ -121,16 +121,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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -620,7 +620,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
|
|||
|
||||
|
||||
int ret = 0;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
|
||||
;
|
||||
|
||||
|
@ -698,7 +698,7 @@ int rtw_resume_process(struct adapter *padapter)
|
|||
struct net_device *pnetdev;
|
||||
struct pwrctrl_priv *pwrpriv;
|
||||
int ret = -1;
|
||||
u32 start_time = rtw_get_current_time();
|
||||
u32 start_time = jiffies;
|
||||
#ifdef CONFIG_BT_COEXIST
|
||||
u8 pm_cnt;
|
||||
#endif /* ifdef CONFIG_BT_COEXIST */
|
||||
|
|
|
@ -392,7 +392,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
|||
|
||||
{
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.last_tx_complete_time = rtw_get_current_time();
|
||||
pHalData->srestpriv.last_tx_complete_time = jiffies;
|
||||
}
|
||||
check_completion:
|
||||
_enter_critical(&pxmitpriv->lock_sctx, &irqL);
|
||||
|
@ -532,7 +532,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
|||
status = usb_submit_urb(purb, GFP_ATOMIC);
|
||||
if (!status) {
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||
pHalData->srestpriv.last_tx_time = rtw_get_current_time();
|
||||
pHalData->srestpriv.last_tx_time = jiffies;
|
||||
} else {
|
||||
rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR);
|
||||
DBG_871X("usb_write_port, status=%d\n", status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue