0029-ath9k-add-experimental-patch.patch 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. From: Matthias Schiffer <mschiffer@universe-factory.net>
  2. Date: Tue, 15 Jul 2014 20:08:17 +0200
  3. Subject: ath9k: add experimental patch
  4. diff --git a/package/mac80211/patches/950-ath9k-txq.patch b/package/mac80211/patches/950-ath9k-txq.patch
  5. new file mode 100644
  6. index 0000000..0aa3149
  7. --- /dev/null
  8. +++ b/package/mac80211/patches/950-ath9k-txq.patch
  9. @@ -0,0 +1,69 @@
  10. +--- a/drivers/net/wireless/ath/ath9k/ath9k.h
  11. ++++ b/drivers/net/wireless/ath/ath9k/ath9k.h
  12. +@@ -185,7 +185,8 @@ struct ath_atx_ac {
  13. +
  14. + struct ath_frame_info {
  15. + struct ath_buf *bf;
  16. +- int framelen;
  17. ++ u16 framelen;
  18. ++ s8 txq;
  19. + enum ath9k_key_type keytype;
  20. + u8 keyix;
  21. + u8 rtscts_rate;
  22. +--- a/drivers/net/wireless/ath/ath9k/xmit.c
  23. ++++ b/drivers/net/wireless/ath/ath9k/xmit.c
  24. +@@ -147,15 +147,13 @@ static void ath_set_rates(struct ieee802
  25. + static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
  26. + struct sk_buff *skb)
  27. + {
  28. +- int q;
  29. +-
  30. +- q = skb_get_queue_mapping(skb);
  31. +- if (txq == sc->tx.uapsdq)
  32. +- txq = sc->tx.txq_map[q];
  33. ++ struct ath_frame_info *fi = get_frame_info(skb);
  34. ++ int q = fi->txq;
  35. +
  36. +- if (txq != sc->tx.txq_map[q])
  37. ++ if (q < 0)
  38. + return;
  39. +
  40. ++ txq = sc->tx.txq_map[q];
  41. + if (WARN_ON(--txq->pending_frames < 0))
  42. + txq->pending_frames = 0;
  43. +
  44. +@@ -1999,6 +1997,7 @@ static void setup_frame_info(struct ieee
  45. + an = (struct ath_node *) sta->drv_priv;
  46. +
  47. + memset(fi, 0, sizeof(*fi));
  48. ++ fi->txq = -1;
  49. + if (hw_key)
  50. + fi->keyix = hw_key->hw_key_idx;
  51. + else if (an && ieee80211_is_data(hdr->frame_control) && an->ps_key > 0)
  52. +@@ -2150,6 +2149,7 @@ int ath_tx_start(struct ieee80211_hw *hw
  53. + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
  54. + struct ieee80211_sta *sta = txctl->sta;
  55. + struct ieee80211_vif *vif = info->control.vif;
  56. ++ struct ath_frame_info *fi = get_frame_info(skb);
  57. + struct ath_softc *sc = hw->priv;
  58. + struct ath_txq *txq = txctl->txq;
  59. + struct ath_atx_tid *tid = NULL;
  60. +@@ -2170,11 +2170,13 @@ int ath_tx_start(struct ieee80211_hw *hw
  61. + q = skb_get_queue_mapping(skb);
  62. +
  63. + ath_txq_lock(sc, txq);
  64. +- if (txq == sc->tx.txq_map[q] &&
  65. +- ++txq->pending_frames > sc->tx.txq_max_pending[q] &&
  66. +- !txq->stopped) {
  67. +- ieee80211_stop_queue(sc->hw, q);
  68. +- txq->stopped = true;
  69. ++ if (txq == sc->tx.txq_map[q]) {
  70. ++ fi->txq = q;
  71. ++ if (++txq->pending_frames > sc->tx.txq_max_pending[q] &&
  72. ++ !txq->stopped) {
  73. ++ ieee80211_stop_queue(sc->hw, q);
  74. ++ txq->stopped = true;
  75. ++ }
  76. + }
  77. +
  78. + if (txctl->an && ieee80211_is_data_present(hdr->frame_control))