Linux kernel staging patches
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: fix msleep warning in core
@ 2026-06-28 19:54 Ruziev Miraly
  0 siblings, 0 replies; only message in thread
From: Ruziev Miraly @ 2026-06-28 19:54 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging

The function description of msleep() states that msleep < 20ms can sleep
for up to 20ms. In LPS_RF_ON_check(), replacing msleep(1) with
usleep_range(1000, 2000) allows for more precise polling of the hardware
state without forcing the kernel thread to sleep for excessive periods.

Signed-off-by: Ruziev Miraly <miraly.dev@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_pwrctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
index b9f8cf101..262c5448b 100644
--- a/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
+++ b/drivers/staging/rtl8723bs/core/rtw_pwrctrl.c
@@ -414,7 +414,7 @@ s32 LPS_RF_ON_check(struct adapter *padapter, u32 delay_ms)
 			err = -1;
 			break;
 		}
-		msleep(1);
+		usleep_range(1000, 2000);
 	}
 
 	return err;
@@ -567,7 +567,7 @@ void LPS_Leave_check(struct adapter *padapter)
 		if (jiffies_to_msecs(jiffies - start_time) > 100)
 			break;
 
-		msleep(1);
+		musleep_range(1000, 2000);
 	}
 }
 
-- 
2.54.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-28 19:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-28 19:54 [PATCH] staging: rtl8723bs: fix msleep warning in core Ruziev Miraly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox