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

@ -1912,7 +1912,7 @@ void rtw_bf_update_traffic(PADAPTER adapter)
last_timestamp = bfee->tx_timestamp; last_timestamp = bfee->tx_timestamp;
last_bytes = bfee->tx_bytes; last_bytes = bfee->tx_bytes;
bfee->tx_timestamp = rtw_get_current_time(); bfee->tx_timestamp = jiffies;
bfee->tx_bytes = sta->sta_stats.tx_bytes; bfee->tx_bytes = sta->sta_stats.tx_bytes;
if (last_timestamp) { if (last_timestamp) {
if (bfee->tx_bytes >= last_bytes) if (bfee->tx_bytes >= last_bytes)

View file

@ -592,7 +592,7 @@ _next:
continue; continue;
} }
cmd_start_time = rtw_get_current_time(); cmd_start_time = jiffies;
pcmdpriv->cmd_issued_cnt++; pcmdpriv->cmd_issued_cnt++;
if (pcmd->cmdsz > MAX_CMDSZ) { if (pcmd->cmdsz > MAX_CMDSZ) {
@ -915,7 +915,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, NDIS_802_11_SSID *ssid, int ssid_num,
if (res == _SUCCESS) { if (res == _SUCCESS) {
pmlmepriv->scan_start_time = rtw_get_current_time(); pmlmepriv->scan_start_time = jiffies;
#ifdef CONFIG_SCAN_BACKOP #ifdef CONFIG_SCAN_BACKOP
if (rtw_mi_buddy_check_mlmeinfo_state(padapter, WIFI_FW_AP_STATE)) { if (rtw_mi_buddy_check_mlmeinfo_state(padapter, WIFI_FW_AP_STATE)) {
@ -2690,7 +2690,7 @@ void lps_ctrl_wk_hdl(_adapter *padapter, u8 lps_ctrl_type)
break; break;
case LPS_CTRL_SPECIAL_PACKET: case LPS_CTRL_SPECIAL_PACKET:
/* RTW_INFO("LPS_CTRL_SPECIAL_PACKET\n"); */ /* RTW_INFO("LPS_CTRL_SPECIAL_PACKET\n"); */
pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time(); pwrpriv->DelayLPSLastTimeStamp = jiffies;
#ifdef CONFIG_BT_COEXIST #ifdef CONFIG_BT_COEXIST
rtw_btcoex_SpecialPacketNotify(padapter, PACKET_DHCP); rtw_btcoex_SpecialPacketNotify(padapter, PACKET_DHCP);
#endif /* CONFIG_BT_COEXIST */ #endif /* CONFIG_BT_COEXIST */
@ -3228,7 +3228,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter)
{ {
struct sta_info *psta_bmc; struct sta_info *psta_bmc;
struct sta_priv *pstapriv = &padapter->stapriv; struct sta_priv *pstapriv = &padapter->stapriv;
u32 start = rtw_get_current_time(); u32 start = jiffies;
u8 empty = false; u8 empty = false;
psta_bmc = rtw_get_bcmc_stainfo(padapter); psta_bmc = rtw_get_bcmc_stainfo(padapter);
@ -4358,7 +4358,7 @@ unlock:
st->local_port = cpu_to_be16(local_port); st->local_port = cpu_to_be16(local_port);
st->remote_naddr = remote_naddr; st->remote_naddr = remote_naddr;
st->remote_port = cpu_to_be16(remote_port); st->remote_port = cpu_to_be16(remote_port);
st->set_time = rtw_get_current_time(); st->set_time = jiffies;
st->status = ST_STATUS_CHECK; st->status = ST_STATUS_CHECK;
_enter_critical_bh(&st_ctl->tracker_q.lock, &irqL); _enter_critical_bh(&st_ctl->tracker_q.lock, &irqL);
@ -4601,7 +4601,7 @@ void rtw_create_ibss_post_hdl(_adapter *padapter, int status)
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL); _exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
goto createbss_cmd_fail; goto createbss_cmd_fail;
} }
pwlan->last_scanned = rtw_get_current_time(); pwlan->last_scanned = jiffies;
} else } else
list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);

View file

@ -266,7 +266,7 @@ ReadEFuseByte(
u32 value32; u32 value32;
u8 readbyte; u8 readbyte;
u16 retry; u16 retry;
/* u32 start=rtw_get_current_time(); */ /* u32 start=jiffies; */
if (bPseudoTest) { if (bPseudoTest) {
Efuse_Read1ByteFromFakeContent(Adapter, _offset, pbuf); Efuse_Read1ByteFromFakeContent(Adapter, _offset, pbuf);

View file

@ -658,7 +658,7 @@ static u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
if (check_sc_interval) { if (check_sc_interval) {
/* Miracast can't do AP scan*/ /* Miracast can't do AP scan*/
passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime); passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime);
pmlmepriv->lastscantime = rtw_get_current_time(); pmlmepriv->lastscantime = jiffies;
if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) { if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) {
RTW_INFO(ADPT_FMT" bBusyTraffic == true\n", ADPT_ARG(padapter)); RTW_INFO(ADPT_FMT" bBusyTraffic == true\n", ADPT_ARG(padapter));
return true; return true;

View file

@ -349,7 +349,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv) /* (_queue
pnetwork->network_type = 0; pnetwork->network_type = 0;
pnetwork->fixed = false; pnetwork->fixed = false;
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = jiffies;
pnetwork->aid = 0; pnetwork->aid = 0;
pnetwork->join_res = 0; pnetwork->join_res = 0;
@ -923,10 +923,10 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL); rtw_hal_get_odm_var(adapter, HAL_ODM_ANTDIV_SELECT, &(target->PhyInfo.Optimum_antenna), NULL);
#endif #endif
memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target)); memcpy(&(pnetwork->network), target, get_WLAN_BSSID_EX_sz(target));
/* pnetwork->last_scanned = rtw_get_current_time(); */ /* pnetwork->last_scanned = jiffies; */
/* variable initialize */ /* variable initialize */
pnetwork->fixed = false; pnetwork->fixed = false;
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = jiffies;
pnetwork->network_type = 0; pnetwork->network_type = 0;
pnetwork->aid = 0; pnetwork->aid = 0;
@ -951,7 +951,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
#endif #endif
memcpy(&(pnetwork->network), target, bssid_ex_sz); memcpy(&(pnetwork->network), target, bssid_ex_sz);
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = jiffies;
/* bss info not receving from the right channel */ /* bss info not receving from the right channel */
if (pnetwork->network.PhyInfo.SignalQuality == 101) if (pnetwork->network.PhyInfo.SignalQuality == 101)
@ -967,7 +967,7 @@ void rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
*/ */
bool update_ie = true; bool update_ie = true;
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = jiffies;
/* target.Reserved[0]==1, means that scaned network is a bcn frame. */ /* target.Reserved[0]==1, means that scaned network is a bcn frame. */
if ((pnetwork->network.IELength > target->IELength) && (target->Reserved[0] == 1)) if ((pnetwork->network.IELength > target->IELength) && (target->Reserved[0] == 1))
@ -1586,7 +1586,7 @@ static u32 _rtw_wait_scan_done(_adapter *adapter, u8 abort, u32 timeout_ms)
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
start = rtw_get_current_time(); start = jiffies;
pmlmeext->scan_abort = abort; pmlmeext->scan_abort = abort;

View file

@ -485,7 +485,7 @@ u32 rtw_chset_get_ch_non_ocp_ms(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8 offset
if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false) if (rtw_chbw_to_freq_range(ch, bw, offset, &hi, &lo) == false)
goto exit; goto exit;
current_time = rtw_get_current_time(); current_time = jiffies;
for (i = 0; ch_set[i].ChannelNum != 0; i++) { for (i = 0; ch_set[i].ChannelNum != 0; i++) {
if (!rtw_ch2freq(ch_set[i].ChannelNum)) { if (!rtw_ch2freq(ch_set[i].ChannelNum)) {
@ -534,9 +534,9 @@ static void _rtw_chset_update_non_ocp(RT_CHANNEL_INFO *ch_set, u8 ch, u8 bw, u8
&& rtw_ch2freq(ch_set[i].ChannelNum) <= hi && rtw_ch2freq(ch_set[i].ChannelNum) <= hi
) { ) {
if (ms >= 0) if (ms >= 0)
ch_set[i].non_ocp_end_time = rtw_get_current_time() + rtw_ms_to_systime(ms); ch_set[i].non_ocp_end_time = jiffies + rtw_ms_to_systime(ms);
else else
ch_set[i].non_ocp_end_time = rtw_get_current_time() + rtw_ms_to_systime(NON_OCP_TIME_MS); ch_set[i].non_ocp_end_time = jiffies + rtw_ms_to_systime(NON_OCP_TIME_MS);
} }
} }
@ -588,7 +588,7 @@ u32 rtw_get_ch_waiting_ms(_adapter *adapter, u8 ch, u8 bw, u8 offset, u32 *r_non
cac_ms = 0; cac_ms = 0;
else if (in_rd_range && !non_ocp_ms) { else if (in_rd_range && !non_ocp_ms) {
if (IS_CH_WAITING(rfctl)) if (IS_CH_WAITING(rfctl))
cac_ms = rtw_systime_to_ms(rfctl->cac_end_time - rtw_get_current_time()); cac_ms = rtw_systime_to_ms(rfctl->cac_end_time - jiffies);
else else
cac_ms = 0; cac_ms = 0;
} else if (rtw_is_long_cac_ch(ch, bw, offset, rtw_odm_get_dfs_domain(adapter))) } else if (rtw_is_long_cac_ch(ch, bw, offset, rtw_odm_get_dfs_domain(adapter)))
@ -618,7 +618,7 @@ void rtw_reset_cac(_adapter *adapter, u8 ch, u8 bw, u8 offset)
, &cac_ms , &cac_ms
); );
rfctl->cac_start_time = rtw_get_current_time() + rtw_ms_to_systime(non_ocp_ms); rfctl->cac_start_time = jiffies + rtw_ms_to_systime(non_ocp_ms);
rfctl->cac_end_time = rfctl->cac_start_time + rtw_ms_to_systime(cac_ms); rfctl->cac_end_time = rfctl->cac_start_time + rtw_ms_to_systime(cac_ms);
/* skip special value */ /* skip special value */
@ -817,7 +817,7 @@ void dump_chset(void *sel, RT_CHANNEL_INFO *ch_set)
if (rtw_is_dfs_ch(ch_set[i].ChannelNum, CHANNEL_WIDTH_20, HAL_PRIME_CHNL_OFFSET_DONT_CARE)) { if (rtw_is_dfs_ch(ch_set[i].ChannelNum, CHANNEL_WIDTH_20, HAL_PRIME_CHNL_OFFSET_DONT_CARE)) {
if (CH_IS_NON_OCP(&ch_set[i])) if (CH_IS_NON_OCP(&ch_set[i]))
_RTW_PRINT_SEL(sel, ", non_ocp:%d" _RTW_PRINT_SEL(sel, ", non_ocp:%d"
, rtw_systime_to_ms(ch_set[i].non_ocp_end_time - rtw_get_current_time())); , rtw_systime_to_ms(ch_set[i].non_ocp_end_time - jiffies));
else else
_RTW_PRINT_SEL(sel, ", non_ocp:N/A"); _RTW_PRINT_SEL(sel, ", non_ocp:N/A");
} }
@ -1247,7 +1247,7 @@ static u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO *
#ifdef CONFIG_DFS_MASTER #ifdef CONFIG_DFS_MASTER
for (i = 0; i < chanset_size; i++) for (i = 0; i < chanset_size; i++)
channel_set[i].non_ocp_end_time = rtw_get_current_time(); channel_set[i].non_ocp_end_time = jiffies;
#endif #endif
#endif /* CONFIG_IEEE80211_BAND_5GHZ */ #endif /* CONFIG_IEEE80211_BAND_5GHZ */
@ -6262,7 +6262,7 @@ int issue_probereq_p2p_ex(_adapter *adapter, u8 *da, int try_cnt, int wait_ms)
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
do { do {
ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false); ret = _issue_probereq_p2p(adapter, da, wait_ms > 0 ? true : false);
@ -8076,7 +8076,7 @@ int issue_probereq_ex(_adapter *padapter, NDIS_802_11_SSID *pssid, u8 *da, u8 ch
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter))) if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit; goto exit;
@ -9025,7 +9025,7 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
struct sta_info *psta; struct sta_info *psta;
@ -9217,7 +9217,7 @@ int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, int try_c
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -9358,7 +9358,7 @@ int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_c
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter))) if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit; goto exit;
@ -9772,7 +9772,7 @@ inline u8 issue_addba_rsp_wait_ack(_adapter *adapter, unsigned char *ra, u8 tid,
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter))) if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter)))
goto exit; goto exit;
@ -9850,7 +9850,7 @@ int issue_del_ba_ex(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter))) if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(adapter)))
goto exit; goto exit;
@ -10130,7 +10130,7 @@ int issue_action_SM_PS_wait_ack(_adapter *padapter, unsigned char *raddr, u8 New
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter))) if (rtw_rfctl_is_tx_blocked_by_ch_waiting(adapter_to_rfctl(padapter)))
goto exit; goto exit;
@ -10291,7 +10291,7 @@ unsigned int send_beacon(_adapter *padapter)
return _SUCCESS; return _SUCCESS;
#endif #endif
u32 start = rtw_get_current_time(); u32 start = jiffies;
rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL); rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL);
rtw_hal_set_hwreg(padapter, HW_VAR_DL_BCN_SEL, NULL); rtw_hal_set_hwreg(padapter, HW_VAR_DL_BCN_SEL, NULL);
@ -13194,7 +13194,7 @@ static u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u
goto exit; goto exit;
if (mlmeext->last_scan_time == 0) if (mlmeext->last_scan_time == 0)
mlmeext->last_scan_time = rtw_get_current_time(); mlmeext->last_scan_time = jiffies;
interval = rtw_get_passing_time_ms(mlmeext->last_scan_time); interval = rtw_get_passing_time_ms(mlmeext->last_scan_time);
@ -13250,7 +13250,7 @@ static u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u
memset(&ch[k], 0, sizeof(struct rtw_ieee80211_channel)); memset(&ch[k], 0, sizeof(struct rtw_ieee80211_channel));
ret_num = k; ret_num = k;
mlmeext->last_scan_time = rtw_get_current_time(); mlmeext->last_scan_time = jiffies;
} }
exit: exit:
@ -13934,7 +13934,7 @@ operation_by_state:
} }
mlmeext_set_scan_state(pmlmeext, SCAN_BACK_OP); mlmeext_set_scan_state(pmlmeext, SCAN_BACK_OP);
ss->backop_time = rtw_get_current_time(); ss->backop_time = jiffies;
if (mlmeext_chk_scan_backop_flags(pmlmeext, SS_BACKOP_TX_RESUME)) if (mlmeext_chk_scan_backop_flags(pmlmeext, SS_BACKOP_TX_RESUME))
rtw_mi_os_xmit_schedule(padapter); rtw_mi_os_xmit_schedule(padapter);

View file

@ -3338,7 +3338,7 @@ static int cancel_ro_ch_handler(_adapter *padapter, u8 *buf)
rtw_cfg80211_set_is_roch(padapter, false); rtw_cfg80211_set_is_roch(padapter, false);
pcfg80211_wdinfo->ro_ch_wdev = NULL; pcfg80211_wdinfo->ro_ch_wdev = NULL;
pcfg80211_wdinfo->last_ro_ch_time = rtw_get_current_time(); pcfg80211_wdinfo->last_ro_ch_time = jiffies;
rtw_cfg80211_remain_on_channel_expired(wdev rtw_cfg80211_remain_on_channel_expired(wdev
, pcfg80211_wdinfo->remain_on_ch_cookie , pcfg80211_wdinfo->remain_on_ch_cookie
@ -5048,7 +5048,7 @@ void init_wifidirect_info(_adapter *padapter, enum P2P_ROLE role)
rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE); rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
pwdinfo->listen_dwell = (u8)((rtw_get_current_time() % 3) + 1); pwdinfo->listen_dwell = (u8)((jiffies % 3) + 1);
/* RTW_INFO( "[%s] listen_dwell time is %d00ms\n", __func__, pwdinfo->listen_dwell ); */ /* RTW_INFO( "[%s] listen_dwell time is %d00ms\n", __func__, pwdinfo->listen_dwell ); */
memset(&pwdinfo->tx_prov_disc_info, 0x00, sizeof(struct tx_provdisc_req_info)); memset(&pwdinfo->tx_prov_disc_info, 0x00, sizeof(struct tx_provdisc_req_info));

View file

@ -195,7 +195,7 @@ static bool rtw_pwr_unassociated_idle(_adapter *adapter)
goto exit; goto exit;
} }
if (adapter_to_pwrctl(adapter)->ips_deny_time >= rtw_get_current_time()) { if (adapter_to_pwrctl(adapter)->ips_deny_time >= jiffies) {
/* RTW_INFO("%s ips_deny_time\n", __func__); */ /* RTW_INFO("%s ips_deny_time\n", __func__); */
goto exit; goto exit;
} }
@ -419,7 +419,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
xmit_cnt += tx_packets; xmit_cnt += tx_packets;
if (start_time == 0) if (start_time == 0)
start_time = rtw_get_current_time(); start_time = jiffies;
if (rtw_get_passing_time_ms(start_time) > 2000) { /* 2 sec == watch dog timer */ if (rtw_get_passing_time_ms(start_time) > 2000) { /* 2 sec == watch dog timer */
if (xmit_cnt > 8) { if (xmit_cnt > 8) {
@ -434,7 +434,7 @@ void traffic_check_for_leave_lps(PADAPTER padapter, u8 tx, u32 tx_packets)
} }
} }
start_time = rtw_get_current_time(); start_time = jiffies;
xmit_cnt = 0; xmit_cnt = 0;
} }
@ -542,7 +542,7 @@ void rtw_set_rpwm(PADAPTER padapter, u8 pslv)
u8 cpwm_now; u8 cpwm_now;
u8 poll_cnt = 0; u8 poll_cnt = 0;
start_time = rtw_get_current_time(); start_time = jiffies;
/* polling cpwm */ /* polling cpwm */
do { do {
@ -611,7 +611,7 @@ static u8 PS_RDY_CHECK(_adapter *padapter)
return false; return false;
#endif #endif
curr_time = rtw_get_current_time(); curr_time = jiffies;
delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp; delta_time = curr_time - pwrpriv->DelayLPSLastTimeStamp;
@ -735,7 +735,7 @@ void rtw_set_fw_in_ips_mode(PADAPTER padapter, u8 enable)
adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80; adapter_to_pwrctl(padapter)->tog = (val8 + 0x80) & 0x80;
/* do polling cpwm */ /* do polling cpwm */
start_time = rtw_get_current_time(); start_time = jiffies;
do { do {
rtw_mdelay_os(1); rtw_mdelay_os(1);
@ -868,7 +868,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
u32 start_time, delay_ms; u32 start_time, delay_ms;
u8 val8; u8 val8;
delay_ms = 20; delay_ms = 20;
start_time = rtw_get_current_time(); start_time = jiffies;
do { do {
rtw_hal_get_hwreg(padapter, HW_VAR_SYS_CLKR, &val8); rtw_hal_get_hwreg(padapter, HW_VAR_SYS_CLKR, &val8);
if (!(val8 & BIT(4))) { /* 0x08 bit4 =1 --> in 32k, bit4 = 0 --> leave 32k */ if (!(val8 & BIT(4))) { /* 0x08 bit4 =1 --> in 32k, bit4 = 0 --> leave 32k */
@ -994,7 +994,7 @@ s32 LPS_RF_ON_check(PADAPTER padapter, u32 delay_ms)
s32 err = 0; s32 err = 0;
start_time = rtw_get_current_time(); start_time = jiffies;
while (1) { while (1) {
rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake); rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake);
if (bAwake) if (bAwake)
@ -1164,7 +1164,7 @@ void LeaveAllPowerSaveModeDirect(PADAPTER Adapter)
#ifndef CONFIG_DETECT_CPWM_BY_POLLING #ifndef CONFIG_DETECT_CPWM_BY_POLLING
start_time = rtw_get_current_time(); start_time = jiffies;
/* polling cpwm */ /* polling cpwm */
do { do {
@ -1314,7 +1314,7 @@ void LPS_Leave_check(
pwrpriv = adapter_to_pwrctl(padapter); pwrpriv = adapter_to_pwrctl(padapter);
bReady = false; bReady = false;
start_time = rtw_get_current_time(); start_time = jiffies;
rtw_yield_os(); rtw_yield_os();
@ -2241,7 +2241,7 @@ u8 rtw_interface_ps_func(_adapter *padapter, HAL_INTF_PS_FUNC efunc_id, u8 *val)
inline void rtw_set_ips_deny(_adapter *padapter, u32 ms) inline void rtw_set_ips_deny(_adapter *padapter, u32 ms)
{ {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ms); pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ms);
} }
/* /*
@ -2258,7 +2258,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
struct mlme_priv *pmlmepriv; struct mlme_priv *pmlmepriv;
int ret = _SUCCESS; int ret = _SUCCESS;
int i; int i;
u32 start = rtw_get_current_time(); u32 start = jiffies;
/* for LPS */ /* for LPS */
LeaveAllPowerSaveMode(padapter); LeaveAllPowerSaveMode(padapter);
@ -2267,8 +2267,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
padapter = GET_PRIMARY_ADAPTER(padapter); padapter = GET_PRIMARY_ADAPTER(padapter);
pmlmepriv = &padapter->mlmepriv; pmlmepriv = &padapter->mlmepriv;
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms)) if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms))
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms); pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
if (pwrpriv->ps_processing) { if (pwrpriv->ps_processing) {
@ -2383,8 +2383,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
} }
exit: exit:
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms)) if (pwrpriv->ips_deny_time < jiffies + rtw_ms_to_systime(ips_deffer_ms))
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms); pwrpriv->ips_deny_time = jiffies + rtw_ms_to_systime(ips_deffer_ms);
return ret; return ret;
} }

View file

@ -1396,7 +1396,7 @@ sint ap2sta_data_frame(
/* RTW_INFO("After send deauth , %u ms has elapsed.\n", rtw_get_passing_time_ms(send_issue_deauth_time)); */ /* RTW_INFO("After send deauth , %u ms has elapsed.\n", rtw_get_passing_time_ms(send_issue_deauth_time)); */
if (rtw_get_passing_time_ms(send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) { if (rtw_get_passing_time_ms(send_issue_deauth_time) > 10000 || send_issue_deauth_time == 0) {
send_issue_deauth_time = rtw_get_current_time(); send_issue_deauth_time = jiffies;
RTW_INFO("issue_deauth to the ap=" MAC_FMT " for the reason(7)\n", MAC_ARG(pattrib->bssid)); RTW_INFO("issue_deauth to the ap=" MAC_FMT " for the reason(7)\n", MAC_ARG(pattrib->bssid));
@ -4076,7 +4076,7 @@ void rx_query_phy_status(
if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) { if ((start_time == 0) || (rtw_get_passing_time_ms(start_time) > 5000)) {
RTW_PRINT("Warning!!! %s: Confilc mac addr!!\n", __func__); RTW_PRINT("Warning!!! %s: Confilc mac addr!!\n", __func__);
start_time = rtw_get_current_time(); start_time = jiffies;
} }
pdbgpriv->dbg_rx_conflic_mac_addr_cnt++; pdbgpriv->dbg_rx_conflic_mac_addr_cnt++;
} else { } else {

View file

@ -830,7 +830,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
res = _FAIL; res = _FAIL;
if (start == 0) if (start == 0)
start = rtw_get_current_time(); start = jiffies;
if (is_broadcast_mac_addr(prxattrib->ra)) if (is_broadcast_mac_addr(prxattrib->ra))
no_gkey_bc_cnt++; no_gkey_bc_cnt++;
@ -842,7 +842,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n", RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n",
FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt); FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt);
} }
start = rtw_get_current_time(); start = jiffies;
no_gkey_bc_cnt = 0; no_gkey_bc_cnt = 0;
no_gkey_mc_cnt = 0; no_gkey_mc_cnt = 0;
} }
@ -1957,7 +1957,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
res = _FAIL; res = _FAIL;
if (start == 0) if (start == 0)
start = rtw_get_current_time(); start = jiffies;
if (is_broadcast_mac_addr(prxattrib->ra)) if (is_broadcast_mac_addr(prxattrib->ra))
no_gkey_bc_cnt++; no_gkey_bc_cnt++;
@ -1969,7 +1969,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n", RTW_PRINT(FUNC_ADPT_FMT" no_gkey_bc_cnt:%u, no_gkey_mc_cnt:%u\n",
FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt); FUNC_ADPT_ARG(padapter), no_gkey_bc_cnt, no_gkey_mc_cnt);
} }
start = rtw_get_current_time(); start = jiffies;
no_gkey_bc_cnt = 0; no_gkey_bc_cnt = 0;
no_gkey_mc_cnt = 0; no_gkey_mc_cnt = 0;
} }

View file

@ -272,7 +272,7 @@ void sreset_reset(_adapter *padapter)
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned long irqL; unsigned long irqL;
u32 start = rtw_get_current_time(); u32 start = jiffies;
struct dvobj_priv *psdpriv = padapter->dvobj; struct dvobj_priv *psdpriv = padapter->dvobj;
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg; struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;

View file

@ -222,7 +222,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig
{ {
int ret; int ret;
int i = 0; int i = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
@ -669,7 +669,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
u8 take_care_iqk; u8 take_care_iqk;
s32 ret = _FAIL; s32 ret = _FAIL;
ch_sw_time_start = rtw_systime_to_ms(rtw_get_current_time()); ch_sw_time_start = rtw_systime_to_ms(jiffies);
rtw_tdls_chsw_oper_init(padapter, TDLS_CH_SWITCH_OPER_OFFLOAD_TIMEOUT); rtw_tdls_chsw_oper_init(padapter, TDLS_CH_SWITCH_OPER_OFFLOAD_TIMEOUT);
@ -710,7 +710,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
if (take_care_iqk == true) if (take_care_iqk == true)
rtw_hal_ch_sw_iqk_info_restore(padapter, CH_SW_USE_CASE_TDLS); rtw_hal_ch_sw_iqk_info_restore(padapter, CH_SW_USE_CASE_TDLS);
ch_sw_time_spent = rtw_systime_to_ms(rtw_get_current_time()) - ch_sw_time_start; ch_sw_time_spent = rtw_systime_to_ms(jiffies) - ch_sw_time_start;
if (chnl_type == TDLS_CH_SW_OFF_CHNL) { if (chnl_type == TDLS_CH_SW_OFF_CHNL) {
if ((u32)ch_switch_time / 1000 > ch_sw_time_spent) if ((u32)ch_switch_time / 1000 > ch_sw_time_spent)
@ -2464,7 +2464,7 @@ void rtw_build_tdls_setup_req_ies(_adapter *padapter, struct xmit_frame *pxmitfr
/* SNonce */ /* SNonce */
if (pattrib->encrypt) { if (pattrib->encrypt) {
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
time = rtw_get_current_time(); time = jiffies;
memcpy(&ptdls_sta->SNonce[4 * i], (u8 *)&time, 4); memcpy(&ptdls_sta->SNonce[4 * i], (u8 *)&time, 4);
} }
} }
@ -2532,7 +2532,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if (pattrib->encrypt && ptdls_sta != NULL) { if (pattrib->encrypt && ptdls_sta != NULL) {
for (k = 0; k < 8; k++) { for (k = 0; k < 8; k++) {
time = rtw_get_current_time(); time = jiffies;
memcpy(&ptdls_sta->ANonce[4 * k], (u8 *)&time, 4); memcpy(&ptdls_sta->ANonce[4 * k], (u8 *)&time, 4);
} }
} }

View file

@ -453,7 +453,7 @@ inline void rtw_set_oper_ch(_adapter *adapter, u8 ch)
struct dvobj_priv *dvobj = adapter_to_dvobj(adapter); struct dvobj_priv *dvobj = adapter_to_dvobj(adapter);
if (dvobj->oper_channel != ch) { if (dvobj->oper_channel != ch) {
dvobj->on_oper_ch_time = rtw_get_current_time(); dvobj->on_oper_ch_time = jiffies;
#ifdef DBG_CH_SWITCH #ifdef DBG_CH_SWITCH
cnt += snprintf(msg + cnt, len - cnt, "switch to ch %3u", ch); cnt += snprintf(msg + cnt, len - cnt, "switch to ch %3u", ch);

View file

@ -3895,14 +3895,14 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
DBG_COUNTER(padapter->tx_logs.core_tx); DBG_COUNTER(padapter->tx_logs.core_tx);
if (start == 0) if (start == 0)
start = rtw_get_current_time(); start = jiffies;
pxmitframe = rtw_alloc_xmitframe(pxmitpriv); pxmitframe = rtw_alloc_xmitframe(pxmitpriv);
if (rtw_get_passing_time_ms(start) > 2000) { if (rtw_get_passing_time_ms(start) > 2000) {
if (drop_cnt) if (drop_cnt)
RTW_INFO("DBG_TX_DROP_FRAME %s no more pxmitframe, drop_cnt:%u\n", __func__, drop_cnt); RTW_INFO("DBG_TX_DROP_FRAME %s no more pxmitframe, drop_cnt:%u\n", __func__, drop_cnt);
start = rtw_get_current_time(); start = jiffies;
drop_cnt = 0; drop_cnt = 0;
} }
@ -5012,7 +5012,7 @@ void rtw_amsdu_cancel_timer(_adapter *padapter, u8 priority)
void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms) void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms)
{ {
sctx->timeout_ms = timeout_ms; sctx->timeout_ms = timeout_ms;
sctx->submit_time = rtw_get_current_time(); sctx->submit_time = jiffies;
init_completion(&sctx->done); init_completion(&sctx->done);
sctx->status = RTW_SCTX_SUBMITTED; sctx->status = RTW_SCTX_SUBMITTED;
} }
@ -5073,7 +5073,7 @@ int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms)
{ {
struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops; struct submit_ctx *pack_tx_ops = &pxmitpriv->ack_tx_ops;
pack_tx_ops->submit_time = rtw_get_current_time(); pack_tx_ops->submit_time = jiffies;
pack_tx_ops->timeout_ms = timeout_ms; pack_tx_ops->timeout_ms = timeout_ms;
pack_tx_ops->status = RTW_SCTX_SUBMITTED; pack_tx_ops->status = RTW_SCTX_SUBMITTED;

View file

@ -362,7 +362,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist)
if (GLBtcBtCoexAliveRegistered == true) if (GLBtcBtCoexAliveRegistered == true)
return; return;
stime = rtw_get_current_time(); stime = jiffies;
do { do {
ready = rtw_register_task_alive(padapter, BTCOEX_ALIVE); ready = rtw_register_task_alive(padapter, BTCOEX_ALIVE);
if (_SUCCESS == ready) if (_SUCCESS == ready)
@ -422,7 +422,7 @@ void halbtcoutsrc_AggregationCheck(PBTC_COEXIST pBtCoexist)
/* It can only be called after 8 seconds. */ /* It can only be called after 8 seconds. */
/* ===================================== */ /* ===================================== */
curTime = rtw_systime_to_ms(rtw_get_current_time()); curTime = rtw_systime_to_ms(jiffies);
if ((curTime - preTime) < HALBTCOUTSRC_AGG_CHK_WINDOW_IN_MS) /* over 8 seconds you can execute this function again. */ if ((curTime - preTime) < HALBTCOUTSRC_AGG_CHK_WINDOW_IN_MS) /* over 8 seconds you can execute this function again. */
return; return;
else else

View file

@ -1333,7 +1333,7 @@ int c2h_iqk_offload_wait(_adapter *adapter, u32 timeout_ms)
HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter); HAL_DATA_TYPE *hal_data = GET_HAL_DATA(adapter);
struct submit_ctx *iqk_sctx = &hal_data->iqk_sctx; struct submit_ctx *iqk_sctx = &hal_data->iqk_sctx;
iqk_sctx->submit_time = rtw_get_current_time(); iqk_sctx->submit_time = jiffies;
iqk_sctx->timeout_ms = timeout_ms; iqk_sctx->timeout_ms = timeout_ms;
iqk_sctx->status = RTW_SCTX_SUBMITTED; iqk_sctx->status = RTW_SCTX_SUBMITTED;
@ -1480,7 +1480,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter)
int ret = _FAIL; int ret = _FAIL;
int ret_fwdl; int ret_fwdl;
u8 mac_hidden_rpt[MAC_HIDDEN_RPT_LEN + MAC_HIDDEN_RPT_2_LEN] = {0}; u8 mac_hidden_rpt[MAC_HIDDEN_RPT_LEN + MAC_HIDDEN_RPT_2_LEN] = {0};
u32 start = rtw_get_current_time(); u32 start = jiffies;
u32 cnt = 0; u32 cnt = 0;
u32 timeout_ms = 800; u32 timeout_ms = 800;
u32 min_cnt = 10; u32 min_cnt = 10;
@ -1504,7 +1504,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter)
goto mac_hidden_rpt_hdl; goto mac_hidden_rpt_hdl;
/* polling for data ready */ /* polling for data ready */
start = rtw_get_current_time(); start = jiffies;
do { do {
cnt++; cnt++;
id = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL); id = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
@ -1876,7 +1876,7 @@ u32 rtw_sec_read_cam(_adapter *adapter, u8 addr)
rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | addr); rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | addr);
start = rtw_get_current_time(); start = jiffies;
while (1) { while (1) {
if (rtw_is_surprise_removed(adapter)) { if (rtw_is_surprise_removed(adapter)) {
sr = 1; sr = 1;
@ -1892,7 +1892,7 @@ u32 rtw_sec_read_cam(_adapter *adapter, u8 addr)
break; break;
} }
} }
end = rtw_get_current_time(); end = jiffies;
rdata = rtw_read32(adapter, REG_CAMREAD); rdata = rtw_read32(adapter, REG_CAMREAD);
@ -1919,7 +1919,7 @@ void rtw_sec_write_cam(_adapter *adapter, u8 addr, u32 wdata)
rtw_write32(adapter, REG_CAMWRITE, wdata); rtw_write32(adapter, REG_CAMWRITE, wdata);
rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | CAM_WRITE | addr); rtw_write32(adapter, REG_CAMCMD, CAM_POLLINIG | CAM_WRITE | addr);
start = rtw_get_current_time(); start = jiffies;
while (1) { while (1) {
if (rtw_is_surprise_removed(adapter)) { if (rtw_is_surprise_removed(adapter)) {
sr = 1; sr = 1;
@ -1935,7 +1935,7 @@ void rtw_sec_write_cam(_adapter *adapter, u8 addr, u32 wdata)
break; break;
} }
} }
end = rtw_get_current_time(); end = jiffies;
_exit_critical_mutex(mutex, NULL); _exit_critical_mutex(mutex, NULL);
@ -6917,7 +6917,7 @@ static u32 _rtw_wow_pattern_read_cam(_adapter *adapter, u8 addr)
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_ADDR_V2(addr)); rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_ADDR_V2(addr));
start = rtw_get_current_time(); start = jiffies;
while (1) { while (1) {
if (rtw_is_surprise_removed(adapter)) if (rtw_is_surprise_removed(adapter))
break; break;
@ -6988,7 +6988,7 @@ static void _rtw_wow_pattern_write_cam(_adapter *adapter, u8 addr, u32 wdata)
rtw_write32(adapter, REG_WKFMCAM_RWD, wdata); rtw_write32(adapter, REG_WKFMCAM_RWD, wdata);
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_WE | BIT_WKFCAM_ADDR_V2(addr)); rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_WE | BIT_WKFCAM_ADDR_V2(addr));
start = rtw_get_current_time(); start = jiffies;
while (1) { while (1) {
if (rtw_is_surprise_removed(adapter)) if (rtw_is_surprise_removed(adapter))
break; break;
@ -7002,7 +7002,7 @@ static void _rtw_wow_pattern_write_cam(_adapter *adapter, u8 addr, u32 wdata)
break; break;
} }
} }
end = rtw_get_current_time(); end = jiffies;
_exit_critical_mutex(mutex, NULL); _exit_critical_mutex(mutex, NULL);
@ -7055,7 +7055,7 @@ static u8 _rtw_wow_pattern_clean_cam(_adapter *adapter)
_enter_critical_mutex(mutex, NULL); _enter_critical_mutex(mutex, NULL);
rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_CLR_V1); rtw_write32(adapter, REG_WKFMCAM_CMD, BIT_WKFCAM_POLLING_V1 | BIT_WKFCAM_CLR_V1);
start = rtw_get_current_time(); start = jiffies;
while (1) { while (1) {
if (rtw_is_surprise_removed(adapter)) if (rtw_is_surprise_removed(adapter))
break; break;

View file

@ -56,7 +56,7 @@ u8 rtw_hal_read_chip_info(_adapter *padapter)
{ {
u8 rtn = _SUCCESS; u8 rtn = _SUCCESS;
u8 hci_type = rtw_get_intf_type(padapter); u8 hci_type = rtw_get_intf_type(padapter);
u32 start = rtw_get_current_time(); u32 start = jiffies;
/* before access eFuse, make sure card enable has been called */ /* before access eFuse, make sure card enable has been called */
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI) if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)

View file

@ -1059,7 +1059,7 @@ static u8 rtw_hal_set_mcc_setting(PADAPTER padapter, u8 status)
u8 ret = _FAIL; u8 ret = _FAIL;
struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv); struct mcc_obj_priv *pmccobjpriv = &(adapter_to_dvobj(padapter)->mcc_objpriv);
u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? true : false; u8 stop = (status < MCC_SETCMD_STATUS_START_CONNECT) ? true : false;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter)); RTW_INFO("===> "FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(padapter));
@ -1289,14 +1289,14 @@ void rtw_hal_mcc_c2h_handler(PADAPTER padapter, u8 buflen, u8 *tmpBuf)
RTW_INFO("[MCC] TXNULL FAIL\n"); RTW_INFO("[MCC] TXNULL FAIL\n");
break; break;
case MCC_RPT_STOPMCC: case MCC_RPT_STOPMCC:
RTW_INFO("[MCC] MCC stop (time:%d)\n", rtw_get_current_time()); RTW_INFO("[MCC] MCC stop (time:%d)\n", jiffies);
pmccobjpriv->mcc_c2h_status = MCC_RPT_STOPMCC; pmccobjpriv->mcc_c2h_status = MCC_RPT_STOPMCC;
rtw_sctx_done(&mcc_sctx); rtw_sctx_done(&mcc_sctx);
break; break;
case MCC_RPT_READY: case MCC_RPT_READY:
_enter_critical_bh(&pmccobjpriv->mcc_lock, &irqL); _enter_critical_bh(&pmccobjpriv->mcc_lock, &irqL);
/* initialize counter & time */ /* initialize counter & time */
pmccobjpriv->mcc_launch_time = rtw_get_current_time(); pmccobjpriv->mcc_launch_time = jiffies;
pmccobjpriv->mcc_c2h_status = MCC_RPT_READY; pmccobjpriv->mcc_c2h_status = MCC_RPT_READY;
pmccobjpriv->cur_mcc_success_cnt = 0; pmccobjpriv->cur_mcc_success_cnt = 0;
pmccobjpriv->prev_mcc_success_cnt = 0; pmccobjpriv->prev_mcc_success_cnt = 0;
@ -1811,7 +1811,7 @@ void rtw_hal_mcc_issue_null_data(_adapter *padapter, u8 chbw_allow, u8 ps_mode)
{ {
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
_adapter *iface = NULL; _adapter *iface = NULL;
u32 start = rtw_get_current_time(); u32 start = jiffies;
u8 i = 0; u8 i = 0;
if (!MCC_EN(padapter)) if (!MCC_EN(padapter))

View file

@ -430,7 +430,7 @@ odm_get_current_time(
struct PHY_DM_STRUCT *p_dm_odm struct PHY_DM_STRUCT *p_dm_odm
) )
{ {
return (u64)rtw_get_current_time(); return (u64)jiffies;
} }
u64 u64

View file

@ -63,7 +63,7 @@ static s32 iol_execute(PADAPTER padapter, u8 control)
/* RTW_INFO("%s reg_0x88:0x%02x, write 0x%02x\n", __func__, reg_0x88, reg_0x88|control); */ /* RTW_INFO("%s reg_0x88:0x%02x, write 0x%02x\n", __func__, reg_0x88, reg_0x88|control); */
rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88 | control); rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88 | control);
t1 = start = rtw_get_current_time(); t1 = start = jiffies;
while ( while (
/* (reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */ /* (reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */
(reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0)) & control (reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0)) & control
@ -77,7 +77,7 @@ static s32 iol_execute(PADAPTER padapter, u8 control)
status = (reg_0x88 & control) ? _FAIL : _SUCCESS; status = (reg_0x88 & control) ? _FAIL : _SUCCESS;
if (reg_0x88 & control << 4) if (reg_0x88 & control << 4)
status = _FAIL; status = _FAIL;
t2 = rtw_get_current_time(); t2 = jiffies;
return status; return status;
} }
@ -287,7 +287,7 @@ static void efuse_read_phymap_from_txpktbuf(
/* RTW_INFO("%s write reg_0x143:0x00\n", __func__); */ /* RTW_INFO("%s write reg_0x143:0x00\n", __func__); */
rtw_write8(adapter, REG_TXPKTBUF_DBG, 0); rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
start = rtw_get_current_time(); start = jiffies;
while (!(reg_0x143 = rtw_read8(adapter, REG_TXPKTBUF_DBG)) /* dbg */ while (!(reg_0x143 = rtw_read8(adapter, REG_TXPKTBUF_DBG)) /* dbg */
/* while(rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */ /* while(rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */
&& (passing_time = rtw_get_passing_time_ms(start)) < 1000 && (passing_time = rtw_get_passing_time_ms(start)) < 1000
@ -410,7 +410,7 @@ static s32 iol_ioconfig(
static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt) static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit_frame, u32 max_wating_ms, u32 bndy_cnt)
{ {
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
u32 passing_time_ms; u32 passing_time_ms;
u8 polling_ret, i; u8 polling_ret, i;
int ret = _FAIL; int ret = _FAIL;
@ -432,7 +432,7 @@ static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit
dump_mgntframe_and_wait(adapter, xmit_frame, max_wating_ms); dump_mgntframe_and_wait(adapter, xmit_frame, max_wating_ms);
t1 = rtw_get_current_time(); t1 = jiffies;
iol_mode_enable(adapter, 1); iol_mode_enable(adapter, 1);
for (i = 0; i < bndy_cnt; i++) { for (i = 0; i < bndy_cnt; i++) {
u8 page_no = 0; u8 page_no = 0;
@ -442,7 +442,7 @@ static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit
break; break;
} }
iol_mode_enable(adapter, 0); iol_mode_enable(adapter, 0);
t2 = rtw_get_current_time(); t2 = jiffies;
exit: exit:
/* restore BCN_HEAD */ /* restore BCN_HEAD */
rtw_write8(adapter, REG_TDECTRL + 1, 0); rtw_write8(adapter, REG_TDECTRL + 1, 0);
@ -693,7 +693,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ {
s32 ret = _FAIL; s32 ret = _FAIL;
u32 value32; u32 value32;
u32 start = rtw_get_current_time(); u32 start = jiffies;
u32 cnt = 0; u32 cnt = 0;
/* polling CheckSum report */ /* polling CheckSum report */
@ -724,7 +724,7 @@ static s32 _FWFreeToGo(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ {
s32 ret = _FAIL; s32 ret = _FAIL;
u32 value32; u32 value32;
u32 start = rtw_get_current_time(); u32 start = jiffies;
u32 cnt = 0; u32 cnt = 0;
value32 = rtw_read32(adapter, REG_MCUFWDL); value32 = rtw_read32(adapter, REG_MCUFWDL);
@ -909,7 +909,7 @@ s32 rtl8188e_FirmwareDownload(PADAPTER padapter, bool bUsedWoWLANFw)
} }
_FWDownloadEnable_8188E(padapter, true); _FWDownloadEnable_8188E(padapter, true);
fwdl_start_time = rtw_get_current_time(); fwdl_start_time = jiffies;
while (!RTW_CANNOT_IO(padapter) while (!RTW_CANNOT_IO(padapter)
&& (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) { && (write_fw++ < 3 || rtw_get_passing_time_ms(fwdl_start_time) < 500)) {
/* reset FWDL chksum */ /* reset FWDL chksum */
@ -4174,7 +4174,7 @@ void SetHwReg8188E(_adapter *adapter, u8 variable, u8 *val)
u16 val16; u16 val16;
u32 reg_200 = 0, reg_204 = 0; u32 reg_200 = 0, reg_204 = 0;
u32 init_reg_200 = 0, init_reg_204 = 0; u32 init_reg_200 = 0, init_reg_204 = 0;
u32 start = rtw_get_current_time(); u32 start = jiffies;
u32 pass_ms; u32 pass_ms;
int i = 0; int i = 0;

View file

@ -39,7 +39,7 @@ void rtl8188e_sreset_xmit_status_check(_adapter *padapter)
RTW_INFO("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status); RTW_INFO("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status);
rtw_hal_sreset_reset(padapter); rtw_hal_sreset_reset(padapter);
} }
current_time = rtw_get_current_time(); current_time = jiffies;
if (0 == pxmitpriv->free_xmitbuf_cnt || 0 == pxmitpriv->free_xmit_extbuf_cnt) { if (0 == pxmitpriv->free_xmitbuf_cnt || 0 == pxmitpriv->free_xmit_extbuf_cnt) {

View file

@ -1064,7 +1064,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
struct btcoexist_priv *pbtpriv = &(pHalData->bt_coexist); struct btcoexist_priv *pbtpriv = &(pHalData->bt_coexist);
#endif #endif
u32 init_start_time = rtw_get_current_time(); u32 init_start_time = jiffies;
#ifdef DBG_HAL_INIT_PROFILING #ifdef DBG_HAL_INIT_PROFILING
@ -1133,7 +1133,7 @@ static u32 rtl8188eu_hal_init(PADAPTER Adapter)
for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM; hal_init_profiling_i++) for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM; hal_init_profiling_i++)
hal_init_stages_timestamp[hal_init_profiling_i] = 0; hal_init_stages_timestamp[hal_init_profiling_i] = 0;
#define HAL_INIT_PROFILE_TAG(stage) do { hal_init_stages_timestamp[(stage)] = rtw_get_current_time(); } while (0) #define HAL_INIT_PROFILE_TAG(stage) do { hal_init_stages_timestamp[(stage)] = jiffies; } while (0)
#else #else
#define HAL_INIT_PROFILE_TAG(stage) do {} while (0) #define HAL_INIT_PROFILE_TAG(stage) do {} while (0)
#endif /* DBG_HAL_INIT_PROFILING */ #endif /* DBG_HAL_INIT_PROFILING */
@ -1463,7 +1463,7 @@ exit:
RTW_INFO("%s in %dms\n", __func__, rtw_get_passing_time_ms(init_start_time)); RTW_INFO("%s in %dms\n", __func__, rtw_get_passing_time_ms(init_start_time));
#ifdef DBG_HAL_INIT_PROFILING #ifdef DBG_HAL_INIT_PROFILING
hal_init_stages_timestamp[HAL_INIT_STAGES_END] = rtw_get_current_time(); hal_init_stages_timestamp[HAL_INIT_STAGES_END] = jiffies;
for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM - 1; hal_init_profiling_i++) { for (hal_init_profiling_i = 0; hal_init_profiling_i < HAL_INIT_STAGES_NUM - 1; hal_init_profiling_i++) {
RTW_INFO("DBG_HAL_INIT_PROFILING: %35s, %u, %5u, %5u\n" RTW_INFO("DBG_HAL_INIT_PROFILING: %35s, %u, %5u, %5u\n"

View file

@ -771,8 +771,8 @@ struct rf_ctl_t {
#define RTW_CAC_STOPPED 0 #define RTW_CAC_STOPPED 0
#define IS_CAC_STOPPED(rfctl) ((rfctl)->cac_end_time == RTW_CAC_STOPPED) #define IS_CAC_STOPPED(rfctl) ((rfctl)->cac_end_time == RTW_CAC_STOPPED)
#define IS_CH_WAITING(rfctl) (!IS_CAC_STOPPED(rfctl) && time_after((unsigned long)(rfctl)->cac_end_time, (unsigned long)rtw_get_current_time())) #define IS_CH_WAITING(rfctl) (!IS_CAC_STOPPED(rfctl) && time_after((unsigned long)(rfctl)->cac_end_time, (unsigned long)jiffies))
#define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && time_after((unsigned long)rtw_get_current_time(), (unsigned long)(rfctl)->cac_start_time)) #define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && time_after((unsigned long)jiffies, (unsigned long)(rfctl)->cac_start_time))
#ifdef CONFIG_MBSSID_CAM #ifdef CONFIG_MBSSID_CAM
#define TOTAL_MBID_CAM_NUM 8 #define TOTAL_MBID_CAM_NUM 8

View file

@ -268,7 +268,6 @@ extern void _rtw_init_queue(_queue *pqueue);
extern u32 _rtw_queue_empty(_queue *pqueue); extern u32 _rtw_queue_empty(_queue *pqueue);
extern u32 rtw_end_of_queue_search(_list *queue, _list *pelement); extern u32 rtw_end_of_queue_search(_list *queue, _list *pelement);
extern u32 rtw_get_current_time(void);
extern u32 rtw_systime_to_ms(u32 systime); extern u32 rtw_systime_to_ms(u32 systime);
extern u32 rtw_ms_to_systime(u32 ms); extern u32 rtw_ms_to_systime(u32 ms);
extern s32 rtw_get_passing_time_ms(u32 start); extern s32 rtw_get_passing_time_ms(u32 start);

View file

@ -506,7 +506,7 @@ void rtw_rfctl_init(_adapter *adapter);
#ifdef CONFIG_DFS_MASTER #ifdef CONFIG_DFS_MASTER
struct rf_ctl_t; struct rf_ctl_t;
#define CH_IS_NON_OCP(rt_ch_info) (time_after((unsigned long)(rt_ch_info)->non_ocp_end_time, (unsigned long)rtw_get_current_time())) #define CH_IS_NON_OCP(rt_ch_info) (time_after((unsigned long)(rt_ch_info)->non_ocp_end_time, (unsigned long)jiffies))
bool rtw_is_cac_reset_needed(_adapter *adapter, u8 ch, u8 bw, u8 offset); bool rtw_is_cac_reset_needed(_adapter *adapter, u8 ch, u8 bw, u8 offset);
bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset); bool _rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset);
bool rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl); bool rtw_rfctl_overlap_radar_detect_ch(struct rf_ctl_t *rfctl);

View file

@ -1877,7 +1877,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms)
u32 start; u32 start;
u32 pass_ms; u32 pass_ms;
start = rtw_get_current_time(); start = jiffies;
while (rtw_get_passing_time_ms(start) <= timeout_ms) { 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" RTW_INFO(FUNC_ADPT_FMT" init listen_channel %u\n"
, FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel); , FUNC_ADPT_ARG(padapter), padapter->wdinfo.listen_channel);
} else if (rtw_p2p_chk_state(pwdinfo , P2P_STATE_LISTEN) } 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) && rtw_get_passing_time_ms(pwdev_priv->probe_resp_ie_update_time) < 50)
) { ) {
if (padapter->wdinfo.listen_channel != remain_ch) { 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); rtw_cfg80211_set_is_roch(padapter, true);
pcfg80211_wdinfo->ro_ch_wdev = wdev; pcfg80211_wdinfo->ro_ch_wdev = wdev;
pcfg80211_wdinfo->remain_on_ch_cookie = *cookie; 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)); memcpy(&pcfg80211_wdinfo->remain_on_ch_channel, channel, sizeof(struct ieee80211_channel));
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0))
pcfg80211_wdinfo->remain_on_ch_type = channel_type; 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 category, action;
u8 frame_styp; u8 frame_styp;
int type = (-1); int type = (-1);
u32 start = rtw_get_current_time(); u32 start = jiffies;
_adapter *padapter; _adapter *padapter;
struct dvobj_priv *dvobj; struct dvobj_priv *dvobj;
struct rtw_wdev_priv *pwdev_priv; 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); ret = rtw_cfg80211_set_probe_resp_wpsp2pie(net, buf, len);
#ifdef CONFIG_P2P #ifdef CONFIG_P2P
if (ret == 0) 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 #endif
break; break;
case 0x4: /* ASSOC_RESP */ 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); spin_lock_init(&pwdev_priv->scan_req_lock);
pwdev_priv->p2p_enabled = false; 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; pwdev_priv->provdisc_req_issued = false;
rtw_wdev_invit_info_init(&pwdev_priv->invit_info); rtw_wdev_invit_info_init(&pwdev_priv->invit_info);
rtw_wdev_nego_info_init(&pwdev_priv->nego_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 mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
int ret = 0; int ret = 0;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
poidparam.subcode = 0; poidparam.subcode = 0;
RTW_INFO("+rtw_wowlan_ctrl: %s\n", extra); 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 mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wowlan_ioctl_param poidparam; struct wowlan_ioctl_param poidparam;
int ret = 0, len = 0, i = 0; int ret = 0, len = 0, i = 0;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
u8 input[wrqu->data.length]; u8 input[wrqu->data.length];
u8 index = 0; u8 index = 0;
@ -8034,7 +8034,7 @@ static int rtw_ap_wowlan_ctrl(struct net_device *dev,
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct sta_info *psta = NULL; struct sta_info *psta = NULL;
int ret = 0; int ret = 0;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
poidparam.subcode = 0; poidparam.subcode = 0;
RTW_INFO("+rtw_ap_wowlan_ctrl: %s\n", extra); 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 #ifdef DBG_CONFIG_ERROR_DETECT
struct sreset_priv *psrtpriv = &pHalData->srestpriv; struct sreset_priv *psrtpriv = &pHalData->srestpriv;
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
RTW_INFO("===> rtw_ips_pwr_up..............\n"); RTW_INFO("===> rtw_ips_pwr_up..............\n");
#if defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) #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) 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"); RTW_INFO("===> rtw_ips_pwr_down...................\n");
padapter->net_closed = true; padapter->net_closed = true;
@ -3770,7 +3770,7 @@ int rtw_suspend_common(_adapter *padapter)
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
int ret = 0; int ret = 0;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
RTW_INFO(" suspend start\n"); RTW_INFO(" suspend start\n");
RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid); RTW_INFO("==> %s (%s:%d)\n", __func__, current->comm, current->pid);
@ -4226,7 +4226,7 @@ exit:
int rtw_resume_common(_adapter *padapter) int rtw_resume_common(_adapter *padapter)
{ {
int ret = 0; int ret = 0;
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; 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) { */ /* if (rtw_get_passing_time_ms(update_time) > 5000) { */
/* rtw_mstat_dump(RTW_DBGDUMP); */ /* 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; return false;
} }
u32 rtw_get_current_time(void)
{
return jiffies;
}
inline u32 rtw_systime_to_ms(u32 systime) inline u32 rtw_systime_to_ms(u32 systime)
{ {
return systime * 1000 / HZ; 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; u32 cur_time = 0;
if (psecuritypriv->last_mic_err_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 { else {
cur_time = rtw_get_current_time(); cur_time = jiffies;
if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) { if (cur_time - psecuritypriv->last_mic_err_time < 60 * HZ) {
psecuritypriv->btkip_countermeasure = true; psecuritypriv->btkip_countermeasure = true;
psecuritypriv->last_mic_err_time = 0; psecuritypriv->last_mic_err_time = 0;
psecuritypriv->btkip_countermeasure_time = cur_time; psecuritypriv->btkip_countermeasure_time = cur_time;
} else } else {
psecuritypriv->last_mic_err_time = rtw_get_current_time(); psecuritypriv->last_mic_err_time = jiffies;
}
} }
#ifdef CONFIG_IOCTL_CFG80211 #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); RTW_INFO("<======== %s return %d\n", __func__, ret);
return 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 #ifdef DBG_CONFIG_ERROR_DETECT
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); 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 #endif
@ -604,7 +604,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
#ifdef DBG_CONFIG_ERROR_DETECT #ifdef DBG_CONFIG_ERROR_DETECT
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
pHalData->srestpriv.last_tx_time = rtw_get_current_time(); pHalData->srestpriv.last_tx_time = jiffies;
} }
#endif #endif
} else { } else {