wifi: mt76: dma: rely on queue page_frag_cache for wed rx queues
Since mt76_dma_rx_fill() acquires mt76_queue spinlock, rely on mt76_queue page_frag_cache in mt76_dma_rx_fill() instead of wed rx_buf_ring page_frag_cache. Get rid of mt76_dma_rx_get_frag_cache since it is no longer used. Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
96f134dc19
commit
4493acad5b
1 changed files with 1 additions and 15 deletions
|
@ -554,23 +554,9 @@ free_skb:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct page_frag_cache *
|
|
||||||
mt76_dma_rx_get_frag_cache(struct mt76_dev *dev, struct mt76_queue *q)
|
|
||||||
{
|
|
||||||
struct page_frag_cache *rx_page = &q->rx_page;
|
|
||||||
|
|
||||||
#ifdef CONFIG_NET_MEDIATEK_SOC_WED
|
|
||||||
if ((q->flags & MT_QFLAG_WED) &&
|
|
||||||
FIELD_GET(MT_QFLAG_WED_TYPE, q->flags) == MT76_WED_Q_RX)
|
|
||||||
rx_page = &dev->mmio.wed.rx_buf_ring.rx_page;
|
|
||||||
#endif
|
|
||||||
return rx_page;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
|
mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
|
||||||
{
|
{
|
||||||
struct page_frag_cache *rx_page = mt76_dma_rx_get_frag_cache(dev, q);
|
|
||||||
int len = SKB_WITH_OVERHEAD(q->buf_size);
|
int len = SKB_WITH_OVERHEAD(q->buf_size);
|
||||||
int frames = 0, offset = q->buf_offset;
|
int frames = 0, offset = q->buf_offset;
|
||||||
dma_addr_t addr;
|
dma_addr_t addr;
|
||||||
|
@ -592,7 +578,7 @@ mt76_dma_rx_fill(struct mt76_dev *dev, struct mt76_queue *q)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
buf = page_frag_alloc(rx_page, q->buf_size, GFP_ATOMIC);
|
buf = page_frag_alloc(&q->rx_page, q->buf_size, GFP_ATOMIC);
|
||||||
if (!buf)
|
if (!buf)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue