1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -66,8 +66,7 @@ static void ath_tx_update_baw(struct ath
4 static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
6 struct ath_atx_tid *tid,
9 + struct sk_buff *skb);
13 @@ -176,7 +175,15 @@ static void ath_tx_flush_tid(struct ath_
14 fi = get_frame_info(skb);
17 - if (bf && fi->retries) {
19 + bf = ath_tx_setup_buffer(sc, txq, tid, skb);
21 + ieee80211_free_txskb(sc->hw, skb);
27 list_add_tail(&bf->list, &bf_head);
28 ath_tx_update_baw(sc, tid, bf->bf_state.seqno);
29 ath_tx_complete_buf(sc, bf, txq, &bf_head, &ts, 0);
30 @@ -789,10 +796,13 @@ static enum ATH_AGGR_STATUS ath_tx_form_
31 fi = get_frame_info(skb);
34 - bf = ath_tx_setup_buffer(sc, txq, tid, skb, true);
35 + bf = ath_tx_setup_buffer(sc, txq, tid, skb);
39 + __skb_unlink(skb, &tid->buf_q);
40 + ieee80211_free_txskb(sc->hw, skb);
44 bf->bf_state.bf_type = BUF_AMPDU | BUF_AGGR;
45 seqno = bf->bf_state.seqno;
46 @@ -1735,9 +1745,11 @@ static void ath_tx_send_ampdu(struct ath
50 - bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false);
52 + bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb);
54 + ieee80211_free_txskb(sc->hw, skb);
58 bf->bf_state.bf_type = BUF_AMPDU;
59 INIT_LIST_HEAD(&bf_head);
60 @@ -1761,11 +1773,6 @@ static void ath_tx_send_normal(struct at
65 - bf = ath_tx_setup_buffer(sc, txq, tid, skb, false);
70 INIT_LIST_HEAD(&bf_head);
71 list_add_tail(&bf->list, &bf_head);
72 @@ -1839,8 +1846,7 @@ u8 ath_txchainmask_reduction(struct ath_
73 static struct ath_buf *ath_tx_setup_buffer(struct ath_softc *sc,
75 struct ath_atx_tid *tid,
76 - struct sk_buff *skb,
78 + struct sk_buff *skb)
80 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
81 struct ath_frame_info *fi = get_frame_info(skb);
82 @@ -1852,7 +1858,7 @@ static struct ath_buf *ath_tx_setup_buff
83 bf = ath_tx_get_buffer(sc);
85 ath_dbg(common, XMIT, "TX buffers are full\n");
91 @@ -1881,18 +1887,12 @@ static struct ath_buf *ath_tx_setup_buff
92 ath_err(ath9k_hw_common(sc->sc_ah),
93 "dma_mapping_error() on TX\n");
94 ath_tx_return_buffer(sc, bf);
105 - __skb_unlink(skb, &tid->buf_q);
106 - dev_kfree_skb_any(skb);
110 /* FIXME: tx power */
111 @@ -1921,9 +1921,14 @@ static void ath_tx_start_dma(struct ath_
113 ath_tx_send_ampdu(sc, tid, skb, txctl);
115 - bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb, false);
117 + bf = ath_tx_setup_buffer(sc, txctl->txq, tid, skb);
120 + dev_kfree_skb_any(skb);
122 + ieee80211_free_txskb(sc->hw, skb);
126 bf->bf_state.bfs_paprd = txctl->paprd;
128 --- a/drivers/net/wireless/ath/ath9k/main.c
129 +++ b/drivers/net/wireless/ath/ath9k/main.c
130 @@ -769,7 +769,7 @@ static void ath9k_tx(struct ieee80211_hw
134 - dev_kfree_skb_any(skb);
135 + ieee80211_free_txskb(hw, skb);
138 static void ath9k_stop(struct ieee80211_hw *hw)
139 --- a/drivers/net/wireless/ath/ath9k/beacon.c
140 +++ b/drivers/net/wireless/ath/ath9k/beacon.c
141 @@ -120,7 +120,7 @@ static void ath9k_tx_cabq(struct ieee802
143 if (ath_tx_start(hw, skb, &txctl) != 0) {
144 ath_dbg(common, XMIT, "CABQ TX failed\n");
145 - dev_kfree_skb_any(skb);
146 + ieee80211_free_txskb(hw, skb);