aboutsummaryrefslogtreecommitdiffstats
path: root/package/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-03-10 13:31:31 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-03-10 13:31:31 +0000
commit3c4978362160de9a26e7078c8cd321f58b92b8f3 (patch)
tree18e9400300fb250bd7f86fd1025a4bc0ee208965 /package/mac80211
parent1608713e6a6106360dad0d24ae2a74bb256ceabf (diff)
downloadupstream-3c4978362160de9a26e7078c8cd321f58b92b8f3.tar.gz
upstream-3c4978362160de9a26e7078c8cd321f58b92b8f3.tar.bz2
upstream-3c4978362160de9a26e7078c8cd321f58b92b8f3.zip
mac80211: limit TID buffering to prevent out-of-memory issues on low-memory systems
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30870 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/mac80211')
-rw-r--r--package/mac80211/patches/300-pending_work.patch22
-rw-r--r--package/mac80211/patches/563-mac80211_optimize_mcs_rate_mask.patch2
2 files changed, 23 insertions, 1 deletions
diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
index 0ca6a02b5f..25d3b17441 100644
--- a/package/mac80211/patches/300-pending_work.patch
+++ b/package/mac80211/patches/300-pending_work.patch
@@ -615,6 +615,28 @@
#ifdef CONFIG_MAC80211_VERBOSE_PS_DEBUG
printk(KERN_DEBUG "STA %pM aid %d: PS buffer for AC %d\n",
sta->sta.addr, sta->sta.aid, ac);
+@@ -1060,6 +1065,7 @@ static bool ieee80211_tx_prep_agg(struct
+ {
+ bool queued = false;
+ bool reset_agg_timer = false;
++ struct sk_buff *purge_skb = NULL;
+
+ if (test_bit(HT_AGG_STATE_OPERATIONAL, &tid_tx->state)) {
+ info->flags |= IEEE80211_TX_CTL_AMPDU;
+@@ -1101,8 +1107,13 @@ static bool ieee80211_tx_prep_agg(struct
+ info->control.vif = &tx->sdata->vif;
+ info->flags |= IEEE80211_TX_INTFL_NEED_TXPROCESSING;
+ __skb_queue_tail(&tid_tx->pending, skb);
++ if (skb_queue_len(&tid_tx->pending) > STA_MAX_TX_BUFFER)
++ purge_skb = __skb_dequeue(&tid_tx->pending);
+ }
+ spin_unlock(&tx->sta->lock);
++
++ if (purge_skb)
++ dev_kfree_skb(purge_skb);
+ }
+
+ /* reset session timer */
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -480,7 +480,7 @@ struct ieee80211_if_ibss {
diff --git a/package/mac80211/patches/563-mac80211_optimize_mcs_rate_mask.patch b/package/mac80211/patches/563-mac80211_optimize_mcs_rate_mask.patch
index 316663856c..534824f09a 100644
--- a/package/mac80211/patches/563-mac80211_optimize_mcs_rate_mask.patch
+++ b/package/mac80211/patches/563-mac80211_optimize_mcs_rate_mask.patch
@@ -68,7 +68,7 @@
txrc.bss = (tx->sdata->vif.type == NL80211_IFTYPE_AP ||
tx->sdata->vif.type == NL80211_IFTYPE_MESH_POINT ||
tx->sdata->vif.type == NL80211_IFTYPE_ADHOC);
-@@ -2455,8 +2457,6 @@ struct sk_buff *ieee80211_beacon_get_tim
+@@ -2461,8 +2463,6 @@ struct sk_buff *ieee80211_beacon_get_tim
txrc.max_rate_idx = -1;
else
txrc.max_rate_idx = fls(txrc.rate_idx_mask) - 1;