rtl8188eu: Routine rtw_get_current_time() is a synonym for jiffies

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2018-12-21 21:55:20 -06:00
parent 537fff9e9d
commit 45a86628d2
32 changed files with 127 additions and 133 deletions

View file

@ -1877,7 +1877,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms)
u32 start;
u32 pass_ms;
start = rtw_get_current_time();
start = jiffies;
while (rtw_get_passing_time_ms(start) <= timeout_ms) {
@ -5027,7 +5027,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy,
RTW_INFO(FUNC_ADPT_FMT" init listen_channel %u\n"
, FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel);
} else if (rtw_p2p_chk_state(pwdinfo , P2P_STATE_LISTEN)
&& (time_after_eq((unsigned long)rtw_get_current_time(), (unsigned long)pwdev_priv->probe_resp_ie_update_time)
&& (time_after_eq((unsigned long)jiffies, (unsigned long)pwdev_priv->probe_resp_ie_update_time)
&& rtw_get_passing_time_ms(pwdev_priv->probe_resp_ie_update_time) < 50)
) {
if (padapter->wdinfo.listen_channel != remain_ch) {
@ -5069,7 +5069,7 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy,
rtw_cfg80211_set_is_roch(padapter, true);
pcfg80211_wdinfo->ro_ch_wdev = wdev;
pcfg80211_wdinfo->remain_on_ch_cookie = *cookie;
pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time();
pcfg80211_wdinfo->last_ro_ch_time = jiffies;
memcpy(&pcfg80211_wdinfo->remain_on_ch_channel, channel, sizeof(struct ieee80211_channel));
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
pcfg80211_wdinfo->remain_on_ch_type = channel_type;
@ -5592,7 +5592,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
u8 category, action;
u8 frame_styp;
int type = (-1);
u32 start = rtw_get_current_time();
u32 start = jiffies;
_adapter *padapter;
struct dvobj_priv *dvobj;
struct rtw_wdev_priv *pwdev_priv;
@ -6373,7 +6373,7 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len,
ret = rtw_cfg80211_set_probe_resp_wpsp2pie(net, buf, len);
#ifdef CONFIG_P2P
if (ret == 0)
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->probe_resp_ie_update_time = rtw_get_current_time();
adapter_wdev_data((_adapter *)rtw_netdev_priv(net))->probe_resp_ie_update_time = jiffies;
#endif
break;
case 0x4: /* ASSOC_RESP */
@ -6920,7 +6920,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy)
spin_lock_init(&pwdev_priv->scan_req_lock);
pwdev_priv->p2p_enabled = false;
pwdev_priv->probe_resp_ie_update_time = rtw_get_current_time();
pwdev_priv->probe_resp_ie_update_time = jiffies;
pwdev_priv->provdisc_req_issued = false;
rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
rtw_wdev_nego_info_init(&pwdev_priv->nego_info);

View file

@ -7894,7 +7894,7 @@ static int rtw_wowlan_ctrl(struct net_device *dev,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL;
int ret = 0;
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
poidparam.subcode = 0;
RTW_INFO("+rtw_wowlan_ctrl: %s\n", extra);
@ -7963,7 +7963,7 @@ static int rtw_wowlan_set_pattern(struct net_device *dev,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wowlan_ioctl_param poidparam;
int ret = 0, len = 0, i = 0;
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
u8 input[wrqu->data.length];
u8 index = 0;
@ -8034,7 +8034,7 @@ static int rtw_ap_wowlan_ctrl(struct net_device *dev,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL;
int ret = 0;
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
poidparam.subcode = 0;
RTW_INFO("+rtw_ap_wowlan_ctrl: %s\n", extra);

View file

@ -2894,7 +2894,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
#ifdef DBG_CONFIG_ERROR_DETECT
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
RTW_INFO("===> rtw_ips_pwr_up..............\n");
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS)
@ -2915,7 +2915,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
void rtw_ips_pwr_down(_adapter *padapter)
{
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
RTW_INFO("===> rtw_ips_pwr_down...................\n");
padapter->net_closed = true;
@ -3770,7 +3770,7 @@ int rtw_suspend_common(_adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ret = 0;
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
RTW_INFO(" suspend start\n");
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
@ -4226,7 +4226,7 @@ exit:
int rtw_resume_common(_adapter *padapter)
{
int ret = 0;
u32 start_time = rtw_get_current_time();
u32 start_time = jiffies;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;

View file

@ -352,7 +352,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(RTW_DBGDUMP); */
update_time = rtw_get_current_time();
update_time = jiffies;
/* } */
}
@ -756,12 +756,6 @@ u32 rtw_end_of_queue_search(_list *head, _list *plist)
return false;
}
u32 rtw_get_current_time(void)
{
return jiffies;
}
inline u32 rtw_systime_to_ms(u32 systime)
{
return systime * 1000 / HZ;

View file

@ -507,16 +507,17 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, 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();
} else {
psecuritypriv->last_mic_err_time = jiffies;
}
}
#ifdef CONFIG_IOCTL_CFG80211

View file

@ -793,7 +793,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
}
}
pmlmeext->last_scan_time = rtw_get_current_time();
pmlmeext->last_scan_time = jiffies;
RTW_INFO("<======== %s return %d\n", __func__, ret);
return ret;

View file

@ -485,7 +485,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
#ifdef DBG_CONFIG_ERROR_DETECT
{
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;
}
#endif
@ -604,7 +604,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
#ifdef DBG_CONFIG_ERROR_DETECT
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
pHalData->srestpriv.last_tx_time = rtw_get_current_time();
pHalData->srestpriv.last_tx_time = jiffies;
}
#endif
} else {