diff options
Diffstat (limited to 'net/mac80211')
-rw-r--r-- | net/mac80211/tx.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 570737df2d22..d9e791d2b543 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1065,6 +1065,7 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx, | |||
1065 | { | 1065 | { |
1066 | bool queued = false; | 1066 | bool queued = false; |
1067 | bool reset_agg_timer = false; | 1067 | bool reset_agg_timer = false; |
1068 | struct sk_buff *purge_skb = NULL; | ||
1068 | 1069 | ||
1069 | if (test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) { | 1070 | if (test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) { |
1070 | info->flags |= IEEE80211_TX_CTL_AMPDU; | 1071 | info->flags |= IEEE80211_TX_CTL_AMPDU; |
@@ -1106,8 +1107,13 @@ static bool ieee80211_tx_prep_agg(struct ieee80211_tx_data *tx, | |||
1106 | info->control.vif = &tx->sdata->vif; | 1107 | info->control.vif = &tx->sdata->vif; |
1107 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; | 1108 | info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING; |
1108 | __skb_queue_tail(&tid_tx->pending, skb); | 1109 | __skb_queue_tail(&tid_tx->pending, skb); |
1110 | if (skb_queue_len(&tid_tx->pending) > STA_MAX_TX_BUFFER) | ||
1111 | purge_skb = __skb_dequeue(&tid_tx->pending); | ||
1109 | } | 1112 | } |
1110 | spin_unlock(&tx->sta->lock); | 1113 | spin_unlock(&tx->sta->lock); |
1114 | |||
1115 | if (purge_skb) | ||
1116 | dev_kfree_skb(purge_skb); | ||
1111 | } | 1117 | } |
1112 | 1118 | ||
1113 | /* reset session timer */ | 1119 | /* reset session timer */ |