Replace rtw_get_current_time() with jiffies

Port of c01fb49636b65ceea513c00966c58b8bdb095c8f
This commit is contained in:
Carlos Garces 2021-10-14 21:34:26 +02:00
parent 4032543691
commit 7a5f134424
40 changed files with 199 additions and 211 deletions

View File

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

View File

@ -269,7 +269,7 @@ void rtw_mesh_update_scanned_acnode_status(_adapter *adapter, struct wlan_networ
acnode = !nop && accept; acnode = !nop && accept;
if (acnode && scanned->acnode_stime == 0) { if (acnode && scanned->acnode_stime == 0) {
scanned->acnode_stime = rtw_get_current_time(); scanned->acnode_stime = jiffies;
if (scanned->acnode_stime == 0) if (scanned->acnode_stime == 0)
scanned->acnode_stime++; scanned->acnode_stime++;
} else if (!acnode) { } else if (!acnode) {
@ -288,7 +288,7 @@ bool rtw_mesh_scanned_is_acnode_confirmed(_adapter *adapter, struct wlan_network
static bool rtw_mesh_scanned_is_acnode_allow_notify(_adapter *adapter, struct wlan_network *scanned) static bool rtw_mesh_scanned_is_acnode_allow_notify(_adapter *adapter, struct wlan_network *scanned)
{ {
return scanned->acnode_notify_etime return scanned->acnode_notify_etime
&& rtw_time_after(scanned->acnode_notify_etime, rtw_get_current_time()); && rtw_time_after(scanned->acnode_notify_etime, jiffies);
} }
bool rtw_mesh_acnode_prevent_allow_sacrifice(_adapter *adapter) bool rtw_mesh_acnode_prevent_allow_sacrifice(_adapter *adapter)
@ -466,7 +466,7 @@ static void rtw_mesh_acnode_set_notify_etime(_adapter *adapter, u8 *rframe_whdr)
struct wlan_network *scanned = rtw_find_network(&adapter->mlmepriv.scanned_queue, get_addr2_ptr(rframe_whdr)); struct wlan_network *scanned = rtw_find_network(&adapter->mlmepriv.scanned_queue, get_addr2_ptr(rframe_whdr));
if (rtw_mesh_scanned_is_acnode_confirmed(adapter, scanned)) { if (rtw_mesh_scanned_is_acnode_confirmed(adapter, scanned)) {
scanned->acnode_notify_etime = rtw_get_current_time() scanned->acnode_notify_etime = jiffies
+ rtw_ms_to_systime(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms); + rtw_ms_to_systime(adapter->mesh_cfg.peer_sel_policy.acnode_notify_timeout_ms);
if (scanned->acnode_notify_etime == 0) if (scanned->acnode_notify_etime == 0)
scanned->acnode_notify_etime++; scanned->acnode_notify_etime++;
@ -631,7 +631,7 @@ static void rtw_mesh_cto_mgate_blacklist_chk(_adapter *adapter)
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) { if (rtw_time_after(jiffies, ent->exp_time)) {
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
rtw_mfree(ent, sizeof(struct blacklist_ent)); rtw_mfree(ent, sizeof(struct blacklist_ent));
continue; continue;
@ -2344,7 +2344,7 @@ void dump_mesh_plink_ctl(void *sel, _adapter *adapter)
#if CONFIG_RTW_MESH_PEER_BLACKLIST #if CONFIG_RTW_MESH_PEER_BLACKLIST
if (!IS_PEER_CONF_DISABLED(ent)) { if (!IS_PEER_CONF_DISABLED(ent)) {
if (!IS_PEER_CONF_TIMEOUT(ent)) if (!IS_PEER_CONF_TIMEOUT(ent))
RTW_PRINT_SEL(sel, "peer_conf:%d\n", rtw_systime_to_ms(ent->peer_conf_end_time - rtw_get_current_time())); RTW_PRINT_SEL(sel, "peer_conf:%d\n", rtw_systime_to_ms(ent->peer_conf_end_time - jiffies));
else else
RTW_PRINT_SEL(sel, "peer_conf:TIMEOUT\n"); RTW_PRINT_SEL(sel, "peer_conf:TIMEOUT\n");
} }
@ -2353,7 +2353,7 @@ void dump_mesh_plink_ctl(void *sel, _adapter *adapter)
#if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST #if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST
if (!IS_CTO_MGATE_CONF_DISABLED(ent)) { if (!IS_CTO_MGATE_CONF_DISABLED(ent)) {
if (!IS_CTO_MGATE_CONF_TIMEOUT(ent)) if (!IS_CTO_MGATE_CONF_TIMEOUT(ent))
RTW_PRINT_SEL(sel, "cto_mgate_conf:%d\n", rtw_systime_to_ms(ent->cto_mgate_conf_end_time - rtw_get_current_time())); RTW_PRINT_SEL(sel, "cto_mgate_conf:%d\n", rtw_systime_to_ms(ent->cto_mgate_conf_end_time - jiffies));
else else
RTW_PRINT_SEL(sel, "cto_mgate_conf:TIMEOUT\n"); RTW_PRINT_SEL(sel, "cto_mgate_conf:TIMEOUT\n");
} }
@ -2924,7 +2924,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
idx = seq & mrc->idx_mask; idx = seq & mrc->idx_mask;
rtw_hlist_for_each_entry_safe(p, np, n, &mrc->bucket[idx], list) { rtw_hlist_for_each_entry_safe(p, np, n, &mrc->bucket[idx], list) {
++entries; ++entries;
timeout = rtw_time_after(rtw_get_current_time(), p->exp_time); timeout = rtw_time_after(jiffies, p->exp_time);
if (timeout || entries == RTW_MRC_QUEUE_MAX_LEN) { if (timeout || entries == RTW_MRC_QUEUE_MAX_LEN) {
if (!timeout) if (!timeout)
minfo->mshstats.mrc_del_qlen++; minfo->mshstats.mrc_del_qlen++;
@ -2941,7 +2941,7 @@ static int rtw_mrc_check(_adapter *adapter, const u8 *msa, u32 seq)
return 0; return 0;
p->seqnum = seq; p->seqnum = seq;
p->exp_time = rtw_get_current_time() + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS); p->exp_time = jiffies + rtw_ms_to_systime(RTW_MRC_TIMEOUT_MS);
memcpy(p->msa, msa, ETH_ALEN); memcpy(p->msa, msa, ETH_ALEN);
rtw_hlist_add_head(&p->list, &mrc->bucket[idx]); rtw_hlist_add_head(&p->list, &mrc->bucket[idx]);
return 0; return 0;
@ -3081,9 +3081,9 @@ void rtw_mesh_init_mesh_info(_adapter *adapter)
rtw_mesh_plink_ctl_init(adapter); rtw_mesh_plink_ctl_init(adapter);
minfo->last_preq = rtw_get_current_time(); minfo->last_preq = jiffies;
/* minfo->last_sn_update = rtw_get_current_time(); */ /* minfo->last_sn_update = jiffies; */
minfo->next_perr = rtw_get_current_time(); minfo->next_perr = jiffies;
atomic_set(&minfo->mpaths, 0); atomic_set(&minfo->mpaths, 0);
rtw_mesh_pathtbl_init(adapter); rtw_mesh_pathtbl_init(adapter);
@ -3213,7 +3213,7 @@ int rtw_mesh_nexthop_lookup(_adapter *adapter,
if (!mpath || !(mpath->flags & RTW_MESH_PATH_ACTIVE)) if (!mpath || !(mpath->flags & RTW_MESH_PATH_ACTIVE))
goto endlookup; goto endlookup;
if (rtw_time_after(rtw_get_current_time(), if (rtw_time_after(jiffies,
mpath->exp_time - mpath->exp_time -
rtw_ms_to_systime(adapter->mesh_cfg.path_refresh_time)) && rtw_ms_to_systime(adapter->mesh_cfg.path_refresh_time)) &&
_rtw_memcmp(adapter_mac_addr(adapter), msa, ETH_ALEN) == _TRUE && _rtw_memcmp(adapter_mac_addr(adapter), msa, ETH_ALEN) == _TRUE &&
@ -3366,7 +3366,7 @@ int rtw_mesh_addr_resolve(_adapter *adapter, struct xmit_frame *xframe, _pkt *pk
if (mpp_lookup) { if (mpp_lookup) {
mppath = rtw_mpp_path_lookup(adapter, etherhdr.h_dest); mppath = rtw_mpp_path_lookup(adapter, etherhdr.h_dest);
if (mppath) if (mppath)
mppath->exp_time = rtw_get_current_time(); mppath->exp_time = jiffies;
} }
if (mppath && mpath) if (mppath && mpath)
@ -3801,7 +3801,7 @@ int rtw_mesh_rx_msdu_act_check(union recv_frame *rframe
enter_critical_bh(&mppath->state_lock); enter_critical_bh(&mppath->state_lock);
if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE) if (_rtw_memcmp(mppath->mpp, mpp_addr, ETH_ALEN) == _FALSE)
memcpy(mppath->mpp, mpp_addr, ETH_ALEN); memcpy(mppath->mpp, mpp_addr, ETH_ALEN);
mppath->exp_time = rtw_get_current_time(); mppath->exp_time = jiffies;
exit_critical_bh(&mppath->state_lock); exit_critical_bh(&mppath->state_lock);
} }
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();

View File

@ -155,11 +155,11 @@ enum rtw_mesh_deferred_task_flags {
#define RTW_MESH_PEER_CONF_DISABLED 0 /* special time value means no confirmation ongoing */ #define RTW_MESH_PEER_CONF_DISABLED 0 /* special time value means no confirmation ongoing */
#if CONFIG_RTW_MESH_PEER_BLACKLIST #if CONFIG_RTW_MESH_PEER_BLACKLIST
#define IS_PEER_CONF_DISABLED(plink) ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED) #define IS_PEER_CONF_DISABLED(plink) ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED)
#define IS_PEER_CONF_TIMEOUT(plink)(!IS_PEER_CONF_DISABLED(plink) && rtw_time_after(rtw_get_current_time(), (plink)->peer_conf_end_time)) #define IS_PEER_CONF_TIMEOUT(plink)(!IS_PEER_CONF_DISABLED(plink) && rtw_time_after(jiffies, (plink)->peer_conf_end_time))
#define SET_PEER_CONF_DISABLED(plink) (plink)->peer_conf_end_time = RTW_MESH_PEER_CONF_DISABLED #define SET_PEER_CONF_DISABLED(plink) (plink)->peer_conf_end_time = RTW_MESH_PEER_CONF_DISABLED
#define SET_PEER_CONF_END_TIME(plink, timeout_ms) \ #define SET_PEER_CONF_END_TIME(plink, timeout_ms) \
do { \ do { \
(plink)->peer_conf_end_time = rtw_get_current_time() + rtw_ms_to_systime(timeout_ms); \ (plink)->peer_conf_end_time = jiffies + rtw_ms_to_systime(timeout_ms); \
if ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED) \ if ((plink)->peer_conf_end_time == RTW_MESH_PEER_CONF_DISABLED) \
(plink)->peer_conf_end_time++; \ (plink)->peer_conf_end_time++; \
} while (0) } while (0)
@ -173,11 +173,11 @@ enum rtw_mesh_deferred_task_flags {
#define RTW_MESH_CTO_MGATE_CONF_DISABLED 0 /* special time value means no confirmation ongoing */ #define RTW_MESH_CTO_MGATE_CONF_DISABLED 0 /* special time value means no confirmation ongoing */
#if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST #if CONFIG_RTW_MESH_CTO_MGATE_BLACKLIST
#define IS_CTO_MGATE_CONF_DISABLED(plink) ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED) #define IS_CTO_MGATE_CONF_DISABLED(plink) ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED)
#define IS_CTO_MGATE_CONF_TIMEOUT(plink)(!IS_CTO_MGATE_CONF_DISABLED(plink) && rtw_time_after(rtw_get_current_time(), (plink)->cto_mgate_conf_end_time)) #define IS_CTO_MGATE_CONF_TIMEOUT(plink)(!IS_CTO_MGATE_CONF_DISABLED(plink) && rtw_time_after(jiffies, (plink)->cto_mgate_conf_end_time))
#define SET_CTO_MGATE_CONF_DISABLED(plink) (plink)->cto_mgate_conf_end_time = RTW_MESH_CTO_MGATE_CONF_DISABLED #define SET_CTO_MGATE_CONF_DISABLED(plink) (plink)->cto_mgate_conf_end_time = RTW_MESH_CTO_MGATE_CONF_DISABLED
#define SET_CTO_MGATE_CONF_END_TIME(plink, timeout_ms) \ #define SET_CTO_MGATE_CONF_END_TIME(plink, timeout_ms) \
do { \ do { \
(plink)->cto_mgate_conf_end_time = rtw_get_current_time() + rtw_ms_to_systime(timeout_ms); \ (plink)->cto_mgate_conf_end_time = jiffies + rtw_ms_to_systime(timeout_ms); \
if ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED) \ if ((plink)->cto_mgate_conf_end_time == RTW_MESH_CTO_MGATE_CONF_DISABLED) \
(plink)->cto_mgate_conf_end_time++; \ (plink)->cto_mgate_conf_end_time++; \
} while (0) } while (0)

View File

@ -146,7 +146,7 @@ static inline u16 rtw_u16_field_get(const u8 *preq_elem, int shift, BOOLEAN ae)
#define RTW_PERR_IE_TARGET_RCODE(x) rtw_u16_field_get(x, 13, 0) #define RTW_PERR_IE_TARGET_RCODE(x) rtw_u16_field_get(x, 13, 0)
#define RTW_TU_TO_SYSTIME(x) (rtw_us_to_systime((x) * 1024)) #define RTW_TU_TO_SYSTIME(x) (rtw_us_to_systime((x) * 1024))
#define RTW_TU_TO_EXP_TIME(x) (rtw_get_current_time() + RTW_TU_TO_SYSTIME(x)) #define RTW_TU_TO_EXP_TIME(x) (jiffies + RTW_TU_TO_SYSTIME(x))
#define RTW_MSEC_TO_TU(x) (x*1000/1024) #define RTW_MSEC_TO_TU(x) (x*1000/1024)
#define RTW_SN_GT(x, y) ((s32)(y - x) < 0) #define RTW_SN_GT(x, y) ((s32)(y - x) < 0)
#define RTW_SN_LT(x, y) ((s32)(x - y) < 0) #define RTW_SN_LT(x, y) ((s32)(x - y) < 0)
@ -335,7 +335,7 @@ int rtw_mesh_path_error_tx(_adapter *adapter,
u8 *pos, ie_len; u8 *pos, ie_len;
u16 *fctrl = NULL; u16 *fctrl = NULL;
if (rtw_time_before(rtw_get_current_time(), minfo->next_perr)) if (rtw_time_before(jiffies, minfo->next_perr))
return -1; return -1;
pmgntframe = alloc_mgtxmitframe(pxmitpriv); pmgntframe = alloc_mgtxmitframe(pxmitpriv);
@ -669,11 +669,11 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter,
reply = _TRUE; reply = _TRUE;
to_gate_ask = 1; to_gate_ask = 1;
target_metric = 0; target_metric = 0;
if (rtw_time_after(rtw_get_current_time(), minfo->last_sn_update + if (rtw_time_after(jiffies, minfo->last_sn_update +
rtw_net_traversal_jiffies(adapter)) || rtw_net_traversal_jiffies(adapter)) ||
rtw_time_before(rtw_get_current_time(), minfo->last_sn_update)) { rtw_time_before(jiffies, minfo->last_sn_update)) {
++minfo->sn; ++minfo->sn;
minfo->last_sn_update = rtw_get_current_time(); minfo->last_sn_update = jiffies;
} }
target_sn = minfo->sn; target_sn = minfo->sn;
} else if (is_broadcast_mac_addr(target_addr) && } else if (is_broadcast_mac_addr(target_addr) &&
@ -686,7 +686,7 @@ static void rtw_hwmp_preq_frame_process(_adapter *adapter,
target_addr = adapter_mac_addr(adapter); target_addr = adapter_mac_addr(adapter);
target_sn = ++minfo->sn; target_sn = ++minfo->sn;
target_metric = 0; target_metric = 0;
minfo->last_sn_update = rtw_get_current_time(); minfo->last_sn_update = jiffies;
} }
if (preq_is_gate) { if (preq_is_gate) {
@ -998,9 +998,9 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
} }
if ((!(path->flags & (RTW_MESH_PATH_ACTIVE | RTW_MESH_PATH_RESOLVING)) || if ((!(path->flags & (RTW_MESH_PATH_ACTIVE | RTW_MESH_PATH_RESOLVING)) ||
(rtw_time_after(rtw_get_current_time(), path->last_preq_to_root + (rtw_time_after(jiffies, path->last_preq_to_root +
rtw_root_path_confirmation_jiffies(adapter)) || rtw_root_path_confirmation_jiffies(adapter)) ||
rtw_time_before(rtw_get_current_time(), path->last_preq_to_root))) && rtw_time_before(jiffies, path->last_preq_to_root))) &&
!(path->flags & RTW_MESH_PATH_FIXED) && (ttl != 0)) { !(path->flags & RTW_MESH_PATH_FIXED) && (ttl != 0)) {
u8 preq_node_flag = RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH; u8 preq_node_flag = RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH;
@ -1022,7 +1022,7 @@ static void rtw_hwmp_rann_frame_process(_adapter *adapter,
} }
#endif #endif
rtw_mesh_queue_preq(path, preq_node_flag); rtw_mesh_queue_preq(path, preq_node_flag);
path->last_preq_to_root = rtw_get_current_time(); path->last_preq_to_root = jiffies;
} }
path->sn = originator_sn; path->sn = originator_sn;
@ -1325,12 +1325,12 @@ void rtw_mesh_queue_preq(struct rtw_mesh_path *path, u8 flags)
++minfo->preq_queue_len; ++minfo->preq_queue_len;
exit_critical_bh(&minfo->mesh_preq_queue_lock); exit_critical_bh(&minfo->mesh_preq_queue_lock);
if (rtw_time_after(rtw_get_current_time(), minfo->last_preq + rtw_min_preq_int_jiff(adapter))) if (rtw_time_after(jiffies, minfo->last_preq + rtw_min_preq_int_jiff(adapter)))
rtw_mesh_work(&adapter->mesh_work); rtw_mesh_work(&adapter->mesh_work);
else if (rtw_time_before(rtw_get_current_time(), minfo->last_preq)) { else if (rtw_time_before(jiffies, minfo->last_preq)) {
/* systime wrapped around issue */ /* systime wrapped around issue */
minfo->last_preq = rtw_get_current_time() - rtw_min_preq_int_jiff(adapter) - 1; minfo->last_preq = jiffies - rtw_min_preq_int_jiff(adapter) - 1;
rtw_mesh_work(&adapter->mesh_work); rtw_mesh_work(&adapter->mesh_work);
} else } else
rtw_mod_timer(&adapter->mesh_path_timer, minfo->last_preq + rtw_mod_timer(&adapter->mesh_path_timer, minfo->last_preq +
@ -1372,7 +1372,7 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
enter_critical_bh(&minfo->mesh_preq_queue_lock); enter_critical_bh(&minfo->mesh_preq_queue_lock);
if (!minfo->preq_queue_len || if (!minfo->preq_queue_len ||
rtw_time_before(rtw_get_current_time(), minfo->last_preq + rtw_time_before(jiffies, minfo->last_preq +
rtw_min_preq_int_jiff(adapter))) { rtw_min_preq_int_jiff(adapter))) {
exit_critical_bh(&minfo->mesh_preq_queue_lock); exit_critical_bh(&minfo->mesh_preq_queue_lock);
return; return;
@ -1412,13 +1412,13 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
goto enddiscovery; goto enddiscovery;
} }
minfo->last_preq = rtw_get_current_time(); minfo->last_preq = jiffies;
if (rtw_time_after(rtw_get_current_time(), minfo->last_sn_update + if (rtw_time_after(jiffies, minfo->last_sn_update +
rtw_net_traversal_jiffies(adapter)) || rtw_net_traversal_jiffies(adapter)) ||
rtw_time_before(rtw_get_current_time(), minfo->last_sn_update)) { rtw_time_before(jiffies, minfo->last_sn_update)) {
++minfo->sn; ++minfo->sn;
minfo->last_sn_update = rtw_get_current_time(); minfo->last_sn_update = jiffies;
} }
lifetime = rtw_default_lifetime(adapter); lifetime = rtw_default_lifetime(adapter);
ttl = mshcfg->element_ttl; ttl = mshcfg->element_ttl;
@ -1448,7 +1448,7 @@ void rtw_mesh_path_start_discovery(_adapter *adapter)
rtw_mesh_path_sel_frame_tx(RTW_MPATH_PREQ, flags, adapter_mac_addr(adapter), minfo->sn, rtw_mesh_path_sel_frame_tx(RTW_MPATH_PREQ, flags, adapter_mac_addr(adapter), minfo->sn,
target_flags, path->dst, path->sn, da, 0, target_flags, path->dst, path->sn, da, 0,
ttl, lifetime, 0, minfo->preq_id++, adapter); ttl, lifetime, 0, minfo->preq_id++, adapter);
rtw_mod_timer(&path->timer, rtw_get_current_time() + path->discovery_timeout); rtw_mod_timer(&path->timer, jiffies + path->discovery_timeout);
enddiscovery: enddiscovery:
rtw_rcu_read_unlock(); rtw_rcu_read_unlock();
@ -1496,7 +1496,7 @@ void rtw_mesh_path_timer(void *ctx)
RTW_MESH_PATH_REQ_QUEUED | RTW_MESH_PATH_REQ_QUEUED |
RTW_MESH_PATH_ROOT_ADD_CHK | RTW_MESH_PATH_ROOT_ADD_CHK |
RTW_MESH_PATH_PEER_AKA); RTW_MESH_PATH_PEER_AKA);
path->exp_time = rtw_get_current_time(); path->exp_time = jiffies;
exit_critical_bh(&path->state_lock); exit_critical_bh(&path->state_lock);
if (!path->is_gate && rtw_mesh_gate_num(adapter) > 0) { if (!path->is_gate && rtw_mesh_gate_num(adapter) > 0) {
ret = rtw_mesh_path_send_to_gates(path); ret = rtw_mesh_path_send_to_gates(path);
@ -1602,7 +1602,7 @@ void rtw_mesh_work_hdl(_workitem *work)
_adapter *adapter = container_of(work, _adapter, mesh_work); _adapter *adapter = container_of(work, _adapter, mesh_work);
while(adapter->mesh_info.preq_queue_len) { while(adapter->mesh_info.preq_queue_len) {
if (rtw_time_after(rtw_get_current_time(), if (rtw_time_after(jiffies,
adapter->mesh_info.last_preq + rtw_min_preq_int_jiff(adapter))) adapter->mesh_info.last_preq + rtw_min_preq_int_jiff(adapter)))
/* It will consume preq_queue_len */ /* It will consume preq_queue_len */
rtw_mesh_path_start_discovery(adapter); rtw_mesh_path_start_discovery(adapter);

View File

@ -61,7 +61,7 @@ static const rtw_rhashtable_params rtw_mesh_rht_params = {
static inline bool rtw_mpath_expired(struct rtw_mesh_path *mpath) static inline bool rtw_mpath_expired(struct rtw_mesh_path *mpath)
{ {
return (mpath->flags & RTW_MESH_PATH_ACTIVE) && return (mpath->flags & RTW_MESH_PATH_ACTIVE) &&
rtw_time_after(rtw_get_current_time(), mpath->exp_time) && rtw_time_after(jiffies, mpath->exp_time) &&
!(mpath->flags & RTW_MESH_PATH_FIXED); !(mpath->flags & RTW_MESH_PATH_FIXED);
} }
@ -359,7 +359,7 @@ int rtw_mesh_path_add_gate(struct rtw_mesh_path *mpath)
enter_critical_bh(&mpath->state_lock); enter_critical_bh(&mpath->state_lock);
mcfg = &mpath->adapter->mesh_cfg; mcfg = &mpath->adapter->mesh_cfg;
mpath->gate_timeout = rtw_get_current_time() + mpath->gate_timeout = jiffies +
rtw_ms_to_systime(mcfg->path_gate_timeout_factor * rtw_ms_to_systime(mcfg->path_gate_timeout_factor *
mpath->gate_ann_int); mpath->gate_ann_int);
if (mpath->is_gate) { if (mpath->is_gate) {
@ -551,7 +551,7 @@ struct rtw_mesh_path *rtw_mesh_path_new(_adapter *adapter,
new_mpath->gate_asked = false; new_mpath->gate_asked = false;
_rtw_init_queue(&new_mpath->frame_queue); _rtw_init_queue(&new_mpath->frame_queue);
new_mpath->frame_queue_len = 0; new_mpath->frame_queue_len = 0;
new_mpath->exp_time = rtw_get_current_time(); new_mpath->exp_time = jiffies;
_rtw_spinlock_init(&new_mpath->state_lock); _rtw_spinlock_init(&new_mpath->state_lock);
rtw_init_timer(&new_mpath->timer, adapter, rtw_mesh_path_timer, new_mpath); rtw_init_timer(&new_mpath->timer, adapter, rtw_mesh_path_timer, new_mpath);
@ -1134,21 +1134,21 @@ void rtw_mesh_path_tbl_expire(_adapter *adapter,
break; break;
if ((!(mpath->flags & RTW_MESH_PATH_RESOLVING)) && if ((!(mpath->flags & RTW_MESH_PATH_RESOLVING)) &&
(!(mpath->flags & RTW_MESH_PATH_FIXED)) && (!(mpath->flags & RTW_MESH_PATH_FIXED)) &&
rtw_time_after(rtw_get_current_time(), mpath->exp_time + RTW_MESH_PATH_EXPIRE)) rtw_time_after(jiffies, mpath->exp_time + RTW_MESH_PATH_EXPIRE))
__rtw_mesh_path_del(tbl, mpath); __rtw_mesh_path_del(tbl, mpath);
if (mpath->is_gate && /* need not to deal with non-gate case */ if (mpath->is_gate && /* need not to deal with non-gate case */
rtw_time_after(rtw_get_current_time(), mpath->gate_timeout)) { rtw_time_after(jiffies, mpath->gate_timeout)) {
RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] expired systime is %lu systime is %lu\n", RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] expired systime is %lu systime is %lu\n",
FUNC_ADPT_ARG(adapter), mpath->dst, FUNC_ADPT_ARG(adapter), mpath->dst,
mpath->gate_timeout, rtw_get_current_time()); mpath->gate_timeout, jiffies);
enter_critical_bh(&mpath->state_lock); enter_critical_bh(&mpath->state_lock);
if (mpath->gate_asked) { /* asked gate before */ if (mpath->gate_asked) { /* asked gate before */
rtw_mesh_gate_del(tbl, mpath); rtw_mesh_gate_del(tbl, mpath);
exit_critical_bh(&mpath->state_lock); exit_critical_bh(&mpath->state_lock);
} else { } else {
mpath->gate_asked = true; mpath->gate_asked = true;
mpath->gate_timeout = rtw_get_current_time() + rtw_ms_to_systime(mpath->gate_ann_int); mpath->gate_timeout = jiffies + rtw_ms_to_systime(mpath->gate_ann_int);
exit_critical_bh(&mpath->state_lock); exit_critical_bh(&mpath->state_lock);
rtw_mesh_queue_preq(mpath, RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH); rtw_mesh_queue_preq(mpath, RTW_PREQ_Q_F_START | RTW_PREQ_Q_F_REFRESH);
RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] ask mesh gate existence (is_root=%d)\n", RTW_MPATH_DBG(FUNC_ADPT_FMT"mpath [%pM] ask mesh gate existence (is_root=%d)\n",

View File

@ -1952,7 +1952,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

@ -569,7 +569,7 @@ u8 init_channel_set(_adapter *padapter, u8 ChannelPlan, RT_CHANNEL_INFO *channel
#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 */

View File

@ -579,7 +579,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) {
@ -895,7 +895,7 @@ u8 rtw_sitesurvey_cmd(_adapter *padapter, struct sitesurvey_parm *pparm)
if (res == _SUCCESS) { if (res == _SUCCESS) {
u32 scan_timeout_ms; u32 scan_timeout_ms;
pmlmepriv->scan_start_time = rtw_get_current_time(); pmlmepriv->scan_start_time = jiffies;
scan_timeout_ms = rtw_scan_timeout_decision(padapter); scan_timeout_ms = rtw_scan_timeout_decision(padapter);
mlme_set_scan_to_timer(pmlmepriv,scan_timeout_ms); mlme_set_scan_to_timer(pmlmepriv,scan_timeout_ms);
@ -4128,7 +4128,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;
systime start = rtw_get_current_time(); systime start = jiffies;
u8 empty = _FALSE; u8 empty = _FALSE;
psta_bmc = rtw_get_bcmc_stainfo(padapter); psta_bmc = rtw_get_bcmc_stainfo(padapter);
@ -5402,7 +5402,7 @@ unlock:
st->local_port = local_port; st->local_port = local_port;
st->remote_naddr = remote_naddr; st->remote_naddr = remote_naddr;
st->remote_port = remote_port; st->remote_port = 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);
@ -5751,7 +5751,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
rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue); rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);

View File

@ -2132,7 +2132,7 @@ static u8 sta_linking_test_force_fail = 0;
void rtw_sta_linking_test_set_start(void) void rtw_sta_linking_test_set_start(void)
{ {
sta_linking_test_start_time = rtw_get_current_time(); sta_linking_test_start_time = jiffies;
} }
bool rtw_sta_linking_test_wait_done(void) bool rtw_sta_linking_test_wait_done(void)

View File

@ -129,7 +129,7 @@ sint _rtw_init_mlme_priv(_adapter *padapter)
pmlmepriv->roam_scan_int = RTW_ROAM_SCAN_INTERVAL; pmlmepriv->roam_scan_int = RTW_ROAM_SCAN_INTERVAL;
pmlmepriv->roam_rssi_threshold = RTW_ROAM_RSSI_THRESHOLD; pmlmepriv->roam_rssi_threshold = RTW_ROAM_RSSI_THRESHOLD;
pmlmepriv->need_to_roam = _FALSE; pmlmepriv->need_to_roam = _FALSE;
pmlmepriv->last_roaming = rtw_get_current_time(); pmlmepriv->last_roaming = jiffies;
#endif /* CONFIG_LAYER2_ROAMING */ #endif /* CONFIG_LAYER2_ROAMING */
#ifdef CONFIG_RTW_80211R #ifdef CONFIG_RTW_80211R
@ -380,7 +380,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;
#if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT #if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT
pnetwork->acnode_stime = 0; pnetwork->acnode_stime = 0;
pnetwork->acnode_notify_etime = 0; pnetwork->acnode_notify_etime = 0;
@ -1033,10 +1033,10 @@ bool 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;
#if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT #if defined(CONFIG_RTW_MESH) && CONFIG_RTW_MESH_ACNODE_PREVENT
pnetwork->acnode_stime = 0; pnetwork->acnode_stime = 0;
pnetwork->acnode_notify_etime = 0; pnetwork->acnode_notify_etime = 0;
@ -1063,7 +1063,7 @@ bool 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)
@ -1081,7 +1081,7 @@ bool rtw_update_scanned_network(_adapter *adapter, WLAN_BSSID_EX *target)
systime last_scanned = pnetwork->last_scanned; systime last_scanned = pnetwork->last_scanned;
#endif #endif
pnetwork->last_scanned = rtw_get_current_time(); pnetwork->last_scanned = jiffies;
/* target.Reserved[0]==BSS_TYPE_BCN, means that scanned network is a bcn frame. */ /* target.Reserved[0]==BSS_TYPE_BCN, means that scanned network is a bcn frame. */
if ((pnetwork->network.IELength > target->IELength) && (target->Reserved[0] == BSS_TYPE_BCN)) if ((pnetwork->network.IELength > target->IELength) && (target->Reserved[0] == BSS_TYPE_BCN))
@ -1877,7 +1877,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;
@ -1945,7 +1945,7 @@ static u32 _rtw_wait_join_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->join_abort = abort; pmlmeext->join_abort = abort;
if (abort) if (abort)

View File

@ -458,7 +458,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; i < MAX_CHANNEL_NUM && ch_set[i].ChannelNum != 0; i++) { for (i = 0; i < MAX_CHANNEL_NUM && ch_set[i].ChannelNum != 0; i++) {
if (!rtw_ch2freq(ch_set[i].ChannelNum)) { if (!rtw_ch2freq(ch_set[i].ChannelNum)) {
@ -507,9 +507,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);
} }
} }
@ -560,7 +560,7 @@ u32 rtw_get_ch_waiting_ms(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset, u32 *
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(dvobj))) } else if (rtw_is_long_cac_ch(ch, bw, offset, rtw_odm_get_dfs_domain(dvobj)))
@ -589,7 +589,7 @@ void rtw_reset_cac(struct rf_ctl_t *rfctl, 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 */
@ -607,7 +607,7 @@ u32 rtw_force_stop_cac(struct rf_ctl_t *rfctl, u32 timeout_ms)
systime start; systime start;
u32 pass_ms; u32 pass_ms;
start = rtw_get_current_time(); start = jiffies;
rfctl->cac_force_stop = 1; rfctl->cac_force_stop = 1;
@ -767,7 +767,7 @@ void dump_chset(void *sel, RT_CHANNEL_INFO *ch_set)
if (rtw_is_dfs_ch(ch_set[i].ChannelNum)) { if (rtw_is_dfs_ch(ch_set[i].ChannelNum)) {
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");
} }
@ -6114,7 +6114,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;
systime start = rtw_get_current_time(); systime 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);
@ -8533,7 +8533,7 @@ int issue_probereq_ex(_adapter *padapter, const NDIS_802_11_SSID *pssid, const u
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
systime start = rtw_get_current_time(); systime 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;
@ -9537,7 +9537,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;
systime start = rtw_get_current_time(); systime 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);
@ -9691,7 +9691,7 @@ int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, u8 ps, in
{ {
int ret = _FAIL; int ret = _FAIL;
int i = 0; int i = 0;
systime start = rtw_get_current_time(); systime 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);
@ -9832,7 +9832,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;
systime start = rtw_get_current_time(); systime 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;
@ -10248,7 +10248,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;
systime start = rtw_get_current_time(); systime 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;
@ -10326,7 +10326,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;
systime start = rtw_get_current_time(); systime 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;
@ -10607,7 +10607,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;
systime start = rtw_get_current_time(); systime 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;
@ -10798,7 +10798,7 @@ unsigned int send_beacon(_adapter *padapter)
u8 bxmitok = _FALSE; u8 bxmitok = _FALSE;
int issue = 0; int issue = 0;
int poll = 0; int poll = 0;
systime start = rtw_get_current_time(); systime start = jiffies;
#ifdef CONFIG_FW_HANDLE_TXBCN #ifdef CONFIG_FW_HANDLE_TXBCN
u8 vap_id = padapter->vap_id; u8 vap_id = padapter->vap_id;
@ -12791,7 +12791,7 @@ void linked_status_chk(_adapter *padapter, u8 from_timer)
#endif #endif
pmlmepriv->need_to_roam = _TRUE; pmlmepriv->need_to_roam = _TRUE;
rtw_drv_scan_by_self(padapter, RTW_AUTO_SCAN_REASON_ROAM); rtw_drv_scan_by_self(padapter, RTW_AUTO_SCAN_REASON_ROAM);
pmlmepriv->last_roaming = rtw_get_current_time(); pmlmepriv->last_roaming = jiffies;
} else } else
pmlmepriv->need_to_roam = _FALSE; pmlmepriv->need_to_roam = _FALSE;
} }
@ -14250,7 +14250,7 @@ u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u8 ch_nu
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);
@ -14306,7 +14306,7 @@ u8 rtw_scan_sparse(_adapter *adapter, struct rtw_ieee80211_channel *ch, u8 ch_nu
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:
@ -15235,7 +15235,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

@ -5123,7 +5123,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", __FUNCTION__, pwdinfo->listen_dwell ); */ /* RTW_INFO( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, 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

@ -95,7 +95,7 @@ void _ips_enter(_adapter *padapter)
pwrpriv->bkeepfwalive = _TRUE; pwrpriv->bkeepfwalive = _TRUE;
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS #ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
pwrpriv->pwr_saving_start_time = rtw_get_current_time(); pwrpriv->pwr_saving_start_time = jiffies;
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */ #endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
rtw_ips_pwr_down(padapter); rtw_ips_pwr_down(padapter);
@ -212,7 +212,7 @@ bool rtw_pwr_unassociated_idle(_adapter *adapter)
goto exit; goto exit;
} }
if (rtw_time_after(adapter_to_pwrctl(adapter)->ips_deny_time, rtw_get_current_time())) { if (rtw_time_after(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;
} }
@ -480,7 +480,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) {
@ -495,7 +495,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;
} }
@ -538,7 +538,7 @@ u8 rtw_cpwm_polling(_adapter *adapter, u8 rpwm, u8 cpwm_orig)
pwrpriv->rpwm_retry = 0; pwrpriv->rpwm_retry = 0;
do { do {
start_time = rtw_get_current_time(); start_time = jiffies;
do { do {
msleep(1); msleep(1);
rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now); rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now);
@ -706,7 +706,7 @@ u8 PS_RDY_CHECK(_adapter *padapter)
return _FALSE; return _FALSE;
#endif #endif
if (rtw_time_after(pwrpriv->lps_deny_time, rtw_get_current_time())) if (rtw_time_after(pwrpriv->lps_deny_time, jiffies))
return _FALSE; return _FALSE;
if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR) if (check_fwstate(pmlmepriv, WIFI_SITE_MONITOR)
@ -829,7 +829,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 {
mdelay(1); mdelay(1);
@ -972,7 +972,7 @@ void rtw_set_ps_mode(PADAPTER padapter, u8 ps_mode, u8 smart_ps, u8 bcn_ant_mode
u32 delay_ms; u32 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 */
@ -1197,7 +1197,7 @@ void LPS_Enter(PADAPTER padapter, const char *msg)
pwrpriv->bpower_saving = _TRUE; pwrpriv->bpower_saving = _TRUE;
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS #ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
pwrpriv->pwr_saving_start_time = rtw_get_current_time(); pwrpriv->pwr_saving_start_time = jiffies;
#endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */ #endif /* CONFIG_RTW_CFGVEDNOR_LLSTATS */
rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf); rtw_set_ps_mode(padapter, pwrpriv->power_mgnt, padapter->registrypriv.smart_ps, 0, buf);
@ -1433,7 +1433,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;
yield(); yield();
@ -2128,7 +2128,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode; pwrctrlpriv->ips_mode = padapter->registrypriv.ips_mode;
pwrctrlpriv->ips_mode_req = padapter->registrypriv.ips_mode; pwrctrlpriv->ips_mode_req = padapter->registrypriv.ips_mode;
pwrctrlpriv->ips_deny_time = rtw_get_current_time(); pwrctrlpriv->ips_deny_time = jiffies;
pwrctrlpriv->lps_level = padapter->registrypriv.lps_level; pwrctrlpriv->lps_level = padapter->registrypriv.lps_level;
pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL; pwrctrlpriv->pwr_state_check_interval = RTW_PWR_STATE_CHK_INTERVAL;
@ -2159,7 +2159,7 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? _TRUE : _FALSE; pwrctrlpriv->bLeisurePs = (PS_MODE_ACTIVE != pwrctrlpriv->power_mgnt) ? _TRUE : _FALSE;
pwrctrlpriv->bFwCurrentInPSMode = _FALSE; pwrctrlpriv->bFwCurrentInPSMode = _FALSE;
pwrctrlpriv->lps_deny_time = rtw_get_current_time(); pwrctrlpriv->lps_deny_time = jiffies;
pwrctrlpriv->rpwm = 0; pwrctrlpriv->rpwm = 0;
pwrctrlpriv->cpwm = PS_STATE_S4; pwrctrlpriv->cpwm = PS_STATE_S4;
@ -2475,7 +2475,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);
} }
/* /*
@ -2491,7 +2491,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj); struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
struct mlme_priv *pmlmepriv; struct mlme_priv *pmlmepriv;
int ret = _SUCCESS; int ret = _SUCCESS;
systime start = rtw_get_current_time(); systime start = jiffies;
/*RTW_INFO(FUNC_ADPT_FMT "===>\n", FUNC_ADPT_ARG(padapter));*/ /*RTW_INFO(FUNC_ADPT_FMT "===>\n", FUNC_ADPT_ARG(padapter));*/
/* for LPS */ /* for LPS */
@ -2501,8 +2501,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 (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time)) if (rtw_time_after(jiffies + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time))
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) {
@ -2627,8 +2627,8 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
} }
exit: exit:
if (rtw_time_after(rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time)) if (rtw_time_after(jiffies + rtw_ms_to_systime(ips_deffer_ms), pwrpriv->ips_deny_time))
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);
/*RTW_INFO(FUNC_ADPT_FMT "<===\n", FUNC_ADPT_ARG(padapter));*/ /*RTW_INFO(FUNC_ADPT_FMT "<===\n", FUNC_ADPT_ARG(padapter));*/
return ret; return ret;
@ -2675,7 +2675,7 @@ int rtw_pm_set_lps_level(_adapter *padapter, u8 level)
inline void rtw_set_lps_deny(_adapter *adapter, u32 ms) inline void rtw_set_lps_deny(_adapter *adapter, u32 ms)
{ {
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(adapter);
pwrpriv->lps_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ms); pwrpriv->lps_deny_time = jiffies + rtw_ms_to_systime(ms);
} }
int rtw_pm_set_ips(_adapter *padapter, u8 mode) int rtw_pm_set_ips(_adapter *padapter, u8 mode)

View File

@ -1119,7 +1119,7 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
pstats = &psta->sta_stats; pstats = &psta->sta_stats;
pstats->last_rx_time = rtw_get_current_time(); pstats->last_rx_time = jiffies;
pstats->rx_data_pkts++; pstats->rx_data_pkts++;
pstats->rx_bytes += sz; pstats->rx_bytes += sz;
if (is_broadcast_mac_addr(pattrib->ra)) { if (is_broadcast_mac_addr(pattrib->ra)) {
@ -1450,7 +1450,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));
@ -1581,7 +1581,7 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
return _FAIL; return _FAIL;
/* for rx pkt statistics */ /* for rx pkt statistics */
psta->sta_stats.last_rx_time = rtw_get_current_time(); psta->sta_stats.last_rx_time = jiffies;
psta->sta_stats.rx_ctrl_pkts++; psta->sta_stats.rx_ctrl_pkts++;
/* only handle ps-poll */ /* only handle ps-poll */
@ -1965,7 +1965,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
/* for rx pkt statistics */ /* for rx pkt statistics */
if (psta) { if (psta) {
psta->sta_stats.last_rx_time = rtw_get_current_time(); psta->sta_stats.last_rx_time = jiffies;
psta->sta_stats.rx_mgnt_pkts++; psta->sta_stats.rx_mgnt_pkts++;
if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_BEACON) if (get_frame_sub_type(precv_frame->u.hdr.rx_data) == WIFI_BEACON)
psta->sta_stats.rx_beacon_pkts++; psta->sta_stats.rx_beacon_pkts++;
@ -4803,7 +4803,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;
} }
precvpriv->dbg_rx_conflic_mac_addr_cnt++; precvpriv->dbg_rx_conflic_mac_addr_cnt++;
} else { } else {

View File

@ -829,7 +829,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++;
@ -841,7 +841,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;
} }
@ -1950,7 +1950,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++;
@ -1962,7 +1962,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

@ -273,7 +273,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;
_irqL irqL; _irqL irqL;
systime start = rtw_get_current_time(); systime 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

@ -355,7 +355,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig
{ {
int ret; int ret;
int i = 0; int i = 0;
systime start = rtw_get_current_time(); systime 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);
@ -991,7 +991,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);
/* set mac_id sleep before channel switch */ /* set mac_id sleep before channel switch */
rtw_hal_macid_sleep(padapter, ptdls_sta->cmn.mac_id); rtw_hal_macid_sleep(padapter, ptdls_sta->cmn.mac_id);
@ -1043,7 +1043,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty
#endif #endif
if (ret == _SUCCESS) { if (ret == _SUCCESS) {
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)
wait_time = (u32)ch_switch_time / 1000 - ch_sw_time_spent; wait_time = (u32)ch_switch_time / 1000 - ch_sw_time_spent;
@ -2807,7 +2807,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);
} }
} }
@ -2883,7 +2883,7 @@ void rtw_build_tdls_setup_rsp_ies(_adapter *padapter, struct xmit_frame *pxmitfr
if (pattrib->encrypt) { if (pattrib->encrypt) {
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

@ -419,7 +419,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

@ -4543,14 +4543,14 @@ s32 rtw_xmit(_adapter *padapter, _pkt **ppkt)
return -1; return -1;
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", __FUNCTION__, drop_cnt); RTW_INFO("DBG_TX_DROP_FRAME %s no more pxmitframe, drop_cnt:%u\n", __FUNCTION__, drop_cnt);
start = rtw_get_current_time(); start = jiffies;
drop_cnt = 0; drop_cnt = 0;
} }
@ -5762,7 +5762,7 @@ u8 rtw_get_tx_desc_backup(_adapter *padapter, u8 hwq, struct rtw_tx_desc_backup
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;
#ifdef PLATFORM_LINUX /* TODO: add condition wating interface for other os */ #ifdef PLATFORM_LINUX /* TODO: add condition wating interface for other os */
init_completion(&sctx->done); init_completion(&sctx->done);
#endif #endif
@ -5829,7 +5829,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

@ -394,7 +394,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)
@ -454,7 +454,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

@ -1376,7 +1376,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;
@ -1536,7 +1536,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};
systime start = rtw_get_current_time(); systime start = jiffies;
u32 cnt = 0; u32 cnt = 0;
u32 timeout_ms = 800; u32 timeout_ms = 800;
u32 min_cnt = 10; u32 min_cnt = 10;
@ -1562,7 +1562,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);
@ -2249,7 +2249,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;
@ -2265,7 +2265,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);
@ -2292,7 +2292,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;
@ -2308,7 +2308,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);
@ -3366,7 +3366,7 @@ static void rtw_hal_tsf_update_pause(_adapter *adapter)
rtw_hal_set_tsf_update(iface, 0); rtw_hal_set_tsf_update(iface, 0);
if (iface->mlmeextpriv.tsf_update_required) { if (iface->mlmeextpriv.tsf_update_required) {
iface->mlmeextpriv.tsf_update_pause_stime = rtw_get_current_time(); iface->mlmeextpriv.tsf_update_pause_stime = jiffies;
if (!iface->mlmeextpriv.tsf_update_pause_stime) if (!iface->mlmeextpriv.tsf_update_pause_stime)
iface->mlmeextpriv.tsf_update_pause_stime++; iface->mlmeextpriv.tsf_update_pause_stime++;
} }
@ -3413,7 +3413,7 @@ void rtw_hal_periodic_tsf_update_chk(_adapter *adapter)
u32 restore_ms = 0; u32 restore_ms = 0;
if (dvobj->periodic_tsf_update_etime) { if (dvobj->periodic_tsf_update_etime) {
if (rtw_time_after(rtw_get_current_time(), dvobj->periodic_tsf_update_etime)) { if (rtw_time_after(jiffies, dvobj->periodic_tsf_update_etime)) {
/* end for restore status */ /* end for restore status */
dvobj->periodic_tsf_update_etime = 0; dvobj->periodic_tsf_update_etime = 0;
rtw_hal_rcr_set_chk_bssid(adapter, MLME_ACTION_NONE); rtw_hal_rcr_set_chk_bssid(adapter, MLME_ACTION_NONE);
@ -3448,7 +3448,7 @@ void rtw_hal_periodic_tsf_update_chk(_adapter *adapter)
if (!restore_ms) if (!restore_ms)
return; return;
dvobj->periodic_tsf_update_etime = rtw_get_current_time() + rtw_ms_to_systime(restore_ms); dvobj->periodic_tsf_update_etime = jiffies + rtw_ms_to_systime(restore_ms);
if (!dvobj->periodic_tsf_update_etime) if (!dvobj->periodic_tsf_update_etime)
dvobj->periodic_tsf_update_etime++; dvobj->periodic_tsf_update_etime++;
@ -9280,7 +9280,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;
@ -9351,7 +9351,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;
@ -9365,7 +9365,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);
@ -9418,7 +9418,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;
@ -14424,7 +14424,7 @@ u8 rtw_ap_bcn_recovery(_adapter *padapter)
#ifdef CONFIG_BCN_XMIT_PROTECT #ifdef CONFIG_BCN_XMIT_PROTECT
u8 rtw_ap_bcn_queue_empty_check(_adapter *padapter, u32 txbcn_timer_ms) u8 rtw_ap_bcn_queue_empty_check(_adapter *padapter, u32 txbcn_timer_ms)
{ {
u32 start_time = rtw_get_current_time(); u32 start_time = jiffies;
u8 bcn_queue_empty = _FALSE; u8 bcn_queue_empty = _FALSE;
do { do {

View File

@ -3150,7 +3150,7 @@ static int _cpu_sleep(struct dvobj_priv *d, u32 timeout)
mac = dvobj_to_halmac(d); mac = dvobj_to_halmac(d);
api = HALMAC_GET_API(mac); api = HALMAC_GET_API(mac);
start_t = rtw_get_current_time(); start_t = jiffies;
status = _enter_cpu_sleep_mode(d); status = _enter_cpu_sleep_mode(d);
if (status != HALMAC_RET_SUCCESS) { if (status != HALMAC_RET_SUCCESS) {
@ -3650,7 +3650,7 @@ int rtw_halmac_txfifo_wait_empty(struct dvobj_priv *d, u32 timeout)
a = dvobj_get_primary_adapter(d); a = dvobj_get_primary_adapter(d);
start_time = rtw_get_current_time(); start_time = jiffies;
do { do {
cnt++; cnt++;

View File

@ -54,7 +54,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);
systime start = rtw_get_current_time(); systime 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)
@ -472,7 +472,7 @@ s32 rtw_hal_fw_dl(_adapter *padapter, u8 wowlan)
#ifdef RTW_HALMAC #ifdef RTW_HALMAC
s32 rtw_hal_fw_mem_dl(_adapter *padapter, enum fw_mem mem) s32 rtw_hal_fw_mem_dl(_adapter *padapter, enum fw_mem mem)
{ {
systime dlfw_start_time = rtw_get_current_time(); systime dlfw_start_time = jiffies;
struct dvobj_priv *dvobj = adapter_to_dvobj(padapter); struct dvobj_priv *dvobj = adapter_to_dvobj(padapter);
struct debug_priv *pdbgpriv = &dvobj->drv_dbg; struct debug_priv *pdbgpriv = &dvobj->drv_dbg;
s32 rst = _FALSE; s32 rst = _FALSE;

View File

@ -2249,7 +2249,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));
@ -2538,7 +2538,7 @@ void rtw_hal_mcc_c2h_handler(PADAPTER padapter, u8 buflen, u8 *tmpBuf)
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;
@ -3236,7 +3236,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;
systime start = rtw_get_current_time(); systime start = jiffies;
u8 i = 0; u8 i = 0;
if (!MCC_EN(padapter)) if (!MCC_EN(padapter))

View File

@ -1059,17 +1059,17 @@ u8 phydm_c2H_content_parsing(void *dm_void, u8 c2h_cmd_id, u8 c2h_cmd_len,
u64 odm_get_current_time(struct dm_struct *dm) u64 odm_get_current_time(struct dm_struct *dm)
{ {
#if (DM_ODM_SUPPORT_TYPE & (ODM_AP)) #if (DM_ODM_SUPPORT_TYPE & (ODM_AP))
return (u64)rtw_get_current_time(); return (u64)jiffies;
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211)
return jiffies; return jiffies;
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2)
return jiffies; return jiffies;
#elif (DM_ODM_SUPPORT_TYPE & ODM_CE) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE)
return rtw_get_current_time(); return jiffies;
#elif (DM_ODM_SUPPORT_TYPE & ODM_WIN) #elif (DM_ODM_SUPPORT_TYPE & ODM_WIN)
return PlatformGetCurrentTime(); return PlatformGetCurrentTime();
#elif (DM_ODM_SUPPORT_TYPE & ODM_IOT) #elif (DM_ODM_SUPPORT_TYPE & ODM_IOT)
return rtw_get_current_time(); return jiffies;
#endif #endif
} }

View File

@ -76,7 +76,7 @@ s32 InitLLTTable8192E(PADAPTER padapter, u8 txpktbuf_bndy)
value32 = rtw_read32(padapter, REG_AUTO_LLT); value32 = rtw_read32(padapter, REG_AUTO_LLT);
rtw_write32(padapter, REG_AUTO_LLT, value32 | BIT_AUTO_INIT_LLT); rtw_write32(padapter, REG_AUTO_LLT, value32 | BIT_AUTO_INIT_LLT);
start = rtw_get_current_time(); start = jiffies;
while (((value32 = rtw_read32(padapter, REG_AUTO_LLT)) & BIT_AUTO_INIT_LLT) while (((value32 = rtw_read32(padapter, REG_AUTO_LLT)) & BIT_AUTO_INIT_LLT)
&& ((passing_time = rtw_get_passing_time_ms(start)) < 1000) && ((passing_time = rtw_get_passing_time_ms(start)) < 1000)
) )
@ -367,7 +367,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ {
s32 ret = _FAIL; s32 ret = _FAIL;
u32 value32; u32 value32;
systime start = rtw_get_current_time(); systime start = jiffies;
u32 cnt = 0; u32 cnt = 0;
/* polling CheckSum report */ /* polling CheckSum report */
@ -398,7 +398,7 @@ static s32 _FWFreeToGo8192E(_adapter *adapter, u32 min_cnt, u32 timeout_ms)
{ {
s32 ret = _FAIL; s32 ret = _FAIL;
u32 value32; u32 value32;
systime start = rtw_get_current_time(); systime start = jiffies;
u32 cnt = 0; u32 cnt = 0;
value32 = rtw_read32(adapter, REG_MCUFWDL); value32 = rtw_read32(adapter, REG_MCUFWDL);
@ -554,7 +554,7 @@ FirmwareDownload8192E(
} }
_FWDownloadEnable_8192E(Adapter, _TRUE); _FWDownloadEnable_8192E(Adapter, _TRUE);
fwdl_start_time = rtw_get_current_time(); fwdl_start_time = jiffies;
while (!RTW_CANNOT_IO(Adapter) while (!RTW_CANNOT_IO(Adapter)
&& (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 */
@ -3963,7 +3963,7 @@ u8 SetHwReg8192E(PADAPTER Adapter, u8 variable, u8 *val)
u16 val16; u16 val16;
u32 reg_200 = 0, reg_204 = 0, reg_214 = 0; u32 reg_200 = 0, reg_204 = 0, reg_214 = 0;
u32 init_reg_200 = 0, init_reg_204 = 0, init_reg_214 = 0; u32 init_reg_200 = 0, init_reg_204 = 0, init_reg_214 = 0;
systime start = rtw_get_current_time(); systime start = jiffies;
u32 pass_ms; u32 pass_ms;
int i = 0; int i = 0;

View File

@ -38,7 +38,7 @@ void rtl8192e_sreset_xmit_status_check(_adapter *padapter)
/* total xmit irp = 4 */ /* total xmit irp = 4 */
/* RTW_INFO("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt); */ /* RTW_INFO("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt); */
/* if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1) */ /* if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1) */
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

@ -693,7 +693,7 @@ u32 rtl8192eu_hal_init(PADAPTER Adapter)
rt_rf_power_state eRfPowerStateToSet; rt_rf_power_state eRfPowerStateToSet;
systime init_start_time = rtw_get_current_time(); systime init_start_time = jiffies;
#ifdef DBG_HAL_INIT_PROFILING #ifdef DBG_HAL_INIT_PROFILING
@ -763,7 +763,7 @@ u32 rtl8192eu_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 */
@ -1123,7 +1123,7 @@ exit:
RTW_INFO("%s in %dms\n", __FUNCTION__, rtw_get_passing_time_ms(init_start_time)); RTW_INFO("%s in %dms\n", __FUNCTION__, 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

@ -50,7 +50,7 @@ void interrupt_handler_8192eu(_adapter *padapter, u16 pkt_len, u8 *pbuf)
if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E) { if (pHalData->IntArray[0] & IMR_BCNDMAINT0_88E) {
struct tdls_ch_switch *pchsw_info = &padapter->tdlsinfo.chsw_info; struct tdls_ch_switch *pchsw_info = &padapter->tdlsinfo.chsw_info;
u32 last_time = pchsw_info->cur_time; u32 last_time = pchsw_info->cur_time;
pchsw_info->cur_time = rtw_systime_to_ms(rtw_get_current_time()); pchsw_info->cur_time = rtw_systime_to_ms(jiffies);
if ((atomic_read(&pchsw_info->chsw_on) == _TRUE) && if ((atomic_read(&pchsw_info->chsw_on) == _TRUE) &&
/* Sometimes we receive multiple interrupts in very little time period, use the follow condition test to filter */ /* Sometimes we receive multiple interrupts in very little time period, use the follow condition test to filter */
(pchsw_info->cur_time - last_time > padapter->mlmeextpriv.mlmext_info.bcn_interval - 5) && (pchsw_info->cur_time - last_time > padapter->mlmeextpriv.mlmext_info.bcn_interval - 5) &&

View File

@ -907,8 +907,8 @@ struct rf_ctl_t {
#define RTW_CAC_STOPPED 0 #define RTW_CAC_STOPPED 0
#ifdef CONFIG_DFS_MASTER #ifdef CONFIG_DFS_MASTER
#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) && rtw_time_after((rfctl)->cac_end_time, rtw_get_current_time())) #define IS_CH_WAITING(rfctl) (!IS_CAC_STOPPED(rfctl) && rtw_time_after((rfctl)->cac_end_time, jiffies))
#define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && rtw_time_after(rtw_get_current_time(), (rfctl)->cac_start_time)) #define IS_UNDER_CAC(rfctl) (IS_CH_WAITING(rfctl) && rtw_time_after(jiffies, (rfctl)->cac_start_time))
#define IS_RADAR_DETECTED(rfctl) ((rfctl)->radar_detected) #define IS_RADAR_DETECTED(rfctl) ((rfctl)->radar_detected)
#else #else
#define IS_CAC_STOPPED(rfctl) 1 #define IS_CAC_STOPPED(rfctl) 1

View File

@ -276,7 +276,6 @@ extern void _rtw_deinit_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 systime _rtw_get_current_time(void);
extern u32 _rtw_systime_to_ms(systime stime); extern u32 _rtw_systime_to_ms(systime stime);
extern systime _rtw_ms_to_systime(u32 ms); extern systime _rtw_ms_to_systime(u32 ms);
extern systime _rtw_us_to_systime(u32 us); extern systime _rtw_us_to_systime(u32 us);
@ -286,7 +285,6 @@ extern s32 _rtw_get_time_interval_ms(systime start, systime end);
extern bool _rtw_time_after(systime a, systime b); extern bool _rtw_time_after(systime a, systime b);
#ifdef DBG_SYSTIME #ifdef DBG_SYSTIME
#define rtw_get_current_time() ({systime __stime = _rtw_get_current_time(); __stime;})
#define rtw_systime_to_ms(stime) ({u32 __ms = _rtw_systime_to_ms(stime); typecheck(systime, stime); __ms;}) #define rtw_systime_to_ms(stime) ({u32 __ms = _rtw_systime_to_ms(stime); typecheck(systime, stime); __ms;})
#define rtw_ms_to_systime(ms) ({systime __stime = _rtw_ms_to_systime(ms); __stime;}) #define rtw_ms_to_systime(ms) ({systime __stime = _rtw_ms_to_systime(ms); __stime;})
#define rtw_us_to_systime(us) ({systime __stime = _rtw_us_to_systime(us); __stime;}) #define rtw_us_to_systime(us) ({systime __stime = _rtw_us_to_systime(us); __stime;})
@ -296,7 +294,6 @@ extern bool _rtw_time_after(systime a, systime b);
#define rtw_time_after(a,b) ({bool __r = _rtw_time_after(a,b); typecheck(systime, a); typecheck(systime, b); __r;}) #define rtw_time_after(a,b) ({bool __r = _rtw_time_after(a,b); typecheck(systime, a); typecheck(systime, b); __r;})
#define rtw_time_before(a,b) ({bool __r = _rtw_time_after(b, a); typecheck(systime, a); typecheck(systime, b); __r;}) #define rtw_time_before(a,b) ({bool __r = _rtw_time_after(b, a); typecheck(systime, a); typecheck(systime, b); __r;})
#else #else
#define rtw_get_current_time() _rtw_get_current_time()
#define rtw_systime_to_ms(stime) _rtw_systime_to_ms(stime) #define rtw_systime_to_ms(stime) _rtw_systime_to_ms(stime)
#define rtw_ms_to_systime(ms) _rtw_ms_to_systime(ms) #define rtw_ms_to_systime(ms) _rtw_ms_to_systime(ms)
#define rtw_us_to_systime(us) _rtw_us_to_systime(us) #define rtw_us_to_systime(us) _rtw_us_to_systime(us)

View File

@ -392,7 +392,7 @@ void rtw_rfctl_deinit(_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) (rtw_time_after((rt_ch_info)->non_ocp_end_time, rtw_get_current_time())) #define CH_IS_NON_OCP(rt_ch_info) (rtw_time_after((rt_ch_info)->non_ocp_end_time, jiffies))
bool rtw_is_cac_reset_needed(struct rf_ctl_t *rfctl, u8 ch, u8 bw, u8 offset); bool rtw_is_cac_reset_needed(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, 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

@ -2527,7 +2527,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms)
systime start; systime 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) {
@ -3227,7 +3227,7 @@ cancel_ps_deny:
exit: exit:
if (pmlmepriv) if (pmlmepriv)
pmlmepriv->lastscantime = rtw_get_current_time(); pmlmepriv->lastscantime = jiffies;
return ret; return ret;
} }
@ -6604,7 +6604,7 @@ inline bool rtw_cfg80211_is_ro_ch_once(_adapter *adapter)
inline void rtw_cfg80211_set_last_ro_ch_time(_adapter *adapter) inline void rtw_cfg80211_set_last_ro_ch_time(_adapter *adapter)
{ {
adapter->cfg80211_wdinfo.last_ro_ch_time = rtw_get_current_time(); adapter->cfg80211_wdinfo.last_ro_ch_time = jiffies;
if (!adapter->cfg80211_wdinfo.last_ro_ch_time) if (!adapter->cfg80211_wdinfo.last_ro_ch_time)
adapter->cfg80211_wdinfo.last_ro_ch_time++; adapter->cfg80211_wdinfo.last_ro_ch_time++;
@ -6711,7 +6711,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(rtw_get_current_time(), pwdev_priv->probe_resp_ie_update_time) && (time_after_eq(jiffies, 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) {
@ -7247,7 +7247,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
u8 is_p2p = 0; u8 is_p2p = 0;
#endif #endif
int type = (-1); int type = (-1);
systime start = rtw_get_current_time(); systime 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;
@ -8598,7 +8598,7 @@ static void rtw_cfg80211_mpath_set_pinfo(struct rtw_mesh_path *mpath, u8 *next_h
pinfo->frame_qlen = mpath->frame_queue_len; pinfo->frame_qlen = mpath->frame_queue_len;
pinfo->sn = mpath->sn; pinfo->sn = mpath->sn;
pinfo->metric = mpath->metric; pinfo->metric = mpath->metric;
if (rtw_time_after(mpath->exp_time, rtw_get_current_time())) if (rtw_time_after(mpath->exp_time, jiffies))
pinfo->exptime = rtw_get_remaining_time_ms(mpath->exp_time); pinfo->exptime = rtw_get_remaining_time_ms(mpath->exp_time);
pinfo->discovery_timeout = rtw_systime_to_ms(mpath->discovery_timeout); pinfo->discovery_timeout = rtw_systime_to_ms(mpath->discovery_timeout);
pinfo->discovery_retries = mpath->discovery_retries; pinfo->discovery_retries = mpath->discovery_retries;
@ -9192,7 +9192,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 */
@ -10068,7 +10068,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct wiphy *wiphy)
_rtw_spinlock_init(&pwdev_priv->connect_req_lock); _rtw_spinlock_init(&pwdev_priv->connect_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

@ -7960,7 +7960,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;
systime start_time = rtw_get_current_time(); systime 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);
@ -8032,7 +8032,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;
systime start_time = rtw_get_current_time(); systime start_time = jiffies;
u8 input[wrqu->data.length]; u8 input[wrqu->data.length];
u8 index = 0; u8 index = 0;
@ -8103,7 +8103,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;
systime start_time = rtw_get_current_time(); systime 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

@ -3485,8 +3485,8 @@ netdev_open_normal_process:
#endif #endif
#ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS #ifdef CONFIG_RTW_CFGVEDNOR_LLSTATS
pwrctrlpriv->radio_on_start_time = rtw_get_current_time(); pwrctrlpriv->radio_on_start_time = jiffies;
pwrctrlpriv->pwr_saving_start_time = rtw_get_current_time(); pwrctrlpriv->pwr_saving_start_time = jiffies;
pwrctrlpriv->pwr_saving_time = 0; pwrctrlpriv->pwr_saving_time = 0;
pwrctrlpriv->on_time = 0; pwrctrlpriv->on_time = 0;
pwrctrlpriv->tx_time = 0; pwrctrlpriv->tx_time = 0;
@ -3607,7 +3607,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
struct sreset_priv *psrtpriv = &pHalData->srestpriv; struct sreset_priv *psrtpriv = &pHalData->srestpriv;
#endif/* #ifdef DBG_CONFIG_ERROR_DETECT */ #endif/* #ifdef DBG_CONFIG_ERROR_DETECT */
#endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */ #endif /* defined(CONFIG_SWLPS_IN_IPS) || defined(CONFIG_FWLPS_IN_IPS) */
systime start_time = rtw_get_current_time(); systime 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)
@ -3628,7 +3628,7 @@ int rtw_ips_pwr_up(_adapter *padapter)
void rtw_ips_pwr_down(_adapter *padapter) void rtw_ips_pwr_down(_adapter *padapter)
{ {
systime start_time = rtw_get_current_time(); systime 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;
@ -4629,7 +4629,7 @@ int rtw_suspend_common(_adapter *padapter)
#endif #endif
int ret = 0; int ret = 0;
systime start_time = rtw_get_current_time(); systime start_time = jiffies;
RTW_PRINT(" suspend start\n"); RTW_PRINT(" suspend start\n");
RTW_INFO("==> %s (%s:%d)\n", __FUNCTION__, current->comm, current->pid); RTW_INFO("==> %s (%s:%d)\n", __FUNCTION__, current->comm, current->pid);
@ -5096,7 +5096,7 @@ exit:
int rtw_resume_common(_adapter *padapter) int rtw_resume_common(_adapter *padapter)
{ {
int ret = 0; int ret = 0;
systime start_time = rtw_get_current_time(); systime start_time = jiffies;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
if (pwrpriv->bInSuspend == _FALSE) if (pwrpriv->bInSuspend == _FALSE)

View File

@ -562,16 +562,16 @@ void rtw_handle_tkip_mic_err(_adapter *padapter, struct sta_info *sta, u8 bgroup
systime cur_time = 0; systime 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

@ -1167,13 +1167,13 @@ static void LinkLayerStats(_adapter *padapter)
if (rtw_mi_check_fwstate(padapter, _FW_LINKED)) { if (rtw_mi_check_fwstate(padapter, _FW_LINKED)) {
if ( pwrpriv->bpower_saving == _TRUE ) { if ( pwrpriv->bpower_saving == _TRUE ) {
pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time); pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time);
pwrpriv->pwr_saving_start_time = rtw_get_current_time(); pwrpriv->pwr_saving_start_time = jiffies;
} }
} else { } else {
#ifdef CONFIG_IPS #ifdef CONFIG_IPS
if ( pwrpriv->bpower_saving == _TRUE ) { if ( pwrpriv->bpower_saving == _TRUE ) {
pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time); pwrpriv->pwr_saving_time += rtw_get_passing_time_ms(pwrpriv->pwr_saving_start_time);
pwrpriv->pwr_saving_start_time = rtw_get_current_time(); pwrpriv->pwr_saving_start_time = jiffies;
} }
#else #else
pwrpriv->pwr_saving_time = pwrpriv->on_time; pwrpriv->pwr_saving_time = pwrpriv->on_time;

View File

@ -1122,7 +1122,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", __FUNCTION__, ret); RTW_INFO("<======== %s return %d\n", __FUNCTION__, ret);
return ret; return ret;

View File

@ -442,7 +442,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
@ -563,7 +563,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 {

View File

@ -367,7 +367,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;
/* } */ /* } */
} }
@ -1008,15 +1008,6 @@ u32 rtw_end_of_queue_search(_list *head, _list *plist)
return _FALSE; return _FALSE;
} }
systime _rtw_get_current_time(void)
{
#ifdef PLATFORM_LINUX
return jiffies;
#endif
}
inline u32 _rtw_systime_to_ms(systime stime) inline u32 _rtw_systime_to_ms(systime stime)
{ {
#ifdef PLATFORM_LINUX #ifdef PLATFORM_LINUX
@ -1040,15 +1031,15 @@ inline systime _rtw_us_to_systime(u32 us)
#endif #endif
} }
/* the input parameter start use the same unit as returned by rtw_get_current_time */ /* the input parameter start use the same unit as returned by jiffies */
inline s32 _rtw_get_passing_time_ms(systime start) inline s32 _rtw_get_passing_time_ms(systime start)
{ {
return _rtw_systime_to_ms(_rtw_get_current_time() - start); return _rtw_systime_to_ms(jiffies - start);
} }
inline s32 _rtw_get_remaining_time_ms(systime end) inline s32 _rtw_get_remaining_time_ms(systime end)
{ {
return _rtw_systime_to_ms(end - _rtw_get_current_time()); return _rtw_systime_to_ms(end - jiffies);
} }
inline s32 _rtw_get_time_interval_ms(systime start, systime end) inline s32 _rtw_get_time_interval_ms(systime start, systime end)
@ -1924,14 +1915,14 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) { if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) {
exist = _TRUE; exist = _TRUE;
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) if (rtw_time_after(jiffies, ent->exp_time))
timeout = _TRUE; timeout = _TRUE;
ent->exp_time = rtw_get_current_time() ent->exp_time = jiffies
+ rtw_ms_to_systime(timeout_ms); + rtw_ms_to_systime(timeout_ms);
break; break;
} }
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) { if (rtw_time_after(jiffies, ent->exp_time)) {
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
rtw_mfree(ent, sizeof(struct blacklist_ent)); rtw_mfree(ent, sizeof(struct blacklist_ent));
} }
@ -1941,7 +1932,7 @@ int rtw_blacklist_add(_queue *blist, const u8 *addr, u32 timeout_ms)
ent = rtw_malloc(sizeof(struct blacklist_ent)); ent = rtw_malloc(sizeof(struct blacklist_ent));
if (ent) { if (ent) {
memcpy(ent->addr, addr, ETH_ALEN); memcpy(ent->addr, addr, ETH_ALEN);
ent->exp_time = rtw_get_current_time() ent->exp_time = jiffies
+ rtw_ms_to_systime(timeout_ms); + rtw_ms_to_systime(timeout_ms);
rtw_list_insert_tail(&ent->list, head); rtw_list_insert_tail(&ent->list, head);
} }
@ -1973,7 +1964,7 @@ int rtw_blacklist_del(_queue *blist, const u8 *addr)
break; break;
} }
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) { if (rtw_time_after(jiffies, ent->exp_time)) {
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
rtw_mfree(ent, sizeof(struct blacklist_ent)); rtw_mfree(ent, sizeof(struct blacklist_ent));
} }
@ -1999,7 +1990,7 @@ int rtw_blacklist_search(_queue *blist, const u8 *addr)
list = get_next(list); list = get_next(list);
if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) { if (_rtw_memcmp(ent->addr, addr, ETH_ALEN) == _TRUE) {
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) { if (rtw_time_after(jiffies, ent->exp_time)) {
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
rtw_mfree(ent, sizeof(struct blacklist_ent)); rtw_mfree(ent, sizeof(struct blacklist_ent));
} else } else
@ -2007,7 +1998,7 @@ int rtw_blacklist_search(_queue *blist, const u8 *addr)
break; break;
} }
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) { if (rtw_time_after(jiffies, ent->exp_time)) {
rtw_list_delete(&ent->list); rtw_list_delete(&ent->list);
rtw_mfree(ent, sizeof(struct blacklist_ent)); rtw_mfree(ent, sizeof(struct blacklist_ent));
} }
@ -2058,7 +2049,7 @@ void dump_blacklist(void *sel, _queue *blist, const char *title)
ent = LIST_CONTAINOR(list, struct blacklist_ent, list); ent = LIST_CONTAINOR(list, struct blacklist_ent, list);
list = get_next(list); list = get_next(list);
if (rtw_time_after(rtw_get_current_time(), ent->exp_time)) if (rtw_time_after(jiffies, ent->exp_time))
RTW_PRINT_SEL(sel, MAC_FMT" expired\n", MAC_ARG(ent->addr)); RTW_PRINT_SEL(sel, MAC_FMT" expired\n", MAC_ARG(ent->addr));
else else
RTW_PRINT_SEL(sel, MAC_FMT" %u\n", MAC_ARG(ent->addr) RTW_PRINT_SEL(sel, MAC_FMT" %u\n", MAC_ARG(ent->addr)