From fb0f432834c00adb14153bdbd99594e76713e69c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 12 Aug 2019 15:48:53 +0200 Subject: [PATCH] mt76: stop rx aggregation on station removal Fixes use-after-free issues on forced station removal during hardware restart on MT76x02 Signed-off-by: Felix Fietkau --- mac80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mac80211.c b/mac80211.c index ec9efb79..f443adc6 100644 --- a/mac80211.c +++ b/mac80211.c @@ -714,6 +714,9 @@ void __mt76_sta_remove(struct mt76_dev *dev, struct ieee80211_vif *vif, rcu_assign_pointer(dev->wcid[idx], NULL); synchronize_rcu(); + for (i = 0; i < ARRAY_SIZE(wcid->aggr); i++) + mt76_rx_aggr_stop(dev, wcid, i); + if (dev->drv->sta_remove) dev->drv->sta_remove(dev, vif, sta);