From 1fcfef2e077ed0eafac07643073ba96f2b9c6a39 Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 5 Aug 2021 14:26:39 -0500 Subject: [PATCH] Remove rtw_yield_os() This wrapper is just a call to yield(). Link: https://lore.kernel.org/r/20210805192644.15978-1-Larry.Finger@lwfinger.net --- core/rtw_mlme_ext.c | 2 +- core/rtw_pwrctrl.c | 2 +- hal/rtl8192e/rtl8192e_cmd.c | 2 +- hal/rtl8192e/rtl8192e_hal_init.c | 4 ++-- include/osdep_service.h | 3 --- os_dep/osdep_service.c | 13 ------------- 6 files changed, 5 insertions(+), 21 deletions(-) diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 33c2f43..98f94dd 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -10838,7 +10838,7 @@ unsigned int send_beacon(_adapter *padapter) #if defined(CONFIG_PCI_BCN_POLLING) rtw_msleep_os(1); #else - rtw_yield_os(); + yield(); #endif rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bxmitok)); poll++; diff --git a/core/rtw_pwrctrl.c b/core/rtw_pwrctrl.c index 9b0eddf..24fe550 100644 --- a/core/rtw_pwrctrl.c +++ b/core/rtw_pwrctrl.c @@ -1435,7 +1435,7 @@ void LPS_Leave_check( bReady = _FALSE; start_time = rtw_get_current_time(); - rtw_yield_os(); + yield(); while (1) { _enter_pwrlock(&pwrpriv->lock); diff --git a/hal/rtl8192e/rtl8192e_cmd.c b/hal/rtl8192e/rtl8192e_cmd.c index 4d866a9..69da857 100644 --- a/hal/rtl8192e/rtl8192e_cmd.c +++ b/hal/rtl8192e/rtl8192e_cmd.c @@ -353,7 +353,7 @@ void rtl8192e_download_rsvd_page(PADAPTER padapter, u8 mstatus) rtw_hal_set_fw_rsvd_page(padapter, _FALSE); DLBcnCount++; do { - rtw_yield_os(); + yield(); /* rtw_mdelay_os(10); */ /* check rsvd page download OK. */ rtw_hal_get_hwreg(padapter, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); diff --git a/hal/rtl8192e/rtl8192e_hal_init.c b/hal/rtl8192e/rtl8192e_hal_init.c index d8e756d..202b073 100644 --- a/hal/rtl8192e/rtl8192e_hal_init.c +++ b/hal/rtl8192e/rtl8192e_hal_init.c @@ -395,7 +395,7 @@ static s32 polling_fwdl_chksum(_adapter *adapter, u32 min_cnt, u32 timeout_ms) value32 = rtw_read32(adapter, REG_MCUFWDL); if (value32 & FWDL_ChkSum_rpt || RTW_CANNOT_IO(adapter)) break; - rtw_yield_os(); + yield(); } while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt); if (!(value32 & FWDL_ChkSum_rpt)) @@ -433,7 +433,7 @@ static s32 _FWFreeToGo8192E(_adapter *adapter, u32 min_cnt, u32 timeout_ms) value32 = rtw_read32(adapter, REG_MCUFWDL); if (value32 & WINTINI_RDY || RTW_CANNOT_IO(adapter)) break; - rtw_yield_os(); + yield(); } while (rtw_get_passing_time_ms(start) < timeout_ms || cnt < min_cnt); if (!(value32 & WINTINI_RDY)) diff --git a/include/osdep_service.h b/include/osdep_service.h index 7693791..d17467f 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -379,9 +379,6 @@ extern void rtw_mdelay_os(int ms); extern void rtw_udelay_os(int us); #endif -extern void rtw_yield_os(void); - - extern void rtw_init_timer(_timer *ptimer, void *padapter, void *pfunc, void *ctx); diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index e049115..a66ce42 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -1748,19 +1748,6 @@ void rtw_udelay_os(int us) } #endif -void rtw_yield_os(void) -{ -#ifdef PLATFORM_LINUX - yield(); -#endif -#ifdef PLATFORM_FREEBSD - yield(); -#endif -#ifdef PLATFORM_WINDOWS - SwitchToThread(); -#endif -} - bool rtw_macaddr_is_larger(const u8 *a, const u8 *b) { u32 va, vb;