diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-01-27 10:02:05 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-02-01 03:43:59 -0500 |
commit | fb208dc73ff1667191ba26d87610bba983ea1535 (patch) | |
tree | f124ba09740bc9c4a74e3285491bc3a348e7d8c5 | |
parent | 17cf68b702a60aee61432d59098b1ba6ceab2f98 (diff) |
mt76: avoid re-queueing A-MPDU rx reorder work if no frames are pending
Fixes: aee5b8cf2477 ("mt76: implement A-MPDU rx reordering in the driver code")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/agg-rx.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/agg-rx.c b/drivers/net/wireless/mediatek/mt76/agg-rx.c index e9784b50e2af..fcb208d1f276 100644 --- a/drivers/net/wireless/mediatek/mt76/agg-rx.c +++ b/drivers/net/wireless/mediatek/mt76/agg-rx.c | |||
@@ -98,6 +98,7 @@ mt76_rx_aggr_reorder_work(struct work_struct *work) | |||
98 | reorder_work.work); | 98 | reorder_work.work); |
99 | struct mt76_dev *dev = tid->dev; | 99 | struct mt76_dev *dev = tid->dev; |
100 | struct sk_buff_head frames; | 100 | struct sk_buff_head frames; |
101 | int nframes; | ||
101 | 102 | ||
102 | __skb_queue_head_init(&frames); | 103 | __skb_queue_head_init(&frames); |
103 | 104 | ||
@@ -105,9 +106,12 @@ mt76_rx_aggr_reorder_work(struct work_struct *work) | |||
105 | 106 | ||
106 | spin_lock(&tid->lock); | 107 | spin_lock(&tid->lock); |
107 | mt76_rx_aggr_check_release(tid, &frames); | 108 | mt76_rx_aggr_check_release(tid, &frames); |
109 | nframes = tid->nframes; | ||
108 | spin_unlock(&tid->lock); | 110 | spin_unlock(&tid->lock); |
109 | 111 | ||
110 | ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work, REORDER_TIMEOUT); | 112 | if (nframes) |
113 | ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work, | ||
114 | REORDER_TIMEOUT); | ||
111 | mt76_rx_complete(dev, &frames, -1); | 115 | mt76_rx_complete(dev, &frames, -1); |
112 | 116 | ||
113 | local_bh_enable(); | 117 | local_bh_enable(); |