0031-mac80211-add-another-ath9k-patch.patch 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Thu, 24 Jul 2014 03:00:23 +0200
  3. Subject: mac80211: add another ath9k patch
  4. diff --git a/package/mac80211/patches/300-pending_work.patch b/package/mac80211/patches/300-pending_work.patch
  5. index ba05bde..6197e0e 100644
  6. --- a/package/mac80211/patches/300-pending_work.patch
  7. +++ b/package/mac80211/patches/300-pending_work.patch
  8. @@ -1,3 +1,21 @@
  9. +commit ff354dbdd743e5fe186df8cd17982db19f78231a
  10. +Author: Felix Fietkau <nbd@openwrt.org>
  11. +Date: Wed Jul 23 15:33:26 2014 +0200
  12. +
  13. + ath9k: fix aggregation session lockup
  14. +
  15. + If an aggregation session fails, frames still end up in the driver queue
  16. + with IEEE80211_TX_CTL_AMPDU set.
  17. + This causes tx for the affected station/tid to stall, since
  18. + ath_tx_get_tid_subframe returning packets to send.
  19. +
  20. + Fix this by clearing IEEE80211_TX_CTL_AMPDU as long as no aggregation
  21. + session is running.
  22. +
  23. + Cc: stable@vger.kernel.org
  24. + Reported-by: Antonio Quartulli <antonio@open-mesh.com>
  25. + Signed-off-by: Felix Fietkau <nbd@openwrt.org>
  26. +
  27. commit 38695a6e5a940e6a524523b88a33916b016fb2a1
  28. Author: Felix Fietkau <nbd@openwrt.org>
  29. Date: Fri Jul 11 12:06:18 2014 +0200
  30. @@ -2990,7 +3008,23 @@ Date: Mon May 19 21:20:49 2014 +0200
  31. if (WARN_ON(--txq->pending_frames < 0))
  32. txq->pending_frames = 0;
  33. -@@ -1999,6 +1997,7 @@ static void setup_frame_info(struct ieee
  34. +@@ -887,6 +885,15 @@ ath_tx_get_tid_subframe(struct ath_softc
  35. +
  36. + tx_info = IEEE80211_SKB_CB(skb);
  37. + tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT;
  38. ++
  39. ++ /*
  40. ++ * No aggregation session is running, but there may be frames
  41. ++ * from a previous session or a failed attempt in the queue.
  42. ++ * Send them out as normal data frames
  43. ++ */
  44. ++ if (!tid->active)
  45. ++ tx_info->flags &= ~IEEE80211_TX_CTL_AMPDU;
  46. ++
  47. + if (!(tx_info->flags & IEEE80211_TX_CTL_AMPDU)) {
  48. + bf->bf_state.bf_type = 0;
  49. + return bf;
  50. +@@ -1999,6 +2006,7 @@ static void setup_frame_info(struct ieee
  51. an = (struct ath_node *) sta->drv_priv;
  52. memset(fi, 0, sizeof(*fi));
  53. @@ -2998,7 +3032,7 @@ Date: Mon May 19 21:20:49 2014 +0200
  54. if (hw_key)
  55. fi->keyix = hw_key->hw_key_idx;
  56. else if (an && ieee80211_is_data(hdr->frame_control) && an->ps_key > 0)
  57. -@@ -2150,6 +2149,7 @@ int ath_tx_start(struct ieee80211_hw *hw
  58. +@@ -2150,6 +2158,7 @@ int ath_tx_start(struct ieee80211_hw *hw
  59. struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  60. struct ieee80211_sta *sta = txctl->sta;
  61. struct ieee80211_vif *vif = info->control.vif;
  62. @@ -3006,7 +3040,7 @@ Date: Mon May 19 21:20:49 2014 +0200
  63. struct ath_softc *sc = hw->priv;
  64. struct ath_txq *txq = txctl->txq;
  65. struct ath_atx_tid *tid = NULL;
  66. -@@ -2170,11 +2170,13 @@ int ath_tx_start(struct ieee80211_hw *hw
  67. +@@ -2170,11 +2179,13 @@ int ath_tx_start(struct ieee80211_hw *hw
  68. q = skb_get_queue_mapping(skb);
  69. ath_txq_lock(sc, txq);