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@xxxxxxxx> > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> > --- > 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 ? Stanislaw