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]
Date:   Fri, 19 Jul 2019 18:17:56 +0800
From:   Ryder Lee <ryder.lee@...iatek.com>
To:     Felix Fietkau <nbd@....name>
CC:     Lorenzo Bianconi <lorenzo.bianconi@...hat.com>,
        Roy Luo <royluo@...gle.com>, YF Luo <yf.luo@...iatek.com>,
        Yiwei Chung <yiwei.chung@...iatek.com>,
        Sean Wang <sean.wang@...iatek.com>,
        <linux-wireless@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 3/3] mt76: mt7615: add cwmin/cwmax initial values

On Fri, 2019-07-19 at 14:55 +0800, Ryder Lee wrote:
> Add initial values in mt7615_mcu_set_wmm() to cleanup setup flow.
> 
> Signed-off-by: Ryder Lee <ryder.lee@...iatek.com>
> ---
>  drivers/net/wireless/mediatek/mt76/mt7615/mcu.c | 17 ++++++-----------
>  1 file changed, 6 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> index 5fd162be3654..154c09428b69 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
> @@ -622,10 +622,7 @@ int mt7615_mcu_set_rts_thresh(struct mt7615_dev *dev, u32 val)
>  int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue,
>  		       const struct ieee80211_tx_queue_params *params)
>  {
> -#define WMM_AIFS_SET	BIT(0)
> -#define WMM_CW_MIN_SET	BIT(1)
> -#define WMM_CW_MAX_SET	BIT(2)
> -#define WMM_TXOP_SET	BIT(3)
> +#define WMM_PARAM_SET	GENMASK(3, 0)
>  	struct req_data {
>  		u8 number;
>  		u8 rsv[3];
> @@ -638,19 +635,17 @@ int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue,
>  	} __packed req = {
>  		.number = 1,
>  		.queue = queue,
> -		.valid = WMM_AIFS_SET | WMM_TXOP_SET,
> +		.valid = WMM_PARAM_SET,
>  		.aifs = params->aifs,
> +		.cw_min = BIT(5) - 1,
> +		.cw_max = cpu_to_le16(BIT(10) - 1),
>  		.txop = cpu_to_le16(params->txop),
>  	};
>  
> -	if (params->cw_min) {
> -		req.valid |= WMM_CW_MIN_SET;
> +	if (params->cw_min)
>  		req.cw_min = params->cw_min;
> -	}
> -	if (params->cw_max) {
> -		req.valid |= WMM_CW_MAX_SET;
> +	if (params->cw_max)
>  		req.cw_max = cpu_to_le16(params->cw_max);
> -	}

I should use fls() here and will send a v2

>  	return __mt76_mcu_send_msg(&dev->mt76, MCU_EXT_CMD_EDCA_UPDATE,
>  				   &req, sizeof(req), true);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ