本文整理汇总了C++中rtw_get_current_time函数的典型用法代码示例。如果您正苦于以下问题:C++ rtw_get_current_time函数的具体用法?C++ rtw_get_current_time怎么用?C++ rtw_get_current_time使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rtw_get_current_time函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rtw_get_passing_time_ms
// the input parameter start use the same unit as returned by rtw_get_current_time
inline s32 rtw_get_passing_time_ms(u32 start)
{
#ifdef PLATFORM_LINUX
return rtw_systime_to_ms(jiffies-start);
#endif
#ifdef PLATFORM_FREEBSD
return rtw_systime_to_ms(rtw_get_current_time());
#endif
#ifdef PLATFORM_WINDOWS
LARGE_INTEGER SystemTime;
NdisGetCurrentSystemTime(&SystemTime);
return rtw_systime_to_ms((u32)(SystemTime.LowPart) - start) ;
#endif
}
示例2: sreset_reset
void sreset_reset(_adapter *padapter)
{
#ifdef DBG_CONFIG_ERROR_RESET
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
_irqL irqL;
u32 start = rtw_get_current_time();
struct dvobj_priv *psdpriv = padapter->dvobj;
struct debug_priv *pdbgpriv = &psdpriv->drv_dbg;
DBG_871X("%s\n", __FUNCTION__);
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
#ifdef CONFIG_LPS
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0, "SRESET");
#endif//#ifdef CONFIG_LPS
_enter_pwrlock(&pwrpriv->lock);
psrtpriv->silent_reset_inprogress = _TRUE;
pwrpriv->change_rfpwrstate = rf_off;
sreset_stop_adapter(padapter);
#ifdef CONFIG_CONCURRENT_MODE
sreset_stop_adapter(padapter->pbuddy_adapter);
#endif
#ifdef CONFIG_IPS
_ips_enter(padapter);
_ips_leave(padapter);
#endif
sreset_start_adapter(padapter);
#ifdef CONFIG_CONCURRENT_MODE
sreset_start_adapter(padapter->pbuddy_adapter);
#endif
psrtpriv->silent_reset_inprogress = _FALSE;
_exit_pwrlock(&pwrpriv->lock);
DBG_871X("%s done in %d ms\n", __FUNCTION__, rtw_get_passing_time_ms(start));
pdbgpriv->dbg_sreset_cnt++;
#endif
}
示例3: rtw_ips_pwr_down
void rtw_ips_pwr_down(_adapter *padapter)
{
u32 start_time = rtw_get_current_time();
DBG_8192C("===> rtw_ips_pwr_down...................\n");
padapter->bCardDisableWOHSM = _TRUE;
padapter->net_closed = _TRUE;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
padapter->bCardDisableWOHSM = _FALSE;
DBG_8192C("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
}
示例4: rtw_ips_pwr_up
int rtw_ips_pwr_up(_adapter *padapter)
{
int result;
u32 start_time = rtw_get_current_time();
DBG_8192C("===> rtw_ips_pwr_up..............\n");
rtw_reset_drv_sw(padapter);
result = ips_netdrv_open(padapter);
rtw_led_control(padapter, LED_CTL_NO_LINK);
DBG_8192C("<=== rtw_ips_pwr_up.............. in %dms\n", rtw_get_passing_time_ms(start_time));
return result;
}
示例5: rtw_ips_pwr_down
void rtw_ips_pwr_down(struct adapter *padapter)
{
u32 start_time = rtw_get_current_time();
DBG_88E("===> rtw_ips_pwr_down...................\n");
padapter->bCardDisableWOHSM = true;
padapter->net_closed = true;
rtw_led_control(padapter, LED_CTL_POWER_OFF);
rtw_ips_dev_unload(padapter);
padapter->bCardDisableWOHSM = false;
DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
}
示例6: rtl8723a_sreset_xmit_status_check
void rtl8723a_sreset_xmit_status_check(_adapter *padapter)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
unsigned long current_time;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned int diff_time;
u32 txdma_status;
if( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){
DBG_8723A("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status);
rtw_hal_sreset_reset(padapter);
}
#ifdef CONFIG_USB_HCI
//total xmit irp = 4
//DBG_8723A("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
//if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1)
current_time = rtw_get_current_time();
if(0 == pxmitpriv->free_xmitbuf_cnt || 0 == pxmitpriv->free_xmit_extbuf_cnt) {
diff_time = rtw_get_passing_time_ms(psrtpriv->last_tx_time);
if (diff_time > 2000) {
if (psrtpriv->last_tx_complete_time == 0) {
psrtpriv->last_tx_complete_time = current_time;
}
else{
diff_time = rtw_get_passing_time_ms(psrtpriv->last_tx_complete_time);
if (diff_time > 4000) {
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
DBG_8723A("%s tx hang\n", __FUNCTION__);
rtw_hal_sreset_reset(padapter);
}
}
}
}
#endif // #ifdef CONFIG_USB_HCI
if (psrtpriv->dbg_trigger_point == SRESET_TGP_XMIT_STATUS) {
psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
rtw_hal_sreset_reset(padapter);
return;
}
}
示例7: PS_RDY_CHECK
u8 PS_RDY_CHECK(_adapter * padapter)
{
u32 curr_time, delta_time;
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
#ifdef CONFIG_WOWLAN
if(_TRUE == pwrpriv->bInSuspend && pwrpriv->wowlan_mode)
return _TRUE;
else if (_TRUE == pwrpriv->bInSuspend)
return _FALSE;
#else
if(_TRUE == pwrpriv->bInSuspend )
return _FALSE;
#endif
curr_time = rtw_get_current_time();
delta_time = curr_time -pwrpriv->DelayLPSLastTimeStamp;
if(delta_time < LPS_DELAY_TIME)
{
return _FALSE;
}
if ((check_fwstate(pmlmepriv, _FW_LINKED) == _FALSE) ||
(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_UNDER_WPS) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_AP_STATE) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE) == _TRUE) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) == _TRUE) )
return _FALSE;
if( (padapter->securitypriv.dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) && (padapter->securitypriv.binstallGrpkey == _FALSE) )
{
DBG_871X("Group handshake still in progress !!!\n");
return _FALSE;
}
#ifdef CONFIG_IOCTL_CFG80211
if (!rtw_cfg80211_pwr_mgmt(padapter))
return _FALSE;
#endif
return _TRUE;
}
示例8: rtw_hal_read_chip_info
void rtw_hal_read_chip_info(_adapter *padapter)
{
u8 hci_type = rtw_get_intf_type(padapter);
u32 start = rtw_get_current_time();
/* before access eFuse, make sure card enable has been called */
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)
&& !rtw_is_hw_init_completed(padapter))
rtw_hal_power_on(padapter);
padapter->HalFunc.read_adapter_info(padapter);
if ((hci_type == RTW_SDIO || hci_type == RTW_GSPI)
&& !rtw_is_hw_init_completed(padapter))
rtw_hal_power_off(padapter);
DBG_871X("%s in %d ms\n", __func__, rtw_get_passing_time_ms(start));
}
示例9: _rtw_mi_busy_traffic_check
u8 _rtw_mi_busy_traffic_check(_adapter *padapter, void *data)
{
u32 passtime;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
bool check_sc_interval = *(bool *)data;
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == _TRUE) {
if (check_sc_interval) {
/* Miracast can't do AP scan*/
passtime = rtw_get_passing_time_ms(pmlmepriv->lastscantime);
pmlmepriv->lastscantime = rtw_get_current_time();
if (passtime > BUSY_TRAFFIC_SCAN_DENY_PERIOD) {
RTW_INFO(ADPT_FMT" bBusyTraffic == _TRUE\n", ADPT_ARG(padapter));
return _TRUE;
}
} else
return _TRUE;
}
return _FALSE;
}
示例10: rtl8723b_sreset_xmit_status_check
void rtl8723b_sreset_xmit_status_check(_adapter *padapter)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
unsigned long current_time;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned int diff_time;
u32 txdma_status;
if( (txdma_status=rtw_read32(padapter, REG_TXDMA_STATUS)) !=0x00){
DBG_871X("%s REG_TXDMA_STATUS:0x%08x\n", __FUNCTION__, txdma_status);
rtl8723b_silentreset_for_specific_platform(padapter);
}
#ifdef CONFIG_USB_HCI
//total xmit irp = 4
//DBG_8192C("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
current_time = rtw_get_current_time();
if(0==pxmitpriv->free_xmitbuf_cnt)
{
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
if(diff_time > 2000){
if(psrtpriv->last_tx_complete_time==0){
psrtpriv->last_tx_complete_time = current_time;
}
else{
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_complete_time);
if(diff_time > 4000){
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
DBG_8192C("%s tx hang\n", __FUNCTION__);
rtl8723b_silentreset_for_specific_platform(padapter);
}
}
}
}
#endif // #ifdef CONFIG_USB_HCI
}
示例11: sreset_reset
void sreset_reset(_adapter *padapter)
{
#ifdef DBG_CONFIG_ERROR_RESET
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
_irqL irqL;
u32 start = rtw_get_current_time();
DBG_871X("%s\n", __FUNCTION__);
psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
_enter_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
psrtpriv->silent_reset_inprogress = _TRUE;
pwrpriv->change_rfpwrstate = rf_off;
sreset_stop_adapter(padapter);
#ifdef CONFIG_CONCURRENT_MODE
sreset_stop_adapter(padapter->pbuddy_adapter);
#endif
#ifdef CONFIG_IPS
ips_enter(padapter);
ips_leave(padapter);
#endif
sreset_start_adapter(padapter);
#ifdef CONFIG_CONCURRENT_MODE
sreset_start_adapter(padapter->pbuddy_adapter);
#endif
psrtpriv->silent_reset_inprogress = _FALSE;
_exit_critical_mutex(&psrtpriv->silentreset_mutex, &irqL);
DBG_871X("%s done in %d ms\n", __FUNCTION__, rtw_get_passing_time_ms(start));
#endif
}
示例12: rtw_lps_leave
void rtw_lps_leave(struct rtw_adapter *padapter)
{
#define LPS_LEAVE_TIMEOUT_MS 100
struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
u32 start_time;
bool bAwake = false;
#ifdef CONFIG_CONCURRENT_MODE
if (padapter->iface_type != IFACE_PORT0)
return; /* Skip power saving for concurrent mode port 1 */
#endif
if (pwrpriv->bLeisurePs) {
if (pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0);
if (pwrpriv->pwr_mode == PS_MODE_ACTIVE) {
start_time = rtw_get_current_time();
while (1) {
rtw_hal_get_hwreg(padapter,
HW_VAR_FWLPS_RF_ON,
(u8 *)(&bAwake));
if (bAwake || padapter->bSurpriseRemoved)
break;
if (rtw_get_passing_time_ms(start_time) > LPS_LEAVE_TIMEOUT_MS) {
DBG_8192D
("Wait for FW LPS leave more than %u ms!!!\n",
LPS_LEAVE_TIMEOUT_MS);
break;
}
rtw_usleep_os(100);
}
}
}
}
}
示例13: rtw_handle_tkip_countermeasure
u8 rtw_handle_tkip_countermeasure(_adapter* padapter)
{
u8 status = _SUCCESS;
u32 cur_time = 0;
if (padapter->securitypriv.btkip_countermeasure == _TRUE) {
cur_time = rtw_get_current_time();
if( (cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ )
{
padapter->securitypriv.btkip_countermeasure = _FALSE;
padapter->securitypriv.btkip_countermeasure_time = 0;
}
else
{
status = _FAIL;
}
}
return status;
}
示例14: rtl8192c_sreset_xmit_status_check
void rtl8192c_sreset_xmit_status_check(_adapter *padapter)
{
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct sreset_priv *psrtpriv = &pHalData->srestpriv;
unsigned long current_time;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
unsigned int diff_time;
if(rtw_read32(padapter, REG_TXDMA_STATUS) !=0x00){
rtl8192c_silentreset_for_specific_platform(padapter);
}
//total xmit irp = 4
//DBG_8192C("==>%s free_xmitbuf_cnt(%d),txirp_cnt(%d)\n",__FUNCTION__,pxmitpriv->free_xmitbuf_cnt,pxmitpriv->txirp_cnt);
//if(pxmitpriv->txirp_cnt == NR_XMITBUFF+1)
current_time = rtw_get_current_time();
if(0==pxmitpriv->free_xmitbuf_cnt)
{
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
if(diff_time > 2000){
if(psrtpriv->last_tx_complete_time==0){
psrtpriv->last_tx_complete_time = current_time;
}
else{
diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_complete_time);
if(diff_time > 4000){
//padapter->Wifi_Error_Status = WIFI_TX_HANG;
DBG_8192C("tx hang...start reset\n");
rtl8192c_silentreset_for_specific_platform(padapter);
}
}
}
}
}
示例15: rtw_resume_process
int rtw_resume_process(_adapter *padapter)
{
struct net_device *pnetdev;
struct pwrctrl_priv *pwrpriv;
u8 is_pwrlock_hold_by_caller;
u8 is_directly_called_by_auto_resume;
int ret = 0;
u32 start_time = rtw_get_current_time();
_func_enter_;
DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);
rtw_wifi_gpio_wlan_ctrl(WLAN_PWDN_ON);
rtw_mdelay_os(1);
{
u32 ret = 0;
DBG_8192C("read start:\n");
//spi_write8_endian(padapter, SPI_LOCAL_OFFSET | 0xF0, 0x01, 1);
rtw_write8(padapter, SPI_LOCAL_OFFSET | 0xF0, 0x03);
ret = rtw_read32(padapter, SPI_LOCAL_OFFSET | 0xF0);
DBG_8192C("read end 0xF0 read32:%x:\n", ret);
DBG_8192C("read end 0xF0 read8:%x:\n", rtw_read8(padapter, SPI_LOCAL_OFFSET | 0xF0));
}
if (padapter) {
pnetdev = padapter->pnetdev;
pwrpriv = &padapter->pwrctrlpriv;
} else {
ret = -1;
goto exit;
}
// interface init
if (gspi_init(adapter_to_dvobj(padapter)) != _SUCCESS)
{
ret = -1;
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("%s: initialize SDIO Failed!!\n", __FUNCTION__));
goto exit;
}
rtw_hal_disable_interrupt(padapter);
if (gspi_alloc_irq(adapter_to_dvobj(padapter)) != _SUCCESS)
{
ret = -1;
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("%s: gspi_alloc_irq Failed!!\n", __FUNCTION__));
goto exit;
}
rtw_reset_drv_sw(padapter);
pwrpriv->bkeepfwalive = _FALSE;
DBG_871X("bkeepfwalive(%x)\n",pwrpriv->bkeepfwalive);
if(pm_netdev_open(pnetdev,_TRUE) != 0) {
ret = -1;
goto exit;
}
netif_device_attach(pnetdev);
netif_carrier_on(pnetdev);
if( padapter->pid[1]!=0) {
DBG_871X("pid[1]:%d\n",padapter->pid[1]);
rtw_signal_process(padapter->pid[1], SIGUSR2);
}
#ifdef CONFIG_LAYER2_ROAMING_RESUME
rtw_roaming(padapter, NULL);
#endif
#ifdef CONFIG_RESUME_IN_WORKQUEUE
rtw_unlock_suspend();
#endif //CONFIG_RESUME_IN_WORKQUEUE
exit:
pwrpriv->bInSuspend = _FALSE;
DBG_871X("<=== %s return %d.............. in %dms\n", __FUNCTION__
, ret, rtw_get_passing_time_ms(start_time));
_func_exit_;
return ret;
}