320-ath9k_pending_work.patch 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. --- a/drivers/net/wireless/ath/ath9k/xmit.c
  2. +++ b/drivers/net/wireless/ath/ath9k/xmit.c
  3. @@ -1685,17 +1685,20 @@ static void ath_tx_start_dma(struct ath_
  4. struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
  5. struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
  6. struct list_head bf_head;
  7. - struct ath_atx_tid *tid;
  8. + struct ath_atx_tid *tid = NULL;
  9. u8 tidno;
  10. spin_lock_bh(&txctl->txq->axq_lock);
  11. - if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && txctl->an) {
  12. + if (ieee80211_is_data_qos(hdr->frame_control) && txctl->an) {
  13. tidno = ieee80211_get_qos_ctl(hdr)[0] &
  14. IEEE80211_QOS_CTL_TID_MASK;
  15. tid = ATH_AN_2_TID(txctl->an, tidno);
  16. WARN_ON(tid->ac->txq != txctl->txq);
  17. + }
  18. +
  19. + if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
  20. /*
  21. * Try aggregation if it's a unicast data frame
  22. * and the destination is HT capable.
  23. @@ -1712,7 +1715,7 @@ static void ath_tx_start_dma(struct ath_
  24. ar9003_hw_set_paprd_txdesc(sc->sc_ah, bf->bf_desc,
  25. bf->bf_state.bfs_paprd);
  26. - ath_tx_send_normal(sc, txctl->txq, NULL, &bf_head);
  27. + ath_tx_send_normal(sc, txctl->txq, tid, &bf_head);
  28. }
  29. spin_unlock_bh(&txctl->txq->axq_lock);
  30. --- a/drivers/net/wireless/ath/ath9k/hw.c
  31. +++ b/drivers/net/wireless/ath/ath9k/hw.c
  32. @@ -284,11 +284,9 @@ static void ath9k_hw_read_revisions(stru
  33. static void ath9k_hw_disablepcie(struct ath_hw *ah)
  34. {
  35. - if (AR_SREV_9100(ah))
  36. + if (!AR_SREV_5416(ah))
  37. return;
  38. - ENABLE_REGWRITE_BUFFER(ah);
  39. -
  40. REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
  41. REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
  42. REG_WRITE(ah, AR_PCIE_SERDES, 0x28000029);
  43. @@ -300,8 +298,6 @@ static void ath9k_hw_disablepcie(struct
  44. REG_WRITE(ah, AR_PCIE_SERDES, 0x000e1007);
  45. REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
  46. -
  47. - REGWRITE_BUFFER_FLUSH(ah);
  48. }
  49. /* This should work for all families including legacy */
  50. --- a/drivers/net/wireless/ath/ath9k/main.c
  51. +++ b/drivers/net/wireless/ath/ath9k/main.c
  52. @@ -1940,7 +1940,9 @@ static u64 ath9k_get_tsf(struct ieee8021
  53. struct ath_softc *sc = aphy->sc;
  54. mutex_lock(&sc->mutex);
  55. + ath9k_ps_wakeup(sc);
  56. tsf = ath9k_hw_gettsf64(sc->sc_ah);
  57. + ath9k_ps_restore(sc);
  58. mutex_unlock(&sc->mutex);
  59. return tsf;
  60. @@ -1952,7 +1954,9 @@ static void ath9k_set_tsf(struct ieee802
  61. struct ath_softc *sc = aphy->sc;
  62. mutex_lock(&sc->mutex);
  63. + ath9k_ps_wakeup(sc);
  64. ath9k_hw_settsf64(sc->sc_ah, tsf);
  65. + ath9k_ps_restore(sc);
  66. mutex_unlock(&sc->mutex);
  67. }