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;
11 spin_lock_bh(&txctl->txq->axq_lock);
13 - if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && txctl->an) {
14 + if (ieee80211_is_data_qos(hdr->frame_control) && txctl->an) {
15 tidno = ieee80211_get_qos_ctl(hdr)[0] &
16 IEEE80211_QOS_CTL_TID_MASK;
17 tid = ATH_AN_2_TID(txctl->an, tidno);
19 WARN_ON(tid->ac->txq != txctl->txq);
22 + if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && tid) {
24 * Try aggregation if it's a unicast data frame
25 * and the destination is HT capable.
26 @@ -1712,7 +1715,7 @@ static void ath_tx_start_dma(struct ath_
27 ar9003_hw_set_paprd_txdesc(sc->sc_ah, bf->bf_desc,
28 bf->bf_state.bfs_paprd);
30 - ath_tx_send_normal(sc, txctl->txq, NULL, &bf_head);
31 + ath_tx_send_normal(sc, txctl->txq, tid, &bf_head);
34 spin_unlock_bh(&txctl->txq->axq_lock);
35 --- a/drivers/net/wireless/ath/ath9k/hw.c
36 +++ b/drivers/net/wireless/ath/ath9k/hw.c
37 @@ -284,11 +284,9 @@ static void ath9k_hw_read_revisions(stru
39 static void ath9k_hw_disablepcie(struct ath_hw *ah)
41 - if (AR_SREV_9100(ah))
42 + if (!AR_SREV_5416(ah))
45 - ENABLE_REGWRITE_BUFFER(ah);
47 REG_WRITE(ah, AR_PCIE_SERDES, 0x9248fc00);
48 REG_WRITE(ah, AR_PCIE_SERDES, 0x24924924);
49 REG_WRITE(ah, AR_PCIE_SERDES, 0x28000029);
50 @@ -300,8 +298,6 @@ static void ath9k_hw_disablepcie(struct
51 REG_WRITE(ah, AR_PCIE_SERDES, 0x000e1007);
53 REG_WRITE(ah, AR_PCIE_SERDES2, 0x00000000);
55 - REGWRITE_BUFFER_FLUSH(ah);
58 /* This should work for all families including legacy */
59 --- a/drivers/net/wireless/ath/ath9k/main.c
60 +++ b/drivers/net/wireless/ath/ath9k/main.c
61 @@ -1940,7 +1940,9 @@ static u64 ath9k_get_tsf(struct ieee8021
62 struct ath_softc *sc = aphy->sc;
64 mutex_lock(&sc->mutex);
65 + ath9k_ps_wakeup(sc);
66 tsf = ath9k_hw_gettsf64(sc->sc_ah);
67 + ath9k_ps_restore(sc);
68 mutex_unlock(&sc->mutex);
71 @@ -1952,7 +1954,9 @@ static void ath9k_set_tsf(struct ieee802
72 struct ath_softc *sc = aphy->sc;
74 mutex_lock(&sc->mutex);
75 + ath9k_ps_wakeup(sc);
76 ath9k_hw_settsf64(sc->sc_ah, tsf);
77 + ath9k_ps_restore(sc);
78 mutex_unlock(&sc->mutex);