linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>,
	Felix Fietkau <nbd@nbd.name>,
	linux-wireless@vger.kernel.org
Subject: Re: [RFC 07/12] mt76x02: fix hdr pointer in write txwi for USB
Date: Thu, 28 Feb 2019 16:23:38 +0200	[thread overview]
Message-ID: <87lg20at5h.fsf@codeaurora.org> (raw)
In-Reply-To: <20190228135208.GA8852@redhat.com> (Stanislaw Gruszka's message of "Thu, 28 Feb 2019 14:52:09 +0100")

Stanislaw Gruszka <sgruszka@redhat.com> writes:

> On Thu, Feb 28, 2019 at 10:38:20AM +0100, Lorenzo Bianconi wrote:
>> > Since we add txwi at the begining of skb->data, it no longer point
>> > to ieee80211_hdr. This breaks settings TS bit for probe response and
>> > beacons.
>> > 
>> > Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
>> > ---
>> >  drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 ++-
>> >  1 file changed, 2 insertions(+), 1 deletion(-)
>> > 
>> > diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
>> > index fdd6a021914d..bcf3126efda9 100644
>> > --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
>> > +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c
>> > @@ -85,8 +85,9 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data,
>> >  
>> >  	mt76x02_insert_hdr_pad(skb);
>> >  
>> > -	txwi = skb_push(skb, sizeof(struct mt76x02_txwi));
>> > +	txwi = (struct mt76x02_txwi *)(skb->data - sizeof(struct mt76x02_txwi));
>> >  	mt76x02_mac_write_txwi(dev, txwi, skb, wcid, sta, len);
>> > +	skb_push(skb, sizeof(struct mt76x02_txwi));
>> >  
>> >  	pid = mt76_tx_status_skb_add(mdev, wcid, skb);
>> >  	txwi->pktid = pid;
>> > -- 
>> > 2.20.1
>> > 
>> 
>> Good catch :)
>> I think we should post it ontop of wireless-drivers since sw encryption is not
>> working now.
>> 
>> Acked-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
>
> I can send it against 5.0, if Kalle will accept it, however
> I do not have practical bug associated with this. Maybe we
> sometimes can send ordinal frame with TS bit in txwi and it
> is then malformed by HW, but I'm not sure. IBSS work with
> this bug, not sure about MESH.

Too late for 5.0 as Linus will most likely release it on Sunday. I
recommend sending it to wireless-drivers-next so that I can queue it for
5.1.

-- 
Kalle Valo

  reply	other threads:[~2019-02-28 14:23 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28  8:03 [RFC 00/12] mt76x02: AP support for with PS Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 01/12] mt76x02: introduce mt76x02_beacon.c Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 02/12] mt76x02: add hrtimer for pre TBTT for USB Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 03/12] mt76x02: introduce beacon_ops Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 04/12] mt76x02u: implement beacon_ops Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 05/12] mt76x02: generalize some mmio beaconing functions Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 06/12] mt76x02u: add sta_ps Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 07/12] mt76x02: fix hdr pointer in write txwi for USB Stanislaw Gruszka
2019-02-28  9:38   ` Lorenzo Bianconi
2019-02-28 13:52     ` Stanislaw Gruszka
2019-02-28 14:23       ` Kalle Valo [this message]
2019-02-28  8:03 ` [RFC 08/12] mt76x02: disable HW encryption for group frames Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 09/12] mt76x02u: implement pre TBTT work for USB Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 10/12] mt76x02u: add mt76_release_buffered_frames Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 11/12] mt76x02: enable AP mode for USB Stanislaw Gruszka
2019-02-28  8:03 ` [RFC 12/12] mt76x02: remove set_tim Stanislaw Gruszka
2019-02-28 10:51   ` Felix Fietkau

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=87lg20at5h.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=nbd@nbd.name \
    --cc=sgruszka@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).