Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 278885
b: refs/heads/master
c: 42624d4
h: refs/heads/master
i:
  278883: 0fb7f84
v: v3
  • Loading branch information
Yogesh Ashok Powar authored and John W. Linville committed Dec 13, 2011
1 parent 0088ece commit e275c0d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: adbde344dc12514d68620afae8d34035e72544b1
refs/heads/master: 42624d4913a00219a8fdbb4bafd634d1d843be85
2 changes: 2 additions & 0 deletions trunk/net/mac80211/agg-tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@
* @ampdu_action function will be called with the action
* %IEEE80211_AMPDU_TX_STOP. In this case, the call must not fail,
* and the driver must later call ieee80211_stop_tx_ba_cb_irqsafe().
* Note that the sta can get destroyed before the BA tear down is
* complete.
*/

static void ieee80211_send_addba_request(struct ieee80211_sub_if_data *sdata,
Expand Down
25 changes: 25 additions & 0 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -851,6 +851,7 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
struct ieee80211_sub_if_data *sdata;
unsigned long flags;
int ret, i, ac;
struct tid_ampdu_tx *tid_tx;

might_sleep();

Expand Down Expand Up @@ -949,6 +950,30 @@ static int __must_check __sta_info_destroy(struct sta_info *sta)
}
#endif

/* There could be some memory leaks because of ampdu tx pending queue
* not being freed before destroying the station info.
*
* Make sure that such queues are purged before freeing the station
* info.
* 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
*/
for (i = 0; i < STA_TID_NUM; i++) {
if (!sta->ampdu_mlme.tid_tx[i])
continue;
tid_tx = sta->ampdu_mlme.tid_tx[i];
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);
}
kfree_rcu(tid_tx, rcu_head);
}

__sta_info_free(local, sta);

return 0;
Expand Down

0 comments on commit e275c0d

Please sign in to comment.