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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkMt/HqQz56jYOek@kroah.com>
Date:   Tue, 29 Mar 2022 18:04:12 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Michael Straube <straube.linux@...il.com>
Cc:     Larry.Finger@...inger.net, phil@...lpotter.co.uk,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/9] staging: r8188eu: remove HW_VAR_RXDMA_AGG_PG_TH from
 SetHwReg8188EU()

On Mon, Mar 28, 2022 at 01:39:36PM +0200, Michael Straube wrote:
> The HW_VAR_RXDMA_AGG_PG_TH case in SetHwReg8188EU() just sets a
> variable conditionally and then calls rtw_write8(). Set the variable
> in the caller and, call rtw_write8() directly and remove the
> HW_VAR_RXDMA_AGG_PG_TH case from SetHwReg8188EU(). This is part of the
> ongoing effort to get rid of the unwanted hal layer.
> 
> Signed-off-by: Michael Straube <straube.linux@...il.com>
> ---
>  drivers/staging/r8188eu/core/rtw_mlme.c    | 7 +++++--
>  drivers/staging/r8188eu/hal/usb_halinit.c  | 8 --------
>  drivers/staging/r8188eu/include/hal_intf.h | 1 -
>  3 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/r8188eu/core/rtw_mlme.c b/drivers/staging/r8188eu/core/rtw_mlme.c
> index 6f0bff186477..14aff6a2040a 100644
> --- a/drivers/staging/r8188eu/core/rtw_mlme.c
> +++ b/drivers/staging/r8188eu/core/rtw_mlme.c
> @@ -1817,10 +1817,13 @@ void rtw_joinbss_reset(struct adapter *padapter)
>  			threshold = 1;
>  		else
>  			threshold = 0;
> -		SetHwReg8188EU(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
> +
> +		if (threshold == 0)
> +			threshold = USB_RXAGG_PAGE_COUNT;
> +		rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, threshold);
>  	} else {
>  		threshold = 1;
> -		SetHwReg8188EU(padapter, HW_VAR_RXDMA_AGG_PG_TH, (u8 *)(&threshold));
> +		rtw_write8(padapter, REG_RXDMA_AGG_PG_TH, threshold);

Can't you just ue 1 for the last parameter here?

And what about making this a function:
	rtw_set_threshold()?

thanks,

greg k-h

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ