mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
mt76: mt76u: stop/free all possible rx queues
Stop/free all configured rx queues (data/mcu) in mt76u_stop_rx/mt76u_free_rx. This is a preliminary patch to support new devices (e.g. mt7663u) that rely on a hw queue for mcu messages 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:
committed by
Felix Fietkau
parent
38e09a49f4
commit
b430b7db38
@@ -646,18 +646,31 @@ mt76u_free_rx_queue(struct mt76_dev *dev, struct mt76_queue *q)
|
||||
|
||||
static void mt76u_free_rx(struct mt76_dev *dev)
|
||||
{
|
||||
struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN];
|
||||
struct mt76_queue *q;
|
||||
int i;
|
||||
|
||||
mt76u_free_rx_queue(dev, q);
|
||||
for (i = 0; i < __MT_RXQ_MAX; i++) {
|
||||
q = &dev->q_rx[i];
|
||||
if (!q->ndesc)
|
||||
continue;
|
||||
|
||||
mt76u_free_rx_queue(dev, q);
|
||||
}
|
||||
}
|
||||
|
||||
void mt76u_stop_rx(struct mt76_dev *dev)
|
||||
{
|
||||
struct mt76_queue *q = &dev->q_rx[MT_RXQ_MAIN];
|
||||
int i;
|
||||
struct mt76_queue *q;
|
||||
int i, j;
|
||||
|
||||
for (i = 0; i < q->ndesc; i++)
|
||||
usb_poison_urb(q->entry[i].urb);
|
||||
for (i = 0; i < __MT_RXQ_MAX; i++) {
|
||||
q = &dev->q_rx[i];
|
||||
if (!q->ndesc)
|
||||
continue;
|
||||
|
||||
for (j = 0; j < q->ndesc; j++)
|
||||
usb_poison_urb(q->entry[j].urb);
|
||||
}
|
||||
|
||||
tasklet_kill(&dev->usb.rx_tasklet);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user