diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 0e31fda..e36328a 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -584,7 +584,7 @@ u8 rtw_sitesurvey_cmd(struct adapter *padapter, struct ndis_802_11_ssid *ssid, if (res == _SUCCESS) { - pmlmepriv->scan_start_time = rtw_get_current_time(); + pmlmepriv->scan_start_time = jiffies; _set_timer(&pmlmepriv->scan_to_timer, SCANNING_TIMEOUT); @@ -1934,14 +1934,12 @@ static void lps_ctrl_wk_hdl(struct adapter *padapter, u8 lps_ctrl_type) break; case LPS_CTRL_SPECIAL_PACKET: /* DBG_871X("LPS_CTRL_SPECIAL_PACKET\n"); */ - pwrpriv->DelayLPSLastTimeStamp = rtw_get_current_time(); + pwrpriv->DelayLPSLastTimeStamp = jiffies; #ifdef CONFIG_BT_COEXIST BT_SpecialPacketNotify(padapter); if (BT_1Ant(padapter) == false) #endif - { LPS_Leave(padapter); - } break; case LPS_CTRL_LEAVE: /* DBG_871X("LPS_CTRL_LEAVE\n"); */ @@ -2564,7 +2562,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd) spin_unlock_bh(&(pmlmepriv->scanned_queue.lock)); goto createbss_cmd_fail; } - pwlan->last_scanned = rtw_get_current_time(); + pwlan->last_scanned = jiffies; } else { diff --git a/core/rtw_efuse.c b/core/rtw_efuse.c index 5fe7476..33b5ea4 100644 --- a/core/rtw_efuse.c +++ b/core/rtw_efuse.c @@ -184,10 +184,8 @@ ReadEFuseByte( u32 value32; u8 readbyte; u16 retry; - /* u32 start =rtw_get_current_time(); */ - if (bPseudoTest) - { + if (bPseudoTest) { Efuse_Read1ByteFromFakeContent(Adapter, _offset, pbuf); return; } diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 52fe805..21a035d 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -216,7 +216,7 @@ struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue * RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr =%p\n", plist)); pnetwork->network_type = 0; pnetwork->fixed = false; - pnetwork->last_scanned = rtw_get_current_time(); + pnetwork->last_scanned = jiffies; pnetwork->aid =0; pnetwork->join_res =0; @@ -245,7 +245,7 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv , struct wlan_network *pnetwo if (pnetwork->fixed == true) goto exit; - curr_time = rtw_get_current_time(); + curr_time = jiffies; if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) ==true ) || (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) ==true ) ) @@ -404,7 +404,7 @@ sint rtw_if_up(struct adapter *padapter) { void rtw_generate_random_ibss(u8* pibss) { - u32 curtime = rtw_get_current_time(); + u32 curtime = jiffies; ; pibss[0] = 0x02; /* in ad-hoc mode bit1 must set to 1 */ @@ -761,10 +761,9 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna)); memcpy(&(pnetwork->network), target, get_wlan_bssid_ex_sz(target)); - /* pnetwork->last_scanned = rtw_get_current_time(); */ /* variable initialize */ pnetwork->fixed = false; - pnetwork->last_scanned = rtw_get_current_time(); + pnetwork->last_scanned = jiffies; pnetwork->network_type = 0; pnetwork->aid =0; @@ -789,7 +788,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t rtw_hal_get_def_var(adapter, HAL_DEF_CURRENT_ANTENNA, &(target->PhyInfo.Optimum_antenna)); 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 */ if (pnetwork->network.PhyInfo.SignalQuality == 101) @@ -806,7 +805,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t */ 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. */ /* probe resp(3) > beacon(1) > probe req(2) */ @@ -1312,7 +1311,7 @@ void rtw_indicate_disconnect( struct adapter *padapter ) rtw_os_indicate_disconnect(padapter); /* set ips_deny_time to avoid enter IPS before LPS leave */ - adapter_to_pwrctl(padapter)->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(3000); + adapter_to_pwrctl(padapter)->ips_deny_time = jiffies + rtw_ms_to_systime(3000); _clr_fwstate_(pmlmepriv, _FW_LINKED); @@ -1341,7 +1340,7 @@ void rtw_scan_abort(struct adapter *adapter) struct mlme_priv *pmlmepriv = &(adapter->mlmepriv); struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv); - start = rtw_get_current_time(); + start = jiffies; pmlmeext->scan_abort = true; while (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) && rtw_get_passing_time_ms(start) <= 200) { diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 43fbb02..6881d91 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -4705,10 +4705,9 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait { int ret; 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); i++; @@ -4719,7 +4718,7 @@ int issue_probereq_p2p_ex(struct adapter *adapter, u8 *da, int try_cnt, int wait if (i < try_cnt && wait_ms > 0 && ret ==_FAIL) rtw_msleep_os(wait_ms); - }while ((i0?true:false); i++; @@ -6256,7 +6254,7 @@ int issue_probereq_ex(struct adapter *padapter, struct ndis_802_11_ssid *pssid, if (i < try_cnt && wait_ms > 0 && ret ==_FAIL) rtw_msleep_os(wait_ms); - }while ((imlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -7197,7 +7195,7 @@ int issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16 tid, int { int ret; int i = 0; - u32 start = rtw_get_current_time(); + u32 start = jiffies; struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); @@ -7325,7 +7323,7 @@ int issue_deauth_ex(struct adapter *padapter, u8 *da, unsigned short reason, int { int ret; int i = 0; - u32 start = rtw_get_current_time(); + u32 start = jiffies; do { @@ -7866,7 +7864,7 @@ unsigned int send_beacon(struct adapter *padapter) u8 bxmitok = false; int issue =0; int poll = 0; - u32 start = rtw_get_current_time(); + u32 start = jiffies; rtw_hal_set_hwreg(padapter, HW_VAR_BCN_VALID, NULL); do{ diff --git a/core/rtw_p2p.c b/core/rtw_p2p.c index 9bb4f09..13cf7d9 100644 --- a/core/rtw_p2p.c +++ b/core/rtw_p2p.c @@ -4245,7 +4245,7 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role) 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); /* DBG_8192C( "[%s] listen_dwell time is %d00ms\n", __FUNCTION__, pwdinfo->listen_dwell ); */ memset( &pwdinfo->tx_prov_disc_info, 0x00, sizeof( struct tx_provdisc_req_info ) ); diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 123f136..6b94ed1 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -129,7 +129,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter) bool ret = false; - if (adapter_to_pwrctl(adapter)->ips_deny_time >= rtw_get_current_time()) { + if (adapter_to_pwrctl(adapter)->ips_deny_time >= jiffies) { /* DBG_871X("%s ips_deny_time\n", __func__); */ goto exit; } @@ -403,7 +403,7 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) #ifdef CONFIG_DETECT_CPWM_BY_POLLING if (rpwm & PS_ACK) { - cpwm_polling_start_time = rtw_get_current_time(); + cpwm_polling_start_time = jiffies; /* polling cpwm */ do{ @@ -421,8 +421,6 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv) DBG_871X("%s polling cpwm timeout!!!!!!!!!!\n", __FUNCTION__); } #endif - -; } u8 PS_RDY_CHECK(struct adapter * padapter); @@ -435,7 +433,7 @@ u8 PS_RDY_CHECK(struct adapter * padapter) if (true == pwrpriv->bInSuspend ) return false; - curr_time = rtw_get_current_time(); + curr_time = jiffies; delta_time = curr_time -pwrpriv->DelayLPSLastTimeStamp; if (delta_time < LPS_DELAY_TIME) @@ -541,7 +539,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms) u8 bAwake = false; s32 err = 0; - start_time = rtw_get_current_time(); + start_time = jiffies; while (1) { rtw_hal_get_hwreg(padapter, HW_VAR_FWLPS_RF_ON, &bAwake); @@ -848,7 +846,7 @@ u8 rtw_interface_ps_func(struct adapter *padapter, enum HAL_INTF_PS_FUNC efunc_i inline void rtw_set_ips_deny(struct adapter *padapter, u32 ms) { 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); } /* @@ -863,10 +861,10 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; int ret = _SUCCESS; - u32 start = rtw_get_current_time(); + u32 start = jiffies; - if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms)) - 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 = jiffies + rtw_ms_to_systime(ips_deffer_ms); if (pwrpriv->ps_processing) { DBG_871X("%s wait ps_processing...\n", __func__); @@ -986,8 +984,8 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal } exit: - if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms)) - 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 = jiffies + rtw_ms_to_systime(ips_deffer_ms); return ret; } diff --git a/core/rtw_security.c b/core/rtw_security.c index 15906d9..085c515 100644 --- a/core/rtw_security.c +++ b/core/rtw_security.c @@ -761,7 +761,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) res =_FAIL; if (start == 0) - start = rtw_get_current_time(); + start = jiffies; if (is_broadcast_mac_addr(prxattrib->ra)) no_gkey_bc_cnt++; @@ -773,7 +773,7 @@ u32 rtw_tkip_decrypt(struct adapter *padapter, u8 *precvframe) DBG_871X_LEVEL(_drv_always_, 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); } - start = rtw_get_current_time(); + start = jiffies; no_gkey_bc_cnt = 0; no_gkey_mc_cnt = 0; } @@ -1845,7 +1845,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) res =_FAIL; if (start == 0) - start = rtw_get_current_time(); + start = jiffies; if (is_broadcast_mac_addr(prxattrib->ra)) no_gkey_bc_cnt++; @@ -1857,7 +1857,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe) DBG_871X_LEVEL(_drv_always_, 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); } - start = rtw_get_current_time(); + start = jiffies; no_gkey_bc_cnt = 0; no_gkey_mc_cnt = 0; } diff --git a/core/rtw_sreset.c b/core/rtw_sreset.c index 3466e32..6b56a00 100644 --- a/core/rtw_sreset.c +++ b/core/rtw_sreset.c @@ -257,7 +257,7 @@ void sreset_reset(struct adapter *padapter) struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); struct xmit_priv *pxmitpriv = &padapter->xmitpriv; unsigned long irqL; - u32 start = rtw_get_current_time(); + u32 start = jiffies; DBG_871X("%s\n", __FUNCTION__); diff --git a/core/rtw_wlan_util.c b/core/rtw_wlan_util.c index 58f80bb..b04883d 100644 --- a/core/rtw_wlan_util.c +++ b/core/rtw_wlan_util.c @@ -391,7 +391,7 @@ inline u8 rtw_get_oper_ch(struct adapter *adapter) inline void rtw_set_oper_ch(struct adapter *adapter, u8 ch) { if (adapter_to_dvobj(adapter)->oper_channel != ch) - adapter_to_dvobj(adapter)->on_oper_ch_time = rtw_get_current_time(); + adapter_to_dvobj(adapter)->on_oper_ch_time = jiffies; adapter_to_dvobj(adapter)->oper_channel = ch; } diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index e7fd133..3939ad9 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -2660,14 +2660,14 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt) s32 res; if (start == 0) - start = rtw_get_current_time(); + start = jiffies; pxmitframe = rtw_alloc_xmitframe(pxmitpriv); if (rtw_get_passing_time_ms(start) > 2000) { if (drop_cnt) DBG_871X("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; } @@ -3197,7 +3197,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst void rtw_sctx_init(struct submit_ctx *sctx, int timeout_ms) { sctx->timeout_ms = timeout_ms; - sctx->submit_time = rtw_get_current_time(); + sctx->submit_time = jiffies; init_completion(&sctx->done); sctx->status = RTW_SCTX_SUBMITTED; } @@ -3259,7 +3259,7 @@ int rtw_ack_tx_wait(struct xmit_priv *pxmitpriv, u32 timeout_ms) { 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->status = RTW_SCTX_SUBMITTED; diff --git a/hal/rtl8188e_hal_init.c b/hal/rtl8188e_hal_init.c index 22c0ef8..934f516 100644 --- a/hal/rtl8188e_hal_init.c +++ b/hal/rtl8188e_hal_init.c @@ -68,7 +68,7 @@ static s32 iol_execute(struct adapter *padapter, u8 control) /* DBG_871X("%s reg_0x88:0x%02x, write 0x%02x\n", __FUNCTION__, reg_0x88, reg_0x88|control); */ rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control); - t1 = start = rtw_get_current_time(); + t1 = start = jiffies; while ( /* reg_1c7 = rtw_read8(padapter, 0x1c7) >1) && */ (reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control @@ -82,7 +82,7 @@ static s32 iol_execute(struct adapter *padapter, u8 control) status = (reg_0x88 & control)?_FAIL:_SUCCESS; if (reg_0x88 & control<<4) status = _FAIL; - t2= rtw_get_current_time(); + t2= jiffies; /* printk("==> step iol_execute : %5u reg-0x1c0= 0x%02x\n",rtw_get_time_interval_ms(t1,t2),rtw_read8(padapter, 0x1c0)); */ /* DBG_871X("%s in %u ms, reg_0x88:0x%02x\n", __FUNCTION__, passing_time, reg_0x88); */ @@ -318,7 +318,7 @@ static void efuse_read_phymap_from_txpktbuf( /* DBG_871X("%s write reg_0x143:0x00\n", __FUNCTION__); */ 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 (rtw_read8(adapter, REG_TXPKTBUF_DBG) & BIT0 */ && (passing_time=rtw_get_passing_time_ms(start))<1000 @@ -436,7 +436,7 @@ static s32 iol_ioconfig( static int rtl8188e_IOL_exec_cmds_sync(struct 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; u8 polling_ret,i; int ret = _FAIL; @@ -456,7 +456,7 @@ static int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_fram dump_mgntframe_and_wait(adapter, xmit_frame, max_wating_ms); - t1= rtw_get_current_time(); + t1= jiffies; iol_mode_enable(adapter, 1); for (i=0;i %s : %5u\n",__FUNCTION__,rtw_get_time_interval_ms(t1,t2)); */ exit: /* restore BCN_HEAD */ diff --git a/hal/rtl8188e_sreset.c b/hal/rtl8188e_sreset.c index 954dc0e..cb8d055 100644 --- a/hal/rtl8188e_sreset.c +++ b/hal/rtl8188e_sreset.c @@ -36,7 +36,7 @@ void rtl8188e_sreset_xmit_status_check(struct adapter *padapter) DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status); 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) { diff --git a/hal/usb_halinit.c b/hal/usb_halinit.c index 3cafe14..2bcd6e9 100644 --- a/hal/usb_halinit.c +++ b/hal/usb_halinit.c @@ -1161,7 +1161,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) struct btcoexist_priv *pbtpriv = &(pHalData->bt_coexist); #endif - u32 init_start_time = rtw_get_current_time(); + u32 init_start_time = jiffies; #ifdef DBG_HAL_INIT_PROFILING @@ -1231,7 +1231,7 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter) for (hal_init_profiling_i=0;hal_init_profiling_i %s\n", __FUNCTION__); diff --git a/include/osdep_service.h b/include/osdep_service.h index 35c7b09..00c7fe3 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -538,7 +538,6 @@ void _rtw_init_queue(struct __queue *pqueue); u32 _rtw_queue_empty(struct __queue *pqueue); u32 rtw_end_of_queue_search(struct list_head *queue, struct list_head *pelement); -u32 rtw_get_current_time(void); u32 rtw_systime_to_ms(u32 systime); u32 rtw_ms_to_systime(u32 ms); s32 rtw_get_passing_time_ms(u32 start); diff --git a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c index 4873724..c30906f 100644 --- a/os_dep/ioctl_cfg80211.c +++ b/os_dep/ioctl_cfg80211.c @@ -4292,7 +4292,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, u8 tx_ch = (u8)ieee80211_frequency_to_channel(chan->center_freq); u8 category, action; int type = (-1); - u32 start = rtw_get_current_time(); + u32 start = jiffies; /* cookie generation */ *cookie = (unsigned long) buf; diff --git a/os_dep/ioctl_linux.c b/os_dep/ioctl_linux.c index fbf5fcb..4fd87ec 100644 --- a/os_dep/ioctl_linux.c +++ b/os_dep/ioctl_linux.c @@ -1582,7 +1582,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a, u32 curr_time, delta_time; /* under DHCP(Special packet) */ - curr_time = rtw_get_current_time(); + curr_time = jiffies; delta_time = curr_time - adapter_to_pwrctl(padapter)->DelayLPSLastTimeStamp; delta_time = rtw_systime_to_ms(delta_time); if (delta_time < 500) /* 500ms */ diff --git a/os_dep/os_intfs.c b/os_dep/os_intfs.c index 6865500..fcd3daf 100644 --- a/os_dep/os_intfs.c +++ b/os_dep/os_intfs.c @@ -1217,7 +1217,7 @@ netdev_open_error: int rtw_ips_pwr_up(struct adapter *padapter) { int result; - u32 start_time = rtw_get_current_time(); + u32 start_time = jiffies; DBG_871X("===> rtw_ips_pwr_up..............\n"); rtw_reset_drv_sw(padapter); @@ -1232,7 +1232,7 @@ int rtw_ips_pwr_up(struct adapter *padapter) void rtw_ips_pwr_down(struct adapter *padapter) { - u32 start_time = rtw_get_current_time(); + u32 start_time = jiffies; DBG_871X("===> rtw_ips_pwr_down...................\n"); padapter->bCardDisableWOHSM = true; diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 34484e1..886766f 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -282,7 +282,7 @@ void rtw_mstat_update(const enum mstat_f flags, const MSTAT_STATUS status, u32 s /* if (rtw_get_passing_time_ms(update_time) > 5000) { */ /* rtw_mstat_dump(); */ - update_time=rtw_get_current_time(); + update_time=jiffies; /* */ } @@ -663,11 +663,6 @@ u32 rtw_end_of_queue_search(struct list_head *head, struct list_head *plist) } -u32 rtw_get_current_time(void) -{ - return jiffies; -} - inline u32 rtw_systime_to_ms(u32 systime) { return systime * 1000 / HZ; @@ -678,7 +673,7 @@ inline u32 rtw_ms_to_systime(u32 ms) return ms * HZ / 1000; } -/* the input parameter start use the same unit as returned by rtw_get_current_time */ +/* the input parameter start use jiffies */ inline s32 rtw_get_passing_time_ms(u32 start) { return rtw_systime_to_ms(jiffies-start); diff --git a/os_dep/recv_linux.c b/os_dep/recv_linux.c index 1f1350e..c074034 100644 --- a/os_dep/recv_linux.c +++ b/os_dep/recv_linux.c @@ -121,16 +121,16 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup) u32 cur_time = 0; if ( psecuritypriv->last_mic_err_time == 0 ) { - psecuritypriv->last_mic_err_time = rtw_get_current_time(); + psecuritypriv->last_mic_err_time = jiffies; } else { - cur_time = rtw_get_current_time(); + cur_time = jiffies; if ( cur_time - psecuritypriv->last_mic_err_time < 60*HZ ) { psecuritypriv->btkip_countermeasure = true; psecuritypriv->last_mic_err_time = 0; psecuritypriv->btkip_countermeasure_time = cur_time; } else { - psecuritypriv->last_mic_err_time = rtw_get_current_time(); + psecuritypriv->last_mic_err_time = jiffies; } } diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index da763b5..45c3980 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -620,7 +620,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message) int ret = 0; - u32 start_time = rtw_get_current_time(); + u32 start_time = jiffies; ; @@ -698,7 +698,7 @@ int rtw_resume_process(struct adapter *padapter) struct net_device *pnetdev; struct pwrctrl_priv *pwrpriv; int ret = -1; - u32 start_time = rtw_get_current_time(); + u32 start_time = jiffies; #ifdef CONFIG_BT_COEXIST u8 pm_cnt; #endif /* ifdef CONFIG_BT_COEXIST */ diff --git a/os_dep/usb_ops_linux.c b/os_dep/usb_ops_linux.c index 7571fa4..7922181 100644 --- a/os_dep/usb_ops_linux.c +++ b/os_dep/usb_ops_linux.c @@ -392,7 +392,7 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - pHalData->srestpriv.last_tx_complete_time = rtw_get_current_time(); + pHalData->srestpriv.last_tx_complete_time = jiffies; } check_completion: _enter_critical(&pxmitpriv->lock_sctx, &irqL); @@ -532,7 +532,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem) status = usb_submit_urb(purb, GFP_ATOMIC); if (!status) { HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); - pHalData->srestpriv.last_tx_time = rtw_get_current_time(); + pHalData->srestpriv.last_tx_time = jiffies; } else { rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR); DBG_871X("usb_write_port, status=%d\n", status);