diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 01fecc8..3d6dbfd 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -2939,7 +2939,7 @@ u8 rtw_ap_bmc_frames_hdl(_adapter *padapter) rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); while (_FALSE == empty && rtw_get_passing_time_ms(start) < 3000) { - rtw_msleep_os(100); + msleep(100); rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); } diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index aa96e87..3073725 100644 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -205,7 +205,7 @@ void _rtw_free_evt_priv(struct evt_priv *pevtpriv) #ifdef CONFIG_C2H_WK _cancel_workitem_sync(&pevtpriv->c2h_wk); while (pevtpriv->c2h_wk_alive) - rtw_msleep_os(10); + msleep(10); while (!rtw_cbuf_empty(pevtpriv->c2h_queue)) { void *c2h; @@ -4147,7 +4147,7 @@ static void rtw_chk_hi_queue_hdl(_adapter *padapter) rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); while (_FALSE == empty && rtw_get_passing_time_ms(start) < rtw_get_wait_hiq_empty_ms()) { - rtw_msleep_os(100); + msleep(100); rtw_hal_get_hwreg(padapter, HW_VAR_CHK_HI_QUEUE_EMPTY, &empty); } diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 5262391..f3c9b48 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -1888,7 +1888,7 @@ static u32 _rtw_wait_scan_done(_adapter *adapter, u8 abort, u32 timeout_ms) break; RTW_INFO(FUNC_NDEV_FMT"fw_state=_FW_UNDER_SURVEY!\n", FUNC_NDEV_ARG(adapter->pnetdev)); - rtw_msleep_os(20); + msleep(20); } if (_TRUE == abort) { @@ -1962,7 +1962,7 @@ static u32 _rtw_wait_join_done(_adapter *adapter, u8 abort, u32 timeout_ms) break; RTW_INFO(FUNC_ADPT_FMT" linking...\n", FUNC_ADPT_ARG(adapter)); - rtw_msleep_os(20); + msleep(20); } if (abort) { diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 98f94dd..abd9796 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -616,7 +616,7 @@ u32 rtw_force_stop_cac(struct rf_ctl_t *rfctl, u32 timeout_ms) ) { if (dev_is_surprise_removed(dvobj) || dev_is_drv_stopped(dvobj)) break; - rtw_msleep_os(20); + msleep(20); } if (IS_UNDER_CAC(rfctl)) { @@ -6125,7 +6125,7 @@ int issue_probereq_p2p_ex(_adapter *adapter, u8 *da, int try_cnt, int wait_ms) break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -7729,7 +7729,7 @@ s32 dump_mgntframe_and_wait_ack_timeout(_adapter *padapter, struct xmit_frame *p return ret; #else /* !CONFIG_XMIT_ACK */ dump_mgntframe(padapter, pmgntframe); - rtw_msleep_os(50); + msleep(50); return _SUCCESS; #endif /* !CONFIG_XMIT_ACK */ } @@ -8547,7 +8547,7 @@ int issue_probereq_ex(_adapter *padapter, const NDIS_802_11_SSID *pssid, const u break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -9557,7 +9557,7 @@ int issue_nulldata(_adapter *padapter, unsigned char *da, unsigned int power_mod break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -9711,7 +9711,7 @@ int issue_qos_nulldata(_adapter *padapter, unsigned char *da, u16 tid, u8 ps, in break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -9846,7 +9846,7 @@ int issue_deauth_ex(_adapter *padapter, u8 *da, unsigned short reason, int try_c break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -10268,7 +10268,7 @@ inline u8 issue_addba_rsp_wait_ack(_adapter *adapter, unsigned char *ra, u8 tid, break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -10346,7 +10346,7 @@ int issue_del_ba_ex(_adapter *adapter, unsigned char *ra, u8 tid, u16 reason, u8 break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -10621,7 +10621,7 @@ int issue_action_SM_PS_wait_ack(_adapter *padapter, unsigned char *raddr, u8 New break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && ((ret == _FAIL) || (wait_ms == 0))); @@ -10836,7 +10836,7 @@ unsigned int send_beacon(_adapter *padapter) issue++; do { #if defined(CONFIG_PCI_BCN_POLLING) - rtw_msleep_os(1); + msleep(1); #else yield(); #endif @@ -15880,7 +15880,7 @@ u8 chk_bmc_sleepq_hdl(_adapter *padapter, unsigned char *pbuf) if ((rtw_tim_map_is_set(padapter, pstapriv->tim_bitmap, 0)) && (psta_bmc->sleepq_len > 0)) { #ifndef CONFIG_PCI_HCI - rtw_msleep_os(10);/* 10ms, ATIM(HIQ) Windows */ + msleep(10);/* 10ms, ATIM(HIQ) Windows */ #endif /* _enter_critical_bh(&psta_bmc->sleep_q.lock, &irqL); */ _enter_critical_bh(&pxmitpriv->lock, &irqL); diff --git a/core/rtw_mp.c b/core/rtw_mp.c index 7a95e64..240508a 100644 --- a/core/rtw_mp.c +++ b/core/rtw_mp.c @@ -2455,7 +2455,7 @@ u32 mp_query_psd(PADAPTER pAdapter, u8 *data) } #ifdef CONFIG_LONG_DELAY_ISSUE - rtw_msleep_os(100); + msleep(100); #else rtw_mdelay_os(100); #endif diff --git a/core/rtw_mp_ioctl.c b/core/rtw_mp_ioctl.c index 035d281..b956dba 100644 --- a/core/rtw_mp_ioctl.c +++ b/core/rtw_mp_ioctl.c @@ -628,7 +628,7 @@ NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv) if (pmp_priv->tx.stop == 0) { pmp_priv->tx.stop = 1; RTW_INFO("%s: pkt tx is running...\n", __func__); - rtw_msleep_os(5); + msleep(5); } pmp_priv->tx.stop = 0; pmp_priv->tx.count = 1; @@ -663,7 +663,7 @@ NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_p if (pmp_priv->tx.stop == 0) { pmp_priv->tx.stop = 1; RTW_INFO("%s: pkt tx is running...\n", __func__); - rtw_msleep_os(5); + msleep(5); } pmp_priv->tx.stop = 0; pmp_priv->tx.count = 1; @@ -698,7 +698,7 @@ NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_ if (pmp_priv->tx.stop == 0) { pmp_priv->tx.stop = 1; RTW_INFO("%s: pkt tx is running...\n", __func__); - rtw_msleep_os(5); + msleep(5); } pmp_priv->tx.stop = 0; pmp_priv->tx.count = 1; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 24fe550..431b8fb 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -540,7 +540,7 @@ u8 rtw_cpwm_polling(_adapter *adapter, u8 rpwm, u8 cpwm_orig) do { start_time = rtw_get_current_time(); do { - rtw_msleep_os(1); + msleep(1); rtw_hal_get_hwreg(adapter, HW_VAR_CPWM, &cpwm_now); if ((cpwm_orig ^ cpwm_now) & 0x80) { @@ -1458,7 +1458,7 @@ void LPS_Leave_check( RTW_ERR("Wait for cpwm event than 100 ms!!!\n"); break; } - rtw_msleep_os(1); + msleep(1); } } @@ -2512,7 +2512,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) if (pwrpriv->ps_processing) { RTW_INFO("%s wait ps_processing...\n", __func__); while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000) - rtw_msleep_os(10); + msleep(10); if (pwrpriv->ps_processing) RTW_INFO("%s wait ps_processing timeout\n", __func__); else @@ -2523,7 +2523,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) if (rtw_hal_sreset_inprogress(padapter)) { RTW_INFO("%s wait sreset_inprogress...\n", __func__); while (rtw_hal_sreset_inprogress(padapter) && rtw_get_passing_time_ms(start) <= 4000) - rtw_msleep_os(10); + msleep(10); if (rtw_hal_sreset_inprogress(padapter)) RTW_INFO("%s wait sreset_inprogress timeout\n", __func__); else @@ -2541,7 +2541,7 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller) && ((rtw_get_passing_time_ms(start) <= 3000 && !rtw_is_do_late_resume(pwrpriv)) || (rtw_get_passing_time_ms(start) <= 500 && rtw_is_do_late_resume(pwrpriv))) ) - rtw_msleep_os(10); + msleep(10); if (pwrpriv->bInSuspend) RTW_INFO("%s wait bInSuspend timeout\n", __func__); else diff --git a/core/rtw_recv.c b/core/rtw_recv.c index 2355adf..ab9aa66 100644 --- a/core/rtw_recv.c +++ b/core/rtw_recv.c @@ -5007,7 +5007,7 @@ thread_return rtw_recv_thread(thread_context context) if (err == RTW_RFRAME_UNAVAIL || err == RTW_RFRAME_PKT_UNAVAIL ) { - rtw_msleep_os(1); + msleep(1); _rtw_up_sema(&recvpriv->recv_sema); } diff --git a/core/rtw_tdls.c b/core/rtw_tdls.c index caa8697..08881dc 100644 --- a/core/rtw_tdls.c +++ b/core/rtw_tdls.c @@ -382,7 +382,7 @@ int issue_nulldata_to_TDLS_peer_STA(_adapter *padapter, unsigned char *da, unsig break; if (i < try_cnt && wait_ms > 0 && ret == _FAIL) - rtw_msleep_os(wait_ms); + msleep(wait_ms); } while ((i < try_cnt) && (ret == _FAIL || wait_ms == 0)); @@ -1051,7 +1051,7 @@ s32 rtw_tdls_do_ch_sw(_adapter *padapter, struct sta_info *ptdls_sta, u8 chnl_ty wait_time = 0; if (wait_time > 0) - rtw_msleep_os(wait_time); + msleep(wait_time); } } diff --git a/core/rtw_xmit.c b/core/rtw_xmit.c index 4ab7066..fc86341 100644 --- a/core/rtw_xmit.c +++ b/core/rtw_xmit.c @@ -165,7 +165,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter) /* Tx buf allocation may fail sometimes, so sleep and retry. */ res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); if (res == _FAIL) { - rtw_msleep_os(10); + msleep(10); res = rtw_os_xmit_resource_alloc(padapter, pxmitbuf, (MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ), _TRUE); if (res == _FAIL) goto exit; @@ -1622,7 +1622,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) if (bmcst) { if (_rtw_memcmp(psecuritypriv->dot118021XGrptxmickey[psecuritypriv->dot118021XGrpKeyid].skey, null_key, 16) == _TRUE) { /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */ - /* rtw_msleep_os(10); */ + /* msleep(10); */ return _FAIL; } /* start to calculate the mic code */ @@ -1630,7 +1630,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe) } else { if (_rtw_memcmp(&pattrib->dot11tkiptxmickey.skey[0], null_key, 16) == _TRUE) { /* DbgPrint("\nxmitframe_addmic:stainfo->dot11tkiptxmickey==0\n"); */ - /* rtw_msleep_os(10); */ + /* msleep(10); */ return _FAIL; } /* start to calculate the mic code */ diff --git a/hal/hal_btcoex.c b/hal/hal_btcoex.c index ea5b400..fe82b81 100644 --- a/hal/hal_btcoex.c +++ b/hal/hal_btcoex.c @@ -413,7 +413,7 @@ void halbtcoutsrc_LeaveLowPower(PBTC_COEXIST pBtCoexist) if (utime > timeout) break; - rtw_msleep_os(1); + msleep(1); } while (1); GLBtcBtCoexAliveRegistered = _TRUE; diff --git a/hal/hal_com.c b/hal/hal_com.c index a0eecd5..cb0bf22 100644 --- a/hal/hal_com.c +++ b/hal/hal_com.c @@ -1609,7 +1609,7 @@ int hal_read_mac_hidden_rpt(_adapter *adapter) id = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL); if (id == C2H_MAC_HIDDEN_RPT || RTW_CANNOT_IO(adapter)) break; - rtw_msleep_os(10); + msleep(10); } while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt); if (id == C2H_MAC_HIDDEN_RPT) { @@ -4906,7 +4906,7 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) RTW_PRINT("Loop index: %d :0x%02x\n", trycnt, reason); trycnt--; - rtw_msleep_os(20); + msleep(20); } if (!reason) res = _TRUE; @@ -4919,7 +4919,7 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) RTW_PRINT("%s REG_FE1IMR (reg120): 0x%x, REG_RXPKT_NUM(reg284): 0x%x\n", __func__, fe1_imr, rxpkt_num); while (((fe1_imr & BIT_FS_RXDONE_INT_EN) || (rxpkt_num & BIT_RW_RELEASE_EN)) && trycnt > 1) { - rtw_msleep_os(20); + msleep(20); fe1_imr = rtw_read32(adapter, REG_FE1IMR); rxpkt_num = rtw_read32(adapter, REG_RXPKT_NUM); RTW_PRINT("Loop index: %d :0x%x, 0x%x\n", @@ -4943,7 +4943,7 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) RTW_PRINT("Loop index: %d :0x%02x\n", trycnt, mstatus); trycnt--; - rtw_msleep_os(20); + msleep(20); } if (mstatus & BIT1) res = _TRUE; @@ -4955,7 +4955,7 @@ static u8 rtw_hal_check_wow_ctrl(_adapter *adapter, u8 chk_type) RTW_PRINT("Loop index: %d :0x%02x\n", trycnt, mstatus); trycnt--; - rtw_msleep_os(20); + msleep(20); } if (mstatus & BIT1) @@ -4984,7 +4984,7 @@ static u8 rtw_hal_check_pno_enabled(_adapter *adapter) count, res); res = rtw_read8(adapter, REG_PNO_STATUS); count++; - rtw_msleep_os(2); + msleep(2); } if (res & BIT(7)) ret = _TRUE; @@ -5799,7 +5799,7 @@ static void rtw_hal_set_ap_rsvdpage_loc_cmd(PADAPTER padapter, if (ret == _FAIL) RTW_INFO("%s: H2C_BCN_RSVDPAGE cmd fail\n", __func__); - rtw_msleep_os(10); + msleep(10); _rtw_memset(&rsvdparm, 0, sizeof(rsvdparm)); @@ -5812,7 +5812,7 @@ static void rtw_hal_set_ap_rsvdpage_loc_cmd(PADAPTER padapter, if (ret == _FAIL) RTW_INFO("%s: H2C_PROBERSP_RSVDPAGE cmd fail\n", __func__); - rtw_msleep_os(10); + msleep(10); } static void rtw_hal_set_fw_ap_wow_related_cmd(_adapter *padapter, u8 enable) @@ -5854,7 +5854,7 @@ static void rtw_hal_ap_wow_enable(_adapter *padapter) issue_beacon(padapter, 0); - rtw_msleep_os(2); + msleep(2); #if defined(CONFIG_RTL8188E) if (IS_HARDWARE_TYPE_8188E(padapter)) rtw_hal_disable_tx_report(padapter); @@ -5911,7 +5911,7 @@ static void rtw_hal_ap_wow_disable(_adapter *padapter) rtw_hal_set_fw_ap_wow_related_cmd(padapter, 0); - rtw_msleep_os(2); + msleep(2); #ifdef DBG_CHECK_FW_PS_STATE if (rtw_fw_ps_state(padapter) == _FAIL) { pdbgpriv->dbg_diswow_dload_fw_fail_cnt++; @@ -11032,7 +11032,7 @@ int rtw_hal_reset_tsf(_adapter *adapter, u8 reset_port) return ret; while ((reset_cnt_after == reset_cnt_before) && (loop_cnt < 10)) { - rtw_msleep_os(100); + msleep(100); loop_cnt++; reset_cnt_after = rtw_read8(adapter, reg_reset_tsf_cnt); } @@ -11512,7 +11512,7 @@ void rtw_lps_state_chk(_adapter *adapter, u8 ps_mode) ps_ready = _TRUE; break; } - rtw_msleep_os(1); + msleep(1); } while (leave_wait_count--); if (ps_ready == _FALSE) { @@ -13612,7 +13612,7 @@ void rtw_reset_phy_rx_counters(_adapter *padapter) phy_set_bb_reg(padapter, 0xA2C, BIT15, 0x1); } else { phy_set_bb_reg(padapter, 0xF14, BIT16, 0x1); - rtw_msleep_os(10); + msleep(10); phy_set_bb_reg(padapter, 0xF14, BIT16, 0x0); phy_set_bb_reg(padapter, 0xD00, BIT27, 0x1);/* reset OFDA FA counter */ diff --git a/hal/hal_com_phycfg.c b/hal/hal_com_phycfg.c index 7e68568..99c48c4 100644 --- a/hal/hal_com_phycfg.c +++ b/hal/hal_com_phycfg.c @@ -4207,7 +4207,7 @@ phy_ConfigBBWithParaFile( break; } else if (u4bRegOffset == 0xfe || u4bRegOffset == 0xffe) { #ifdef CONFIG_LONG_DELAY_ISSUE - rtw_msleep_os(50); + msleep(50); #else rtw_mdelay_os(50); #endif @@ -4555,7 +4555,7 @@ phy_ConfigBBWithMpParaFile( break; } else if (u4bRegOffset == 0xfe || u4bRegOffset == 0xffe) { #ifdef CONFIG_LONG_DELAY_ISSUE - rtw_msleep_os(50); + msleep(50); #else rtw_mdelay_os(50); #endif @@ -4669,7 +4669,7 @@ PHY_ConfigRFWithParaFile( if (u4bRegOffset == 0xfe || u4bRegOffset == 0xffe) { /* Deay specific ms. Only RF configuration require delay. */ #ifdef CONFIG_LONG_DELAY_ISSUE - rtw_msleep_os(50); + msleep(50); #else rtw_mdelay_os(50); #endif diff --git a/hal/hal_halmac.c b/hal/hal_halmac.c index a12abab..5de1b3f 100644 --- a/hal/hal_halmac.c +++ b/hal/hal_halmac.c @@ -414,7 +414,7 @@ static void _halmac_udelay(void *p, u32 us) else if (us <= 1000) rtw_usleep_os(us); else - rtw_msleep_os(RTW_DIV_ROUND_UP(us, 1000)); + msleep(RTW_DIV_ROUND_UP(us, 1000)); } static u8 _halmac_mutex_init(void *p, HALMAC_MUTEX *pMutex) @@ -3088,7 +3088,7 @@ static void _debug_dlfw_fail(struct dvobj_priv *d) } /* read 0x80 after 10 secs */ - rtw_msleep_os(10000); + msleep(10000); addr = 0x80; v32 = rtw_read16(a, addr); RTW_PRINT("%s: 0x%X = 0x%04x (after 10 secs)\n", @@ -3178,7 +3178,7 @@ static int _cpu_sleep(struct dvobj_priv *d, u32 timeout) break; } - rtw_msleep_os(1); + msleep(1); } while (1); exit: @@ -3668,7 +3668,7 @@ int rtw_halmac_txfifo_wait_empty(struct dvobj_priv *d, u32 timeout) break; } - rtw_msleep_os(2); + msleep(2); } while (1); if (empty == _FALSE) { @@ -3919,7 +3919,7 @@ static u8 _is_fw_read_cmd_down(PADAPTER adapter, u8 msgbox_num) if (0 == valid) read_down = _TRUE; else - rtw_msleep_os(1); + msleep(1); } while ((!read_down) && (retry_cnts--)); if (_FALSE == read_down) @@ -4631,7 +4631,7 @@ int rtw_halmac_iqk(struct dvobj_priv *d, u8 clear, u8 segment) if (!retry) break; retry--; - rtw_msleep_os(delay); + msleep(delay); } while (1); if (status != HALMAC_RET_SUCCESS) { free_halmac_event(d, id); diff --git a/hal/hal_mp.c b/hal/hal_mp.c index 1af9de3..a6811a2 100644 --- a/hal/hal_mp.c +++ b/hal/hal_mp.c @@ -1631,12 +1631,12 @@ void hal_mpt_GetThermalMeter(PADAPTER pAdapter, u8 *value) { #if 0 fw_cmd(pAdapter, IOCMD_GET_THERMAL_METER); - rtw_msleep_os(1000); + msleep(1000); fw_cmd_data(pAdapter, value, 1); *value &= 0xFF; #else hal_mpt_TriggerRFThermalMeter(pAdapter); - rtw_msleep_os(1000); + msleep(1000); *value = hal_mpt_ReadRFThermalMeter(pAdapter); #endif @@ -1680,7 +1680,7 @@ void hal_mpt_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart) #endif /* CONFIG_RTL8812A || CONFIG_RTL8821A || CONFIG_RTL8814A || CONFIG_RTL8822B || CONFIG_RTL8821C */ phy_set_bb_reg(pAdapter, rOFDM1_LSTF, BIT30 | BIT29 | BIT28, OFDM_ALL_OFF); - rtw_msleep_os(10); + msleep(10); /*/BB Reset*/ phy_set_bb_reg(pAdapter, rPMAC_Reset, bBBResetB, 0x0); phy_set_bb_reg(pAdapter, rPMAC_Reset, bBBResetB, 0x1); diff --git a/hal/phydm/phydm_interface.c b/hal/phydm/phydm_interface.c index 7fb1a25..cec3be4 100644 --- a/hal/phydm/phydm_interface.c +++ b/hal/phydm/phydm_interface.c @@ -632,11 +632,11 @@ void ODM_sleep_ms(u32 ms) #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) && defined(DM_ODM_CE_MAC80211_V2) msleep(ms); #elif (DM_ODM_SUPPORT_TYPE & ODM_CE) - rtw_msleep_os(ms); + msleep(ms); #elif (DM_ODM_SUPPORT_TYPE & ODM_WIN) delay_ms(ms); #elif (DM_ODM_SUPPORT_TYPE & ODM_IOT) - rtw_msleep_os(ms); + msleep(ms); #endif } diff --git a/hal/rtl8192e/rtl8192e_cmd.c b/hal/rtl8192e/rtl8192e_cmd.c index 69da857..6723d7e 100644 --- a/hal/rtl8192e/rtl8192e_cmd.c +++ b/hal/rtl8192e/rtl8192e_cmd.c @@ -40,7 +40,7 @@ static u8 _is_fw_read_cmd_down(_adapter *padapter, u8 msgbox_num) if (0 == valid) read_down = _TRUE; else - rtw_msleep_os(1); + msleep(1); } while ((!read_down) && (retry_cnts--)); return read_down; diff --git a/hal/rtl8192e/rtl8192e_hal_init.c b/hal/rtl8192e/rtl8192e_hal_init.c index 202b073..7808ae4 100644 --- a/hal/rtl8192e/rtl8192e_hal_init.c +++ b/hal/rtl8192e/rtl8192e_hal_init.c @@ -4047,7 +4047,7 @@ u8 SetHwReg8192E(PADAPTER Adapter, u8 variable, u8 *val) i++; /* wait MAC to flush out reserve pages */ - rtw_msleep_os(10); + msleep(10); } pass_ms = rtw_get_passing_time_ms(start); @@ -4423,7 +4423,7 @@ void hal_ra_info_dump(_adapter *padapter , void *sel) _RTW_PRINT_SEL(sel , "============ RA status check Mac_id:%d ===================\n", mac_id); cmd = 0x40000100 | mac_id; rtw_write32(padapter, REG_HMEBOX_E2_E3_8192E, cmd); - rtw_msleep_os(10); + msleep(10); ra_info1 = rtw_read32(padapter, REG_RSVD5_8192E); curr_tx_sgi = rtw_get_current_tx_sgi(padapter, macid_ctl->sta[mac_id]); curr_tx_rate = rtw_get_current_tx_rate(padapter, macid_ctl->sta[mac_id]); @@ -4433,7 +4433,7 @@ void hal_ra_info_dump(_adapter *padapter , void *sel) cmd = 0x40000400 | mac_id; rtw_write32(padapter, REG_HMEBOX_E2_E3_8192E, cmd); - rtw_msleep_os(10); + msleep(10); ra_info1 = rtw_read32(padapter, REG_RSVD5_8192E); ra_info2 = rtw_read32(padapter, REG_RSVD6_8192E); rate_mask1 = rtw_read32(padapter, REG_RSVD7_8192E); diff --git a/hal/rtl8192e/rtl8192e_phycfg.c b/hal/rtl8192e/rtl8192e_phycfg.c index 2ac1a21..6842de4 100644 --- a/hal/rtl8192e/rtl8192e_phycfg.c +++ b/hal/rtl8192e/rtl8192e_phycfg.c @@ -930,7 +930,7 @@ phy_SpurCalibration_8192E( phy_set_bb_reg(Adapter, rFPGA0_TxInfo, bMaskByte0, 0x3); phy_set_bb_reg(Adapter, rFPGA0_PSDFunction, bMaskDWord, 0xfccd); phy_set_bb_reg(Adapter, rFPGA0_PSDFunction, bMaskDWord, 0x40fccd); - /* rtw_msleep_os(30); */ + /* msleep(30); */ rtw_mdelay_os(30); PSDReport = phy_query_bb_reg(Adapter, rFPGA0_PSDReport, bMaskDWord); /* RTW_INFO(" Path A== PSDReport = 0x%x (%d)\n",PSDReport,PSDReport); */ @@ -945,7 +945,7 @@ phy_SpurCalibration_8192E( phy_set_bb_reg(Adapter, rFPGA0_TxInfo, bMaskByte0, 0x13); phy_set_bb_reg(Adapter, rFPGA0_PSDFunction, bMaskDWord, 0xfccd); phy_set_bb_reg(Adapter, rFPGA0_PSDFunction, bMaskDWord, 0x40fccd); - /* rtw_msleep_os(30); */ + /* msleep(30); */ rtw_mdelay_os(30); PSDReport = phy_query_bb_reg(Adapter, rFPGA0_PSDReport, bMaskDWord); /* RTW_INFO(" Path B== PSDReport = 0x%x (%d)\n",PSDReport,PSDReport); */ diff --git a/include/osdep_service.h b/include/osdep_service.h index d17467f..093e405 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -364,7 +364,6 @@ extern bool _rtw_time_after(systime a, systime b); extern void rtw_sleep_schedulable(int ms); -extern void rtw_msleep_os(int ms); extern void rtw_usleep_os(int us); extern u32 rtw_atoi(u8 *s); @@ -416,7 +415,7 @@ static inline void rtw_thread_wait_stop(void) #ifdef PLATFORM_LINUX #if 0 while (!kthread_should_stop()) - rtw_msleep_os(10); + msleep(10); #else set_current_state(TASK_INTERRUPTIBLE); while (!kthread_should_stop()) { diff --git a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c index 7846aef..4db2808 100644 --- a/os_dep/linux/ioctl_cfg80211.c +++ b/os_dep/linux/ioctl_cfg80211.c @@ -2539,7 +2539,7 @@ u32 rtw_cfg80211_wait_scan_req_empty(_adapter *adapter, u32 timeout_ms) break; } - rtw_msleep_os(10); + msleep(10); } pass_ms = rtw_get_passing_time_ms(start); @@ -6511,7 +6511,7 @@ void rtw_cfg80211_issue_p2p_provision_request(_adapter *padapter, const u8 *buf, #if 0 if(wps_devicepassword_id == WPS_DPID_REGISTRAR_SPEC) { RTW_INFO("waiting for p2p peer key-in PIN CODE\n"); - rtw_msleep_os(15000); /* 15 sec for key in PIN CODE, workaround for GS2 before issuing Nego Req. */ + msleep(15000); /* 15 sec for key in PIN CODE, workaround for GS2 before issuing Nego Req. */ } #endif @@ -7149,7 +7149,7 @@ issue_mgmt_frame: #ifdef CONFIG_XMIT_ACK if (!MLME_IS_MESH(padapter)) /* TODO: remove this sleep for all mode */ - rtw_msleep_os(50); + msleep(50); #endif #ifdef CONFIG_DEBUG_CFG80211 RTW_INFO("%s, ack=%d, ok!\n", __func__, ack); @@ -7426,7 +7426,7 @@ dump: break; if (sleep_ms > 0) - rtw_msleep_os(sleep_ms); + msleep(sleep_ms); } if (tx_ret != _SUCCESS || dump_cnt > 1) { @@ -8855,7 +8855,7 @@ int cfg80211_rtw_resume(struct wiphy *wiphy) { for (PNOWakeupScanWaitCnt = 0; PNOWakeupScanWaitCnt < 10; PNOWakeupScanWaitCnt++) { if(check_fwstate(pmlmepriv, _FW_UNDER_SURVEY) == _FALSE) break; - rtw_msleep_os(1000); + msleep(1000); } _enter_critical_bh(&pmlmepriv->lock, &irqL); diff --git a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c index 3aca931..ddfb168 100644 --- a/os_dep/linux/ioctl_linux.c +++ b/os_dep/linux/ioctl_linux.c @@ -2230,7 +2230,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a, ; while (check_fwstate(pmlmepriv, wait_status) == _TRUE) { - rtw_msleep_os(30); + msleep(30); cnt++; if (cnt > wait_for_surveydone) break; @@ -3726,7 +3726,7 @@ static int rtw_get_ap_info(struct net_device *dev, } while ((check_fwstate(pmlmepriv, (_FW_UNDER_SURVEY | _FW_UNDER_LINKING))) == _TRUE) { - rtw_msleep_os(30); + msleep(30); cnt++; if (cnt > 100) break; @@ -6524,7 +6524,7 @@ static int rtw_dbg_port(struct net_device *dev, d_data = rtw_read32(padapter, 0x04); imr = rtw_read32(padapter, 0x10250014); rtw_write32(padapter, 0x10250014, 0); - rtw_msleep_os(50); + msleep(50); i_data = rtw_sd_iread32(padapter, 0x04); @@ -6541,13 +6541,13 @@ static int rtw_dbg_port(struct net_device *dev, RTW_ERR("test_code :0x%02x, i_data : 0x%08x\n", test_code, i_data); } if ((j++) == 100) { - rtw_msleep_os(2000); + msleep(2000); RTW_INFO(" Indirect access testing..........%d/%d\n", i, test_cnts); j = 0; } test_code = ~test_code; - rtw_msleep_os(50); + msleep(50); } RTW_INFO("========Indirect access test=========\n"); RTW_INFO(" test_cnts = %d\n", test_cnts); @@ -9221,11 +9221,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, /* unknown bug workaround, need to fix later */ addr = 0x1ff; rtw_write8(padapter, EFUSE_CTRL + 1, (addr & 0xff)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 2, ((addr >> 8) & 0x03)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 3, 0x72); - rtw_msleep_os(10); + msleep(10); rtw_read8(padapter, EFUSE_CTRL); #endif /* RTW_HALMAC */ @@ -9510,11 +9510,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, BTEfuse_PowerSwitch(padapter, 1, _TRUE); addr = 0x1ff; rtw_write8(padapter, EFUSE_CTRL + 1, (addr & 0xff)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 2, ((addr >> 8) & 0x03)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 3, 0x72); - rtw_msleep_os(10); + msleep(10); rtw_read8(padapter, EFUSE_CTRL); BTEfuse_PowerSwitch(padapter, 1, _FALSE); #endif /* RTW_HALMAC */ @@ -9612,11 +9612,11 @@ static int rtw_mp_efuse_set(struct net_device *dev, BTEfuse_PowerSwitch(padapter, 1, _TRUE); addr = 0x1ff; rtw_write8(padapter, EFUSE_CTRL + 1, (addr & 0xff)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 2, ((addr >> 8) & 0x03)); - rtw_msleep_os(10); + msleep(10); rtw_write8(padapter, EFUSE_CTRL + 3, 0x72); - rtw_msleep_os(10); + msleep(10); rtw_read8(padapter, EFUSE_CTRL); BTEfuse_PowerSwitch(padapter, 1, _FALSE); #endif /* RTW_HALMAC */ @@ -10438,7 +10438,7 @@ static int rtw_priv_get(struct net_device *dev, return -EIO; } - rtw_msleep_os(10); /* delay 5ms for sending pkt before exit adb shell operation */ + msleep(10); /* delay 5ms for sending pkt before exit adb shell operation */ return 0; } @@ -11850,7 +11850,7 @@ static void loopbackTest(PADAPTER padapter, u32 cnt, u32 size, u8 *pmsg) len = strlen(ploopback->msg); if (len) break; - rtw_msleep_os(1); + msleep(1); } while (1); _rtw_memcpy(pmsg, ploopback->msg, len + 1); freeLoopback(padapter); diff --git a/os_dep/linux/ioctl_mp.c b/os_dep/linux/ioctl_mp.c index c4ef5a6..71de17c 100644 --- a/os_dep/linux/ioctl_mp.c +++ b/os_dep/linux/ioctl_mp.c @@ -1667,7 +1667,7 @@ int rtw_mp_pretx_proc(PADAPTER padapter, u8 bStartTest, char *extra) if (pmp_priv->tx.stop == 0) { pmp_priv->tx.stop = 1; - rtw_msleep_os(5); + msleep(5); } #ifdef CONFIG_80211N_HT if(padapter->registrypriv.ht_enable && @@ -2460,10 +2460,10 @@ int rtw_mp_SetBT(struct net_device *dev, MPT_PwrCtlDM(padapter, 0); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) | 0x00000004)); rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) & 0xFFFFFFEF)); - rtw_msleep_os(600); + msleep(600); rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) | 0x00000010)); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) & 0xFFFFFFFB)); - rtw_msleep_os(1200); + msleep(1200); pBTFirmware = (PRT_MP_FIRMWARE)rtw_zmalloc(sizeof(RT_MP_FIRMWARE)); if (pBTFirmware == NULL) goto exit; @@ -2473,13 +2473,13 @@ int rtw_mp_SetBT(struct net_device *dev, rtw_mfree((u8 *)pBTFirmware, sizeof(RT_MP_FIRMWARE)); RTW_INFO("Wait for FirmwareDownloadBT fw boot!\n"); - rtw_msleep_os(2000); + msleep(2000); _rtw_memset(extra, '\0', wrqu->data.length); BtReq.opCodeVer = 1; BtReq.OpCode = 0; BtReq.paraLength = 0; mptbt_BtControlProcess(padapter, &BtReq); - rtw_msleep_os(100); + msleep(100); RTW_INFO("FirmwareDownloadBT ready = 0x%x 0x%x", pMptCtx->mptOutBuf[4], pMptCtx->mptOutBuf[5]); if ((pMptCtx->mptOutBuf[4] == 0x00) && (pMptCtx->mptOutBuf[5] == 0x00)) { @@ -2522,10 +2522,10 @@ int rtw_mp_SetBT(struct net_device *dev, MPT_PwrCtlDM(padapter, 0); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) | 0x00000004)); rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) & 0xFFFFFFEF)); - rtw_msleep_os(600); + msleep(600); rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) | 0x00000010)); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) & 0xFFFFFFFB)); - rtw_msleep_os(1200); + msleep(1200); #if defined(CONFIG_PLATFORM_SPRD) && (MP_DRIVER == 1) /* Pull up BT reset pin.*/ @@ -2538,7 +2538,7 @@ int rtw_mp_SetBT(struct net_device *dev, status = rtl8723b_FirmwareDownload(padapter, _FALSE); #endif RTW_INFO("Wait for FirmwareDownloadBT fw boot!\n"); - rtw_msleep_os(1000); + msleep(1000); #ifdef CONFIG_BT_COEXIST rtw_btcoex_HaltNotify(padapter); RTW_INFO("SetBT btcoex HaltNotify !\n"); @@ -2550,7 +2550,7 @@ int rtw_mp_SetBT(struct net_device *dev, BtReq.OpCode = 0; BtReq.paraLength = 0; mptbt_BtControlProcess(padapter, &BtReq); - rtw_msleep_os(200); + msleep(200); RTW_INFO("FirmwareDownloadBT ready = 0x%x 0x%x", pMptCtx->mptOutBuf[4], pMptCtx->mptOutBuf[5]); if ((pMptCtx->mptOutBuf[4] == 0x00) && (pMptCtx->mptOutBuf[5] == 0x00)) { @@ -2562,7 +2562,7 @@ int rtw_mp_SetBT(struct net_device *dev, #ifdef CONFIG_BT_COEXIST rtw_btcoex_SwitchBtTRxMask(padapter); #endif - rtw_msleep_os(200); + msleep(200); sprintf(extra, "download FW OK.\n"); goto exit; } @@ -2583,23 +2583,23 @@ int rtw_mp_SetBT(struct net_device *dev, MPT_PwrCtlDM(padapter, 0); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) | 0x00000004)); rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) & 0xFFFFFFEF)); - rtw_msleep_os(600); + msleep(600); /*rtw_write32(padapter, 0x6a, (rtw_read32(padapter, 0x6a)& 0xFFFFFFFE));*/ rtw_write32(padapter, 0x6b, (rtw_read32(padapter, 0x6b) | 0x00000010)); rtw_write32(padapter, 0xcc, (rtw_read32(padapter, 0xcc) & 0xFFFFFFFB)); - rtw_msleep_os(1200); + msleep(1200); goto exit; } if (strncmp(extra, "disable", 7) == 0) { RTW_INFO("SetBT disable !\n"); rtw_write32(padapter, 0x6a, (rtw_read32(padapter, 0x6a) & 0xFFFFFFFB)); - rtw_msleep_os(500); + msleep(500); goto exit; } if (strncmp(extra, "enable", 6) == 0) { RTW_INFO("SetBT enable !\n"); rtw_write32(padapter, 0x6a, (rtw_read32(padapter, 0x6a) | 0x00000004)); - rtw_msleep_os(500); + msleep(500); goto exit; } if (strncmp(extra, "h2c", 3) == 0) { diff --git a/os_dep/linux/os_intfs.c b/os_dep/linux/os_intfs.c index 93ebe21..cf37f0a 100644 --- a/os_dep/linux/os_intfs.c +++ b/os_dep/linux/os_intfs.c @@ -3882,7 +3882,7 @@ static int netdev_close(struct net_device *pnetdev) RTW_INFO("netdev_close, bips_processing=%d\n", pwrctl->bips_processing); while (pwrctl->bips_processing == _TRUE) /* waiting for ips_processing done before call rtw_dev_unload() */ - rtw_msleep_os(1); + msleep(1); rtw_dev_unload(padapter); rtw_sdio_set_power(0); @@ -4646,7 +4646,7 @@ int rtw_suspend_common(_adapter *padapter) pwrpriv->bInSuspend = _TRUE; while (pwrpriv->bips_processing == _TRUE) - rtw_msleep_os(1); + msleep(1); #ifdef CONFIG_IOL_READ_EFUSE_MAP if (!padapter->bup) { diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index a66ce42..2d8b36b 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1597,32 +1597,6 @@ void rtw_sleep_schedulable(int ms) } -void rtw_msleep_os(int ms) -{ - -#ifdef PLATFORM_LINUX -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)) - if (ms < 20) { - unsigned long us = ms * 1000UL; - usleep_range(us, us + 1000UL); - } else -#endif - msleep((unsigned int)ms); - -#endif -#ifdef PLATFORM_FREEBSD - /* Delay for delay microseconds */ - DELAY(ms * 1000); - return ; -#endif -#ifdef PLATFORM_WINDOWS - - NdisMSleep(ms * 1000); /* (us)*1000=(ms) */ - -#endif - - -} void rtw_usleep_os(int us) { #ifdef PLATFORM_LINUX @@ -1660,7 +1634,7 @@ void _rtw_mdelay_os(int ms, const char *func, const int line) #if 0 if (ms > 10) RTW_INFO("%s:%d %s(%d)\n", func, line, __FUNCTION__, ms); - rtw_msleep_os(ms); + msleep(ms); return; #endif