]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mt76: avoid scheduling tx queues for powersave stations
authorFelix Fietkau <nbd@nbd.name>
Mon, 21 Jan 2019 16:33:38 +0000 (17:33 +0100)
committerFelix Fietkau <nbd@nbd.name>
Tue, 22 Jan 2019 15:37:35 +0000 (16:37 +0100)
In case a tx queue wake call arrives after a client has transitioned to
powersave, make sure that the queue is not kept active until the client
has left powersave mode

Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/tx.c

index 1ea08ce62713eb337c3391f82d7d858353d07dfd..ef38e8626da95fb07d6e0efa4f03d092994e7c7e 100644 (file)
@@ -396,6 +396,11 @@ mt76_txq_send_burst(struct mt76_dev *dev, struct mt76_queue *hwq,
        bool probe;
        int idx;
 
+       if (test_bit(MT_WCID_FLAG_PS, &wcid->flags)) {
+               *empty = true;
+               return 0;
+       }
+
        skb = mt76_txq_dequeue(dev, mtxq, false);
        if (!skb) {
                *empty = true;