mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_mlme_ext.c
@ 2026-09-18 11:08 Rareș-Mihai Vladu
  2026-09-18 12:18 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Rareș-Mihai Vladu @ 2026-09-18 11:08 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, Rareș-Mihai Vladu

Replace msleep(10) with usleep_range(10000, 11000) for more
precise short sleep. msleep() can sleep up to 20ms for values
below 20ms due to timer granularity.

Signed-off-by: Rareș-Mihai Vladu <vladurares@gmail.com>
---
 drivers/staging/rtl8723bs/core/rtw_mlme_ext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
index e965133d9..f59302802 100644
--- a/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8723bs/core/rtw_mlme_ext.c
@@ -5749,7 +5749,7 @@ u8 chk_bmc_sleepq_hdl(struct adapter *padapter, unsigned char *pbuf)
 		return H2C_SUCCESS;
 
 	if ((pstapriv->tim_bitmap & BIT(0)) && (psta_bmc->sleepq_len > 0)) {
-		msleep(10);/*  10ms, ATIM(HIQ) Windows */
+		usleep_range(10000, 11000); /*  10ms, ATIM(HIQ) Windows */
 
 		/* spin_lock_bh(&psta_bmc->sleep_q.lock); */
 		spin_lock_bh(&pxmitpriv->lock);
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_mlme_ext.c
  2026-09-18 11:08 [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_mlme_ext.c Rareș-Mihai Vladu
@ 2026-09-18 12:18 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2026-09-18 12:18 UTC (permalink / raw)
  To: Rareș-Mihai Vladu; +Cc: gregkh, linux-staging, linux-kernel

On Fri, Sep 18, 2026 at 11:08:21AM +0000, Rareș-Mihai Vladu wrote:
> Replace msleep(10) with usleep_range(10000, 11000) for more
> precise short sleep. msleep() can sleep up to 20ms for values
> below 20ms due to timer granularity.
> 
> Signed-off-by: Rareș-Mihai Vladu <vladurares@gmail.com>

Better to search the archive to see if this has been proposed before.

https://lore.kernel.org/all/?q=chk_bmc_sleepq_hdl%20msleep

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-09-18 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 11:08 [PATCH] staging: rtl8723bs: replace msleep with usleep_range in rtw_mlme_ext.c Rareș-Mihai Vladu
2026-09-18 12:18 ` Dan Carpenter

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

all inboxes | Powered by JetHome®