mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
mt76: mt76u: add mt76_queue to mt76u_refill_rx signature
Introduce mt76_queue parameter to mt76u_refill_rx signature in order to reuse it for mcu hw rx queue Co-developed-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
0d1862104e
commit
ab221b207b
1 changed files with 7 additions and 5 deletions
|
@ -318,11 +318,12 @@ mt76u_fill_rx_sg(struct mt76_dev *dev, struct mt76_queue *q, struct urb *urb,
|
|||
}
|
||||
|
||||
static int
|
||||
mt76u_refill_rx(struct mt76_dev *dev, struct urb *urb, int nsgs, gfp_t gfp)
|
||||
mt76u_refill_rx(struct mt76_dev *dev, struct mt76_queue *q,
|
||||
struct urb *urb, int nsgs, gfp_t gfp)
|
||||
{
|
||||
struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN];
|
||||
enum mt76_rxq_id qid = q - &dev->q_rx[MT_RXQ_MAIN];
|
||||
|
||||
if (dev->usb.sg_en)
|
||||
if (qid == MT_RXQ_MAIN && dev->usb.sg_en)
|
||||
return mt76u_fill_rx_sg(dev, q, urb, nsgs, gfp);
|
||||
|
||||
urb->transfer_buffer_length = q->buf_size;
|
||||
|
@ -355,13 +356,14 @@ mt76u_urb_alloc(struct mt76_dev *dev, struct mt76_queue_entry *e,
|
|||
static int
|
||||
mt76u_rx_urb_alloc(struct mt76_dev *dev, struct mt76_queue_entry *e)
|
||||
{
|
||||
struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN];
|
||||
int err;
|
||||
|
||||
err = mt76u_urb_alloc(dev, e, MT_RX_SG_MAX_SIZE);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
return mt76u_refill_rx(dev, e->urb, MT_RX_SG_MAX_SIZE,
|
||||
return mt76u_refill_rx(dev, q, e->urb, MT_RX_SG_MAX_SIZE,
|
||||
GFP_KERNEL);
|
||||
}
|
||||
|
||||
|
@ -558,7 +560,7 @@ mt76u_process_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
|
|||
|
||||
count = mt76u_process_rx_entry(dev, urb, q->buf_size);
|
||||
if (count > 0) {
|
||||
err = mt76u_refill_rx(dev, urb, count, GFP_ATOMIC);
|
||||
err = mt76u_refill_rx(dev, q, urb, count, GFP_ATOMIC);
|
||||
if (err < 0)
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue