diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-03-03 21:19:21 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-03-07 14:50:23 +0300 |
commit | ffc9a7ff59a41df9a0a265b2dd04d97f2b35893a (patch) | |
tree | 740e9883b953d6931a0dd51fb4402f753d94190f /drivers/net/wireless | |
parent | b7001f46085e06a74e4677b44ac55566f66e55aa (diff) | |
download | linux-ffc9a7ff59a41df9a0a265b2dd04d97f2b35893a.tar.xz |
mt76: when releasing PS frames, end the service period if no frame was found
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>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/tx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/tx.c b/drivers/net/wireless/mediatek/mt76/tx.c index fc7dffe066be..2585df512335 100644 --- a/drivers/net/wireless/mediatek/mt76/tx.c +++ b/drivers/net/wireless/mediatek/mt76/tx.c @@ -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); |