ath9k: fix issues that have been plaguing some powersave clients since the tx queuein...
[openwrt.git] / package / kernel / mac80211 / patches / 300-pending_work.patch
index b0037da..b0c9073 100644 (file)
@@ -1,3 +1,30 @@
+commit 0f1cb7be2551b30b02cd54c897e0e29e483cfda5
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Sat Feb 22 13:43:29 2014 +0100
+
+    ath9k: fix ps-poll responses under a-mpdu sessions
+    
+    When passing tx frames to the U-APSD queue for powersave poll responses,
+    the ath_atx_tid pointer needs to be passed to ath_tx_setup_buffer for
+    proper sequence number accounting.
+    
+    This fixes high latency and connection stability issues with ath9k
+    running as AP and a few kinds of mobile phones as client, when PS-Poll
+    is heavily used
+    
+    Cc: stable@vger.kernel.org
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
+commit d5d87a37bbd6066b2c3c5d0bd0fe2a6e2ea45cc5
+Author: Felix Fietkau <nbd@openwrt.org>
+Date:   Fri Feb 21 11:39:59 2014 +0100
+
+    ath9k: list more reset causes in debugfs
+    
+    Number of MAC hangs and stuck beacons were missing
+    
+    Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+
 commit d84856012e0f10fe598a5ad3b7b869397a089e07
 Author: Johannes Berg <johannes.berg@intel.com>
 Date:   Thu Feb 20 11:19:58 2014 +0100
@@ -2991,6 +3018,24 @@ Date:   Thu Jan 23 20:06:34 2014 +0100
                buffered = ath_tid_has_buffered(tid);
  
                tid->sched = false;
+@@ -2184,14 +2186,15 @@ int ath_tx_start(struct ieee80211_hw *hw
+               txq->stopped = true;
+       }
++      if (txctl->an)
++              tid = ath_get_skb_tid(sc, txctl->an, skb);
++
+       if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {
+               ath_txq_unlock(sc, txq);
+               txq = sc->tx.uapsdq;
+               ath_txq_lock(sc, txq);
+       } else if (txctl->an &&
+                  ieee80211_is_data_present(hdr->frame_control)) {
+-              tid = ath_get_skb_tid(sc, txctl->an, skb);
+-
+               WARN_ON(tid->ac->txq != txctl->txq);
+               if (info->flags & IEEE80211_TX_CTL_CLEAR_PS_FILT)
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
 @@ -943,6 +943,7 @@ static void ath9k_set_hw_capab(struct at
@@ -3236,3 +3281,18 @@ Date:   Thu Jan 23 20:06:34 2014 +0100
                    treatment == REG_REQ_ALREADY_SET)
                        return;
                schedule_delayed_work(&reg_timeout, msecs_to_jiffies(3142));
+--- a/drivers/net/wireless/ath/ath9k/debug.c
++++ b/drivers/net/wireless/ath/ath9k/debug.c
+@@ -866,6 +866,12 @@ static ssize_t read_file_reset(struct fi
+                        "%17s: %2d\n", "PLL RX Hang",
+                        sc->debug.stats.reset[RESET_TYPE_PLL_HANG]);
+       len += scnprintf(buf + len, sizeof(buf) - len,
++                       "%17s: %2d\n", "MAC Hang",
++                       sc->debug.stats.reset[RESET_TYPE_MAC_HANG]);
++      len += scnprintf(buf + len, sizeof(buf) - len,
++                       "%17s: %2d\n", "Stuck Beacon",
++                       sc->debug.stats.reset[RESET_TYPE_BEACON_STUCK]);
++      len += scnprintf(buf + len, sizeof(buf) - len,
+                        "%17s: %2d\n", "MCI Reset",
+                        sc->debug.stats.reset[RESET_TYPE_MCI]);