All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Fietkau <nbd@nbd.name>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org,
	ryder.lee@mediatek.com
Subject: Re: [PATCH 2/7] mt76: mt7915: rely on mt76_connac_mcu_alloc_wtbl_req
Date: Sat, 18 Dec 2021 21:45:32 +0100	[thread overview]
Message-ID: <55f272bc-da5d-42bb-d20d-a9fda020285e@nbd.name> (raw)
In-Reply-To: <de5be711eae18d4d471ec142616a35a5247ab83b.1639763123.git.lorenzo@kernel.org>


On 2021-12-17 18:48, Lorenzo Bianconi wrote:
> Rely on mt76_connac_mcu_alloc_wtbl_req routine and remove
> duplicated code.
> 
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
>   .../wireless/mediatek/mt76/mt76_connac_mcu.c  |  8 +++-
>   .../net/wireless/mediatek/mt76/mt7915/mcu.c   | 43 ++++---------------
>   2 files changed, 15 insertions(+), 36 deletions(-)
> 
> diff --git a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> index fc5c870da420..ee512651d9f1 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
> @@ -309,8 +309,12 @@ mt76_connac_mcu_alloc_wtbl_req(struct mt76_dev *dev, struct mt76_wcid *wcid,
>   		*skb = nskb;
>   	}
>   
> -	if (sta_hdr)
> -		sta_hdr->len = cpu_to_le16(sizeof(hdr));
> +	if (sta_hdr) {
> +		if (is_mt7915(dev))
> +			le16_add_cpu(&sta_hdr->len, sizeof(hdr));
> +		else
> +			sta_hdr->len = cpu_to_le16(sizeof(hdr));
> +	}
>   
>   	return skb_put_data(nskb, &hdr, sizeof(hdr));
>   }
The change from the len assignment to addition was done as a bugfix in 
mt7915. I think it's likely that the assignment is buggy in the connac 
code as well and should be changed to match mt7915.

- Felix

  reply	other threads:[~2021-12-18 20:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 17:48 [PATCH 0/7] introduce mt76-connac dependency in mt7915 driver Lorenzo Bianconi
2021-12-17 17:48 ` [PATCH 1/7] mt76: mt7915: rely on mt76_connac_mcu_alloc_sta_req Lorenzo Bianconi
2021-12-18 20:36   ` Felix Fietkau
2021-12-17 17:48 ` [PATCH 2/7] mt76: mt7915: rely on mt76_connac_mcu_alloc_wtbl_req Lorenzo Bianconi
2021-12-18 20:45   ` Felix Fietkau [this message]
2021-12-17 17:48 ` [PATCH 3/7] mt76: mt7915: rely on mt76_connac_mcu_add_tlv routine Lorenzo Bianconi
2021-12-17 17:48 ` [PATCH 4/7] mt76: connac: move mt76_connac_mcu_get_cipher in common code Lorenzo Bianconi
2021-12-17 17:48 ` [PATCH 5/7] mt76: connac: move mt76_connac_chan_bw " Lorenzo Bianconi
2021-12-17 17:48 ` [PATCH 6/7] mt76: mt7915: rely on mt76_connac_get_phy utilities Lorenzo Bianconi
2021-12-17 17:48 ` [PATCH 7/7] mt76: connac: move mt76_connac_mcu_add_key in connac module Lorenzo Bianconi

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=55f272bc-da5d-42bb-d20d-a9fda020285e@nbd.name \
    --to=nbd@nbd.name \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=ryder.lee@mediatek.com \
    /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 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.