]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mt76: when releasing PS frames, end the service period if no frame was found
authorFelix Fietkau <nbd@nbd.name>
Sun, 3 Mar 2019 18:19:21 +0000 (19:19 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 7 Mar 2019 11:50:23 +0000 (12:50 +0100)
Fixes a rare corner case if the txq dequeue attempt fails, but mac80211
still has PS buffered packets

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

index fc7dffe066be43417438f05d01644163d727a64a..2585df5123350ba8adf52cf14ef6133de7e03f77 100644 (file)
@@ -377,7 +377,10 @@ mt76_release_buffered_frames(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
        if (last_skb) {
                mt76_queue_ps_skb(dev, sta, last_skb, true);
                dev->queue_ops->kick(dev, hwq);
+       } else {
+               ieee80211_sta_eosp(sta);
        }
+
        spin_unlock_bh(&hwq->lock);
 }
 EXPORT_SYMBOL_GPL(mt76_release_buffered_frames);