Linux wireless drivers development
 help / color / mirror / Atom feed
From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Henk Vergonet <henk.vergonet@gmail.com>
Cc: linux-wireless@vger.kernel.org, Felix Fietkau <nbd@nbd.name>
Subject: Re: [PATCH 2/2] mt76: mt76x2: Disable VHT on 0x76320044 ASIC
Date: Fri, 18 Apr 2025 14:38:03 +0200	[thread overview]
Message-ID: <aAJHqxIcw6J3yWoU@lore-desk> (raw)
In-Reply-To: <20250418002827.26806-2-henk.vergonet@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

> From: Henk Vergonet <Henk.Vergonet@gmail.com>
> 
> VHT is not supported on ASIC revision 0x76320044
> 
> This fixes the 5G connectibity issue on LiteOn WN4519R module
> see https://github.com/openwrt/mt76/issues/971
> 
> And may also fix the 5G issues on the XBox One Wireless Adapter
> see https://github.com/openwrt/mt76/issues/200
> ---
>  drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)

I think this patch must be squashed with the previous one. Moreover, can you
please run checkpatch.pl? There are some coding style problems here.

> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c
> index 33a14365ec9b..fbb337ef6b68 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76x2/usb_init.c
> @@ -191,6 +191,7 @@ int mt76x2u_register_device(struct mt76x02_dev *dev)
>  {
>  	struct ieee80211_hw *hw = mt76_hw(dev);
>  	struct mt76_usb *usb = &dev->mt76.usb;
> +	bool vht_flag;

maybe something more meaningful, like 'is_vht' or even just 'vht'.

>  	int err;
>  
>  	INIT_DELAYED_WORK(&dev->cal_work, mt76x2u_phy_calibrate);
> @@ -217,7 +218,15 @@ int mt76x2u_register_device(struct mt76x02_dev *dev)
>  
>  	/* check hw sg support in order to enable AMSDU */
>  	hw->max_tx_fragments = dev->mt76.usb.sg_en ? MT_TX_SG_MAX_SIZE : 1;
> -	err = mt76_register_device(&dev->mt76, true, mt76x02_rates,
> +	switch(dev->mt76.rev ) {

remove space before ')'

> +		/* these ASIC revisions do not support VHT */
> +		case 0x76320044:

are you sure this is true for all '0x76320044' ASICs?

> +			vht_flag = false;
> +			break;
> +		default:
> +			vht_flag = true;

missing break

> +	}
> +	err = mt76_register_device(&dev->mt76, vht_flag, mt76x02_rates,
>  				   ARRAY_SIZE(mt76x02_rates));
>  	if (err)
>  		goto fail;
> -- 
> 2.45.2
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2025-04-18 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18  0:28 [PATCH 1/2] mt76: mt76x2: Add support for LiteOn: WN4516R, WN4519R Henk Vergonet
2025-04-18  0:28 ` [PATCH 2/2] mt76: mt76x2: Disable VHT on 0x76320044 ASIC Henk Vergonet
2025-04-18 12:38   ` Lorenzo Bianconi [this message]
2025-04-18 13:36     ` Henk Vergonet
2025-04-18 14:06     ` [PATCH] [PATCH v2] wifi: mt76x2: Add support for LiteOn WN4516R and WN4519R Henk Vergonet
2025-04-18 14:18       ` Lorenzo Bianconi
2025-04-18 14:39         ` [PATCH v3] wifi: mt76x2: Add support for LiteOn WN4516R,WN4519R Henk Vergonet
2025-04-18 14:46         ` [PATCH] [PATCH v2] wifi: mt76x2: Add support for LiteOn WN4516R and WN4519R Henk Vergonet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aAJHqxIcw6J3yWoU@lore-desk \
    --to=lorenzo@kernel.org \
    --cc=henk.vergonet@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=nbd@nbd.name \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox