Skip to content

Commit

Permalink
mt76: avoid re-queueing A-MPDU rx reorder work if no frames are pending
Browse files Browse the repository at this point in the history
Fixes: aee5b8c ("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>
  • Loading branch information
Felix Fietkau authored and Kalle Valo committed Feb 1, 2018
1 parent 17cf68b commit fb208dc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/mediatek/mt76/agg-rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,20 @@ mt76_rx_aggr_reorder_work(struct work_struct *work)
reorder_work.work);
struct mt76_dev *dev = tid->dev;
struct sk_buff_head frames;
int nframes;

__skb_queue_head_init(&frames);

local_bh_disable();

spin_lock(&tid->lock);
mt76_rx_aggr_check_release(tid, &frames);
nframes = tid->nframes;
spin_unlock(&tid->lock);

ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work, REORDER_TIMEOUT);
if (nframes)
ieee80211_queue_delayed_work(tid->dev->hw, &tid->reorder_work,
REORDER_TIMEOUT);
mt76_rx_complete(dev, &frames, -1);

local_bh_enable();
Expand Down

0 comments on commit fb208dc

Please sign in to comment.