aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-02-27 21:46:15 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-02-27 21:46:15 +0000
commit1f08de0a7e31ae97537b5db55a32016883ec09ad (patch)
tree881883d64af5022949282afac9f9f6a64a10e274 /package
parente21f69d6405160667186d1043aa5a63943ffe787 (diff)
downloadupstream-1f08de0a7e31ae97537b5db55a32016883ec09ad.tar.gz
upstream-1f08de0a7e31ae97537b5db55a32016883ec09ad.tar.bz2
upstream-1f08de0a7e31ae97537b5db55a32016883ec09ad.zip
mac80211: improve ath9k AP A-MPDU PS buffering
SVN-Revision: 25779
Diffstat (limited to 'package')
-rw-r--r--package/mac80211/patches/530-mac80211_drv_tim_override.patch48
-rw-r--r--package/mac80211/patches/540-mac80211_add_rx_rate.patch4
2 files changed, 44 insertions, 8 deletions
diff --git a/package/mac80211/patches/530-mac80211_drv_tim_override.patch b/package/mac80211/patches/530-mac80211_drv_tim_override.patch
index 96e5ea3245..198f658a61 100644
--- a/package/mac80211/patches/530-mac80211_drv_tim_override.patch
+++ b/package/mac80211/patches/530-mac80211_drv_tim_override.patch
@@ -1,6 +1,6 @@
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -2209,6 +2209,20 @@ static inline int ieee80211_sta_ps_trans
+@@ -2209,6 +2209,18 @@ static inline int ieee80211_sta_ps_trans
#define IEEE80211_TX_STATUS_HEADROOM 13
/**
@@ -10,10 +10,8 @@
+ * them back to mac80211 for retransmission, the station needs to be told
+ * to wake up using the TIM bitmap in the beacon.
+ *
-+ * This function sets the station's TIM bit - it will be cleared automatically
-+ * either when the station wakes up (and mac80211 has flushed out its
-+ * buffered frames), or if all remaining buffered frames in mac80211 have
-+ * timed out.
++ * This function sets the station's TIM bit - it will be cleared when the
++ * station wakes up.
+ */
+void ieee80211_sta_set_tim(struct ieee80211_sta *sta);
+
@@ -23,7 +21,25 @@
* Call this function for all transmitted frames after they have been
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
-@@ -991,3 +991,11 @@ void ieee80211_sta_block_awake(struct ie
+@@ -608,7 +608,8 @@ static bool sta_info_cleanup_expire_buff
+ #endif
+ dev_kfree_skb(skb);
+
+- if (skb_queue_empty(&sta->ps_tx_buf))
++ if (skb_queue_empty(&sta->ps_tx_buf) &&
++ !test_sta_flags(sta, WLAN_STA_PS_DRIVER_BUF))
+ sta_info_clear_tim_bit(sta);
+ }
+
+@@ -899,6 +900,7 @@ void ieee80211_sta_ps_deliver_wakeup(str
+ struct ieee80211_local *local = sdata->local;
+ int sent, buffered;
+
++ clear_sta_flags(sta, WLAN_STA_PS_DRIVER_BUF);
+ if (!(local->hw.flags & IEEE80211_HW_AP_LINK_PS))
+ drv_sta_notify(local, sdata, STA_NOTIFY_AWAKE, &sta->sta);
+
+@@ -991,3 +993,12 @@ void ieee80211_sta_block_awake(struct ie
ieee80211_queue_work(hw, &sta->drv_unblock_wk);
}
EXPORT_SYMBOL(ieee80211_sta_block_awake);
@@ -32,6 +48,26 @@
+{
+ struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
+
++ set_sta_flags(sta, WLAN_STA_PS_DRIVER_BUF);
+ sta_info_set_tim_bit(sta);
+}
+EXPORT_SYMBOL(ieee80211_sta_set_tim);
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -43,6 +43,8 @@
+ * be in the queues
+ * @WLAN_STA_PSPOLL: Station sent PS-poll while driver was keeping
+ * station in power-save mode, reply when the driver unblocks.
++ * @WLAN_STA_PS_DRIVER_BUF: Station has frames pending in driver internal
++ * buffers. Automatically cleared on station wake-up.
+ */
+ enum ieee80211_sta_info_flags {
+ WLAN_STA_AUTH = 1<<0,
+@@ -58,6 +60,7 @@ enum ieee80211_sta_info_flags {
+ WLAN_STA_BLOCK_BA = 1<<11,
+ WLAN_STA_PS_DRIVER = 1<<12,
+ WLAN_STA_PSPOLL = 1<<13,
++ WLAN_STA_PS_DRIVER_BUF = 1<<14,
+ };
+
+ #define STA_TID_NUM 16
diff --git a/package/mac80211/patches/540-mac80211_add_rx_rate.patch b/package/mac80211/patches/540-mac80211_add_rx_rate.patch
index 137e6d19e7..d365f35245 100644
--- a/package/mac80211/patches/540-mac80211_add_rx_rate.patch
+++ b/package/mac80211/patches/540-mac80211_add_rx_rate.patch
@@ -132,7 +132,7 @@
NLA_PUT_U32(msg, NL80211_STA_INFO_RX_PACKETS,
--- a/net/mac80211/sta_info.h
+++ b/net/mac80211/sta_info.h
-@@ -209,6 +209,8 @@ enum plink_state {
+@@ -212,6 +212,8 @@ enum plink_state {
* @rate_ctrl_priv: rate control private per-STA pointer
* @last_tx_rate: rate used for last transmit, to report to userspace as
* "the" transmit rate
@@ -141,7 +141,7 @@
* @lock: used for locking all fields that require locking, see comments
* in the header file.
* @flaglock: spinlock for flags accesses
-@@ -311,6 +313,8 @@ struct sta_info {
+@@ -314,6 +316,8 @@ struct sta_info {
unsigned long tx_bytes;
unsigned long tx_fragments;
struct ieee80211_tx_rate last_tx_rate;