All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window size
@ 2020-05-09  7:19 Qiuhao Li
  2020-05-09  7:42   ` Greg KH
  0 siblings, 1 reply; 3+ messages in thread
From: Qiuhao Li @ 2020-05-09  7:19 UTC (permalink / raw)
  To: Larry.Finger; +Cc: devel, gregkh, linux-kernel, Qiuhao Li

According to Documentation/timers/timers-howto.rst, sleeping for small
milliseconds should use usleep_range() instead of msleep().

Signed-off-by: Qiuhao Li <Qiuhao.Li@outlook.com>
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 8d035f67ef61..61fdd942c30a 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -5406,7 +5406,8 @@ u8 tx_beacon_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 */
+			/* 10ms, ATIM(HIQ) Windows */
+			usleep_range(10000, 10001);
 			spin_lock_bh(&psta_bmc->sleep_q.lock);
 
 			xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
-- 
2.25.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* Re: [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window size
  2020-05-09  7:19 [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window size Qiuhao Li
@ 2020-05-09  7:42   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-05-09  7:42 UTC (permalink / raw)
  To: Qiuhao Li; +Cc: Larry.Finger, devel, linux-kernel

On Sat, May 09, 2020 at 03:19:31PM +0800, Qiuhao Li wrote:
> According to Documentation/timers/timers-howto.rst, sleeping for small
> milliseconds should use usleep_range() instead of msleep().
> 
> Signed-off-by: Qiuhao Li <Qiuhao.Li@outlook.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index 8d035f67ef61..61fdd942c30a 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -5406,7 +5406,8 @@ u8 tx_beacon_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 */
> +			/* 10ms, ATIM(HIQ) Windows */
> +			usleep_range(10000, 10001);

How do you know this will work properly?  Can you test this?

thanks,

greg k-h

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

* Re: [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window size
@ 2020-05-09  7:42   ` Greg KH
  0 siblings, 0 replies; 3+ messages in thread
From: Greg KH @ 2020-05-09  7:42 UTC (permalink / raw)
  To: Qiuhao Li; +Cc: devel, linux-kernel, Larry.Finger

On Sat, May 09, 2020 at 03:19:31PM +0800, Qiuhao Li wrote:
> According to Documentation/timers/timers-howto.rst, sleeping for small
> milliseconds should use usleep_range() instead of msleep().
> 
> Signed-off-by: Qiuhao Li <Qiuhao.Li@outlook.com>
> ---
>  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> index 8d035f67ef61..61fdd942c30a 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
> @@ -5406,7 +5406,8 @@ u8 tx_beacon_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 */
> +			/* 10ms, ATIM(HIQ) Windows */
> +			usleep_range(10000, 10001);

How do you know this will work properly?  Can you test this?

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2020-05-09  7:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-09  7:19 [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window size Qiuhao Li
2020-05-09  7:42 ` Greg KH
2020-05-09  7:42   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.