lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Sat, 9 May 2020 09:42:58 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Qiuhao Li <Qiuhao.Li@...look.com>
Cc:     Larry.Finger@...inger.net, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: rtl8188eu: use usleep_range() for ATIM window
 size

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@...look.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

Powered by blists - more mailing lists