Commit e7aaa72f authored by Felix Fietkau's avatar Felix Fietkau

mt76: fix aggregation stop issue

Cancel the workqueue after the tid has been cleaned up, in order to
avoid a possible rescheduling from within the work function.
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent fb7d95c6
...@@ -130,8 +130,10 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames) ...@@ -130,8 +130,10 @@ mt76_rx_aggr_check_ctl(struct sk_buff *skb, struct sk_buff_head *frames)
return; return;
spin_lock_bh(&tid->lock); spin_lock_bh(&tid->lock);
mt76_rx_aggr_release_frames(tid, frames, seqno); if (!tid->stopped) {
mt76_rx_aggr_release_head(tid, frames); mt76_rx_aggr_release_frames(tid, frames, seqno);
mt76_rx_aggr_release_head(tid, frames);
}
spin_unlock_bh(&tid->lock); spin_unlock_bh(&tid->lock);
} }
...@@ -257,8 +259,6 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid) ...@@ -257,8 +259,6 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
u8 size = tid->size; u8 size = tid->size;
int i; int i;
cancel_delayed_work_sync(&tid->reorder_work);
spin_lock_bh(&tid->lock); spin_lock_bh(&tid->lock);
tid->stopped = true; tid->stopped = true;
...@@ -273,6 +273,8 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid) ...@@ -273,6 +273,8 @@ static void mt76_rx_aggr_shutdown(struct mt76_dev *dev, struct mt76_rx_tid *tid)
} }
spin_unlock_bh(&tid->lock); spin_unlock_bh(&tid->lock);
cancel_delayed_work_sync(&tid->reorder_work);
} }
void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno) void mt76_rx_aggr_stop(struct mt76_dev *dev, struct mt76_wcid *wcid, u8 tidno)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment