1 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
2 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
3 @@ -961,18 +961,6 @@ static void ar5008_hw_rfbus_done(struct
4 REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
7 -static void ar5008_hw_enable_rfkill(struct ath_hw *ah)
9 - REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
10 - AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
12 - REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
13 - AR_GPIO_INPUT_MUX2_RFSILENT);
15 - ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
16 - REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
19 static void ar5008_restore_chainmask(struct ath_hw *ah)
21 int rx_chainmask = ah->rxchainmask;
22 @@ -1629,7 +1617,6 @@ void ar5008_hw_attach_phy_ops(struct ath
23 priv_ops->set_delta_slope = ar5008_hw_set_delta_slope;
24 priv_ops->rfbus_req = ar5008_hw_rfbus_req;
25 priv_ops->rfbus_done = ar5008_hw_rfbus_done;
26 - priv_ops->enable_rfkill = ar5008_hw_enable_rfkill;
27 priv_ops->restore_chainmask = ar5008_restore_chainmask;
28 priv_ops->set_diversity = ar5008_set_diversity;
29 priv_ops->do_getnf = ar5008_hw_do_getnf;
30 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
31 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
32 @@ -745,28 +745,6 @@ static void ar9003_hw_rfbus_done(struct
33 REG_WRITE(ah, AR_PHY_RFBUS_REQ, 0);
37 - * Set the interrupt and GPIO values so the ISR can disable RF
38 - * on a switch signal. Assumes GPIO port and interrupt polarity
39 - * are set prior to call.
41 -static void ar9003_hw_enable_rfkill(struct ath_hw *ah)
43 - /* Connect rfsilent_bb_l to baseband */
44 - REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL,
45 - AR_GPIO_INPUT_EN_VAL_RFSILENT_BB);
46 - /* Set input mux for rfsilent_bb_l to GPIO #0 */
47 - REG_CLR_BIT(ah, AR_GPIO_INPUT_MUX2,
48 - AR_GPIO_INPUT_MUX2_RFSILENT);
51 - * Configure the desired GPIO port for input and
52 - * enable baseband rf silence.
54 - ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
55 - REG_SET_BIT(ah, AR_PHY_TEST, RFSILENT_BB);
58 static void ar9003_hw_set_diversity(struct ath_hw *ah, bool value)
60 u32 v = REG_READ(ah, AR_PHY_CCK_DETECT);
61 @@ -1203,7 +1181,6 @@ void ar9003_hw_attach_phy_ops(struct ath
62 priv_ops->set_delta_slope = ar9003_hw_set_delta_slope;
63 priv_ops->rfbus_req = ar9003_hw_rfbus_req;
64 priv_ops->rfbus_done = ar9003_hw_rfbus_done;
65 - priv_ops->enable_rfkill = ar9003_hw_enable_rfkill;
66 priv_ops->set_diversity = ar9003_hw_set_diversity;
67 priv_ops->ani_control = ar9003_hw_ani_control;
68 priv_ops->do_getnf = ar9003_hw_do_getnf;
69 --- a/drivers/net/wireless/ath/ath9k/ath9k.h
70 +++ b/drivers/net/wireless/ath/ath9k/ath9k.h
71 @@ -189,6 +189,7 @@ struct ath_txq {
72 struct list_head axq_q;
75 + u32 axq_ampdu_depth;
77 bool axq_tx_inprogress;
78 struct list_head axq_acq;
79 --- a/drivers/net/wireless/ath/ath9k/hw-ops.h
80 +++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
81 @@ -223,11 +223,6 @@ static inline void ath9k_hw_rfbus_done(s
82 return ath9k_hw_private_ops(ah)->rfbus_done(ah);
85 -static inline void ath9k_enable_rfkill(struct ath_hw *ah)
87 - return ath9k_hw_private_ops(ah)->enable_rfkill(ah);
90 static inline void ath9k_hw_restore_chainmask(struct ath_hw *ah)
92 if (!ath9k_hw_private_ops(ah)->restore_chainmask)
93 --- a/drivers/net/wireless/ath/ath9k/hw.c
94 +++ b/drivers/net/wireless/ath/ath9k/hw.c
95 @@ -1399,7 +1399,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
96 ath9k_hw_init_qos(ah);
98 if (ah->caps.hw_caps & ATH9K_HW_CAP_RFSILENT)
99 - ath9k_enable_rfkill(ah);
100 + ath9k_hw_cfg_gpio_input(ah, ah->rfkill_gpio);
102 ath9k_hw_init_global_settings(ah);
104 --- a/drivers/net/wireless/ath/ath9k/hw.h
105 +++ b/drivers/net/wireless/ath/ath9k/hw.h
106 @@ -576,7 +576,6 @@ struct ath_hw_private_ops {
107 void (*set_delta_slope)(struct ath_hw *ah, struct ath9k_channel *chan);
108 bool (*rfbus_req)(struct ath_hw *ah);
109 void (*rfbus_done)(struct ath_hw *ah);
110 - void (*enable_rfkill)(struct ath_hw *ah);
111 void (*restore_chainmask)(struct ath_hw *ah);
112 void (*set_diversity)(struct ath_hw *ah, bool value);
113 u32 (*compute_pll_control)(struct ath_hw *ah,
114 --- a/drivers/net/wireless/ath/ath9k/xmit.c
115 +++ b/drivers/net/wireless/ath/ath9k/xmit.c
116 @@ -838,7 +838,7 @@ static void ath_tx_sched_aggr(struct ath
117 ath_tx_txqaddbuf(sc, txq, &bf_q);
118 TX_STAT_INC(txq->axq_qnum, a_aggr);
120 - } while (txq->axq_depth < ATH_AGGR_MIN_QDEPTH &&
121 + } while (txq->axq_ampdu_depth < ATH_AGGR_MIN_QDEPTH &&
122 status != ATH_AGGR_BAW_CLOSED);
125 @@ -999,6 +999,7 @@ struct ath_txq *ath_txq_setup(struct ath
126 INIT_LIST_HEAD(&txq->axq_acq);
127 spin_lock_init(&txq->axq_lock);
129 + txq->axq_ampdu_depth = 0;
130 txq->axq_tx_inprogress = false;
131 sc->tx.txqsetup |= 1<<qnum;
133 @@ -1068,6 +1069,12 @@ int ath_cabq_update(struct ath_softc *sc
137 +static bool bf_is_ampdu_not_probing(struct ath_buf *bf)
139 + struct ieee80211_tx_info *info = IEEE80211_SKB_CB(bf->bf_mpdu);
140 + return bf_isampdu(bf) && !(info->flags & IEEE80211_TX_CTL_RATE_CTRL_PROBE);
144 * Drain a given TX queue (could be Beacon or Data)
146 @@ -1126,7 +1133,8 @@ void ath_draintxq(struct ath_softc *sc,
151 + if (bf_is_ampdu_not_probing(bf))
152 + txq->axq_ampdu_depth--;
153 spin_unlock_bh(&txq->axq_lock);
156 @@ -1316,6 +1324,8 @@ static void ath_tx_txqaddbuf(struct ath_
157 ath9k_hw_txstart(ah, txq->axq_qnum);
160 + if (bf_is_ampdu_not_probing(bf))
161 + txq->axq_ampdu_depth++;
164 static void ath_tx_send_ampdu(struct ath_softc *sc, struct ath_atx_tid *tid,
165 @@ -1336,7 +1346,7 @@ static void ath_tx_send_ampdu(struct ath
167 if (!list_empty(&tid->buf_q) || tid->paused ||
168 !BAW_WITHIN(tid->seq_start, tid->baw_size, fi->seqno) ||
169 - txctl->txq->axq_depth >= ATH_AGGR_MIN_QDEPTH) {
170 + txctl->txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) {
172 * Add this frame to software queue for scheduling later
174 @@ -2040,6 +2050,9 @@ static void ath_tx_processq(struct ath_s
175 txq->axq_tx_inprogress = false;
177 list_del(&bf_held->list);
179 + if (bf_is_ampdu_not_probing(bf))
180 + txq->axq_ampdu_depth--;
181 spin_unlock_bh(&txq->axq_lock);
184 @@ -2168,6 +2181,8 @@ void ath_tx_edma_tasklet(struct ath_soft
185 INCR(txq->txq_tailidx, ATH_TXFIFO_DEPTH);
187 txq->axq_tx_inprogress = false;
188 + if (bf_is_ampdu_not_probing(bf))
189 + txq->axq_ampdu_depth--;
190 spin_unlock_bh(&txq->axq_lock);
192 txok = !(txs.ts_status & ATH9K_TXERR_MASK);