mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-25 00:00:52 +07:00
mac80211: clean up aggregation destruction
Yogesh's patch to destroy aggregation sessions when stations are destroyed was needed, but unnecessarily complex. Clean up this code. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
d5a2ca60e4
commit
151a02f693
@ -815,34 +815,19 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* There could be some memory leaks because of ampdu tx pending queue
|
/*
|
||||||
* not being freed before destroying the station info.
|
* Destroy aggregation state here. It would be nice to wait for the
|
||||||
*
|
* driver to finish aggregation stop and then clean up, but for now
|
||||||
* Make sure that such queues are purged before freeing the station
|
* drivers have to handle aggregation stop being requested, followed
|
||||||
* info.
|
* directly by station destruction.
|
||||||
* TODO: We have to somehow postpone the full destruction
|
|
||||||
* until the aggregation stop completes. Refer
|
|
||||||
* http://thread.gmane.org/gmane.linux.kernel.wireless.general/81936
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
mutex_lock(&sta->ampdu_mlme.mtx);
|
|
||||||
|
|
||||||
for (i = 0; i < STA_TID_NUM; i++) {
|
for (i = 0; i < STA_TID_NUM; i++) {
|
||||||
tid_tx = rcu_dereference_protected_tid_tx(sta, i);
|
tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
|
||||||
if (!tid_tx)
|
if (!tid_tx)
|
||||||
continue;
|
continue;
|
||||||
if (skb_queue_len(&tid_tx->pending)) {
|
|
||||||
#ifdef CONFIG_MAC80211_HT_DEBUG
|
|
||||||
wiphy_debug(local->hw.wiphy, "TX A-MPDU purging %d "
|
|
||||||
"packets for tid=%d\n",
|
|
||||||
skb_queue_len(&tid_tx->pending), i);
|
|
||||||
#endif /* CONFIG_MAC80211_HT_DEBUG */
|
|
||||||
__skb_queue_purge(&tid_tx->pending);
|
__skb_queue_purge(&tid_tx->pending);
|
||||||
|
kfree(tid_tx);
|
||||||
}
|
}
|
||||||
kfree_rcu(tid_tx, rcu_head);
|
|
||||||
}
|
|
||||||
|
|
||||||
mutex_unlock(&sta->ampdu_mlme.mtx);
|
|
||||||
|
|
||||||
sta_info_free(local, sta);
|
sta_info_free(local, sta);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user