1 --- a/drivers/net/wireless/ath/ath9k/xmit.c
2 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
3 @@ -57,8 +57,9 @@ static void ath_tx_complete_buf(struct a
4 static void ath_tx_txqaddbuf(struct ath_softc *sc, struct ath_txq *txq,
5 struct list_head *head);
6 static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, int len);
7 -static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
8 - int nframes, int nbad, int txok, bool update_rc);
9 +static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
10 + struct ath_tx_status *ts, int nframes, int nbad,
11 + int txok, bool update_rc);
12 static void ath_tx_update_baw(struct ath_softc *sc, struct ath_atx_tid *tid,
15 @@ -297,7 +298,6 @@ static struct ath_buf* ath_clone_txbuf(s
19 - tbf->aphy = bf->aphy;
20 tbf->bf_mpdu = bf->bf_mpdu;
21 tbf->bf_buf_addr = bf->bf_buf_addr;
22 memcpy(tbf->bf_desc, bf->bf_desc, sc->sc_ah->caps.tx_desc_len);
23 @@ -345,7 +345,7 @@ static void ath_tx_complete_aggr(struct
24 struct ath_node *an = NULL;
26 struct ieee80211_sta *sta;
27 - struct ieee80211_hw *hw;
28 + struct ieee80211_hw *hw = sc->hw;
29 struct ieee80211_hdr *hdr;
30 struct ieee80211_tx_info *tx_info;
31 struct ath_atx_tid *tid = NULL;
32 @@ -364,7 +364,6 @@ static void ath_tx_complete_aggr(struct
33 hdr = (struct ieee80211_hdr *)skb->data;
35 tx_info = IEEE80211_SKB_CB(skb);
38 memcpy(rates, tx_info->control.rates, sizeof(rates));
40 @@ -383,7 +382,7 @@ static void ath_tx_complete_aggr(struct
41 !bf->bf_stale || bf_next != NULL)
42 list_move_tail(&bf->list, &bf_head);
44 - ath_tx_rc_status(bf, ts, 1, 1, 0, false);
45 + ath_tx_rc_status(sc, bf, ts, 1, 1, 0, false);
46 ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
49 @@ -489,10 +488,10 @@ static void ath_tx_complete_aggr(struct
51 if (rc_update && (acked_cnt == 1 || txfail_cnt == 1)) {
52 memcpy(tx_info->control.rates, rates, sizeof(rates));
53 - ath_tx_rc_status(bf, ts, nframes, nbad, txok, true);
54 + ath_tx_rc_status(sc, bf, ts, nframes, nbad, txok, true);
57 - ath_tx_rc_status(bf, ts, nframes, nbad, txok, false);
58 + ath_tx_rc_status(sc, bf, ts, nframes, nbad, txok, false);
61 ath_tx_complete_buf(sc, bf, txq, &bf_head, ts,
62 @@ -516,7 +515,7 @@ static void ath_tx_complete_aggr(struct
64 bf->bf_state.bf_type |=
66 - ath_tx_rc_status(bf, ts, nframes,
67 + ath_tx_rc_status(sc, bf, ts, nframes,
69 ath_tx_complete_buf(sc, bf, txq,
71 @@ -1677,7 +1676,6 @@ static struct ath_buf *ath_tx_setup_buff
76 bf->bf_flags = setup_tx_flags(skb);
79 @@ -1831,8 +1829,7 @@ int ath_tx_start(struct ieee80211_hw *hw
82 static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
83 - struct ath_wiphy *aphy, int tx_flags, int ftype,
84 - struct ath_txq *txq)
85 + int tx_flags, int ftype, struct ath_txq *txq)
87 struct ieee80211_hw *hw = sc->hw;
88 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
89 @@ -1842,9 +1839,6 @@ static void ath_tx_complete(struct ath_s
91 ath_dbg(common, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb);
96 if (tx_flags & ATH_TX_BAR)
97 tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;
99 @@ -1918,7 +1912,7 @@ static void ath_tx_complete_buf(struct a
100 complete(&sc->paprd_complete);
102 ath_debug_stat_tx(sc, bf, ts);
103 - ath_tx_complete(sc, skb, bf->aphy, tx_flags,
104 + ath_tx_complete(sc, skb, tx_flags,
105 bf->bf_state.bfs_ftype, txq);
107 /* At this point, skb (bf->bf_mpdu) is consumed...make sure we don't
108 @@ -1934,14 +1928,14 @@ static void ath_tx_complete_buf(struct a
109 spin_unlock_irqrestore(&sc->tx.txbuflock, flags);
112 -static void ath_tx_rc_status(struct ath_buf *bf, struct ath_tx_status *ts,
113 - int nframes, int nbad, int txok, bool update_rc)
114 +static void ath_tx_rc_status(struct ath_softc *sc, struct ath_buf *bf,
115 + struct ath_tx_status *ts, int nframes, int nbad,
116 + int txok, bool update_rc)
118 struct sk_buff *skb = bf->bf_mpdu;
119 struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
120 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
121 - struct ieee80211_hw *hw = bf->aphy->hw;
122 - struct ath_softc *sc = bf->aphy->sc;
123 + struct ieee80211_hw *hw = sc->hw;
124 struct ath_hw *ah = sc->sc_ah;
127 @@ -2077,7 +2071,7 @@ static void ath_tx_processq(struct ath_s
129 if (ts.ts_status & ATH9K_TXERR_XRETRY)
130 bf->bf_state.bf_type |= BUF_XRETRY;
131 - ath_tx_rc_status(bf, &ts, 1, txok ? 0 : 1, txok, true);
132 + ath_tx_rc_status(sc, bf, &ts, 1, txok ? 0 : 1, txok, true);
136 @@ -2196,7 +2190,7 @@ void ath_tx_edma_tasklet(struct ath_soft
137 if (!bf_isampdu(bf)) {
138 if (txs.ts_status & ATH9K_TXERR_XRETRY)
139 bf->bf_state.bf_type |= BUF_XRETRY;
140 - ath_tx_rc_status(bf, &txs, 1, txok ? 0 : 1, txok, true);
141 + ath_tx_rc_status(sc, bf, &txs, 1, txok ? 0 : 1, txok, true);
145 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
146 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
153 /* Macro to expand scalars to 64-bit objects */
155 @@ -233,7 +234,6 @@ struct ath_buf {
158 struct ath_buf_state bf_state;
159 - struct ath_wiphy *aphy;
163 @@ -550,7 +550,6 @@ struct ath_ant_comb {
164 #define PS_WAIT_FOR_TX_ACK BIT(3)
165 #define PS_BEACON_SYNC BIT(4)
168 struct ath_rate_table;
170 struct ath9k_vif_iter_data {