linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
Cc: Lorenzo Bianconi <lorenzo@kernel.org>,
	nbd@nbd.name, ryder.lee@mediatek.com, roychl666@gmail.com,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/4] mt76: mmio: move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb
Date: Mon, 11 Mar 2019 15:58:52 +0100	[thread overview]
Message-ID: <20190311145852.GF6089@redhat.com> (raw)
In-Reply-To: <20190311142517.GB30882@localhost.localdomain>

On Mon, Mar 11, 2019 at 03:25:18PM +0100, Lorenzo Bianconi wrote:
> On Mar 11, Stanislaw Gruszka wrote:
> > On Mon, Mar 11, 2019 at 01:35:24PM +0100, Lorenzo Bianconi wrote:
> > > Introduce tx_aligned4_skbs in mt76_driver_ops and move
> > > mt76_insert_hdr_pad in mt76_dma_tx_queue_skb. This is a preliminary
> > > patch in order to unify tx dma mapping for mt76x02 and new chipsets
> > > 
> > > Signed-off-by: Felix Fietkau <nbd@nbd.name>
> > > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > > ---
> > >  drivers/net/wireless/mediatek/mt76/dma.c          |  3 +++
> > >  drivers/net/wireless/mediatek/mt76/mt76.h         |  1 +
> > >  drivers/net/wireless/mediatek/mt76/mt76x0/pci.c   |  1 +
> > >  drivers/net/wireless/mediatek/mt76/mt76x02_txrx.c | 13 +++++--------
> > >  drivers/net/wireless/mediatek/mt76/mt76x2/pci.c   |  1 +
> > >  5 files changed, 11 insertions(+), 8 deletions(-)
> > > 
> > > diff --git a/drivers/net/wireless/mediatek/mt76/dma.c b/drivers/net/wireless/mediatek/mt76/dma.c
> > > index a66832a02281..14dd6585bab4 100644
> > > --- a/drivers/net/wireless/mediatek/mt76/dma.c
> > > +++ b/drivers/net/wireless/mediatek/mt76/dma.c
> > > @@ -300,6 +300,9 @@ mt76_dma_tx_queue_skb(struct mt76_dev *dev, enum mt76_txq_id qid,
> > >  	}
> > >  
> > >  	skb->prev = skb->next = NULL;
> > > +	if (dev->drv->tx_aligned4_skbs)
> > > +		mt76_insert_hdr_pad(skb);
> > 
> > We need 4 bytes aligned skbs for mt76x02 or we just need header
> > lenght be multiple of 4 ?  
> 
> I think IV/LLC should be 4 byte aligned

mt76_insert_hdr_pad() does not change alignment of IV/LLC , it only
moves header.

I'm not sure what is actually needed (4 bytes alignment or 4 bytes
lenght), but I just saw Felix sent 2 mac80211 patches that hopfully
do the right thing, so this code after appling mac80211 changes
and set TX_NEEDS_ALIGNED4_SKBS can be removed.

Stanislaw


  reply	other threads:[~2019-03-11 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-11 12:35 [PATCH 0/4] move skb mapping before configuring txwi Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 1/4] mt76: move mt76x02_insert_hdr_pad in mt76-core module Lorenzo Bianconi
2019-03-11 13:30   ` Stanislaw Gruszka
2019-03-11 14:02     ` Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 2/4] mt76: mmio: move mt76_insert_hdr_pad in mt76_dma_tx_queue_skb Lorenzo Bianconi
2019-03-11 13:39   ` Stanislaw Gruszka
2019-03-11 14:25     ` Lorenzo Bianconi
2019-03-11 14:58       ` Stanislaw Gruszka [this message]
2019-03-11 15:01         ` Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 3/4] mt76: move skb dma mapping before running tx_prepare_skb Lorenzo Bianconi
2019-03-11 12:35 ` [PATCH 4/4] mt76: introduce mt76_tx_info data structure Lorenzo Bianconi
2019-03-11 13:17 ` [PATCH 0/4] move skb mapping before configuring txwi 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=20190311145852.GF6089@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=lorenzo@kernel.org \
    --cc=nbd@nbd.name \
    --cc=roychl666@gmail.com \
    --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 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).