diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/xmit.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/xmit.c | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c index 9f785015a7dc..834e6bc45e8b 100644 --- a/drivers/net/wireless/ath/ath9k/xmit.c +++ b/drivers/net/wireless/ath/ath9k/xmit.c | |||
@@ -955,7 +955,9 @@ static void ath_buf_set_rate(struct ath_softc *sc, struct ath_buf *bf, | |||
955 | */ | 955 | */ |
956 | rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); | 956 | rate = ieee80211_get_rts_cts_rate(sc->hw, tx_info); |
957 | info->rtscts_rate = rate->hw_value; | 957 | info->rtscts_rate = rate->hw_value; |
958 | if (sc->sc_flags & SC_OP_PREAMBLE_SHORT) | 958 | |
959 | if (tx_info->control.vif && | ||
960 | tx_info->control.vif->bss_conf.use_short_preamble) | ||
959 | info->rtscts_rate |= rate->hw_value_short; | 961 | info->rtscts_rate |= rate->hw_value_short; |
960 | 962 | ||
961 | for (i = 0; i < 4; i++) { | 963 | for (i = 0; i < 4; i++) { |
@@ -1290,14 +1292,11 @@ void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid | |||
1290 | 1292 | ||
1291 | an = (struct ath_node *)sta->drv_priv; | 1293 | an = (struct ath_node *)sta->drv_priv; |
1292 | 1294 | ||
1293 | if (sc->sc_flags & SC_OP_TXAGGR) { | 1295 | txtid = ATH_AN_2_TID(an, tid); |
1294 | txtid = ATH_AN_2_TID(an, tid); | 1296 | txtid->baw_size = IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor; |
1295 | txtid->baw_size = | 1297 | txtid->state |= AGGR_ADDBA_COMPLETE; |
1296 | IEEE80211_MIN_AMPDU_BUF << sta->ht_cap.ampdu_factor; | 1298 | txtid->state &= ~AGGR_ADDBA_PROGRESS; |
1297 | txtid->state |= AGGR_ADDBA_COMPLETE; | 1299 | ath_tx_resume_tid(sc, txtid); |
1298 | txtid->state &= ~AGGR_ADDBA_PROGRESS; | ||
1299 | ath_tx_resume_tid(sc, txtid); | ||
1300 | } | ||
1301 | } | 1300 | } |
1302 | 1301 | ||
1303 | /********************/ | 1302 | /********************/ |
@@ -1356,8 +1355,7 @@ struct ath_txq *ath_txq_setup(struct ath_softc *sc, int qtype, int subtype) | |||
1356 | * based intr on the EOSP frames. | 1355 | * based intr on the EOSP frames. |
1357 | */ | 1356 | */ |
1358 | if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { | 1357 | if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) { |
1359 | qi.tqi_qflags = TXQ_FLAG_TXOKINT_ENABLE | | 1358 | qi.tqi_qflags = TXQ_FLAG_TXINT_ENABLE; |
1360 | TXQ_FLAG_TXERRINT_ENABLE; | ||
1361 | } else { | 1359 | } else { |
1362 | if (qtype == ATH9K_TX_QUEUE_UAPSD) | 1360 | if (qtype == ATH9K_TX_QUEUE_UAPSD) |
1363 | qi.tqi_qflags = TXQ_FLAG_TXDESCINT_ENABLE; | 1361 | qi.tqi_qflags = TXQ_FLAG_TXDESCINT_ENABLE; |
@@ -1523,7 +1521,7 @@ void ath_draintxq(struct ath_softc *sc, struct ath_txq *txq, bool retry_tx) | |||
1523 | ath_drain_txq_list(sc, txq, &txq->axq_q, retry_tx); | 1521 | ath_drain_txq_list(sc, txq, &txq->axq_q, retry_tx); |
1524 | 1522 | ||
1525 | /* flush any pending frames if aggregation is enabled */ | 1523 | /* flush any pending frames if aggregation is enabled */ |
1526 | if ((sc->sc_flags & SC_OP_TXAGGR) && !retry_tx) | 1524 | if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && !retry_tx) |
1527 | ath_txq_drain_pending_buffers(sc, txq); | 1525 | ath_txq_drain_pending_buffers(sc, txq); |
1528 | 1526 | ||
1529 | ath_txq_unlock_complete(sc, txq); | 1527 | ath_txq_unlock_complete(sc, txq); |
@@ -1871,7 +1869,7 @@ static void ath_tx_start_dma(struct ath_softc *sc, struct sk_buff *skb, | |||
1871 | struct ath_buf *bf; | 1869 | struct ath_buf *bf; |
1872 | u8 tidno; | 1870 | u8 tidno; |
1873 | 1871 | ||
1874 | if ((sc->sc_flags & SC_OP_TXAGGR) && txctl->an && | 1872 | if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) && txctl->an && |
1875 | ieee80211_is_data_qos(hdr->frame_control)) { | 1873 | ieee80211_is_data_qos(hdr->frame_control)) { |
1876 | tidno = ieee80211_get_qos_ctl(hdr)[0] & | 1874 | tidno = ieee80211_get_qos_ctl(hdr)[0] & |
1877 | IEEE80211_QOS_CTL_TID_MASK; | 1875 | IEEE80211_QOS_CTL_TID_MASK; |
@@ -2141,7 +2139,7 @@ static void ath_tx_process_buffer(struct ath_softc *sc, struct ath_txq *txq, | |||
2141 | } else | 2139 | } else |
2142 | ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok, true); | 2140 | ath_tx_complete_aggr(sc, txq, bf, bf_head, ts, txok, true); |
2143 | 2141 | ||
2144 | if (sc->sc_flags & SC_OP_TXAGGR) | 2142 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) |
2145 | ath_txq_schedule(sc, txq); | 2143 | ath_txq_schedule(sc, txq); |
2146 | } | 2144 | } |
2147 | 2145 | ||
@@ -2166,7 +2164,7 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq) | |||
2166 | 2164 | ||
2167 | if (list_empty(&txq->axq_q)) { | 2165 | if (list_empty(&txq->axq_q)) { |
2168 | txq->axq_link = NULL; | 2166 | txq->axq_link = NULL; |
2169 | if (sc->sc_flags & SC_OP_TXAGGR) | 2167 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) |
2170 | ath_txq_schedule(sc, txq); | 2168 | ath_txq_schedule(sc, txq); |
2171 | break; | 2169 | break; |
2172 | } | 2170 | } |
@@ -2263,10 +2261,9 @@ static void ath_tx_complete_poll_work(struct work_struct *work) | |||
2263 | 2261 | ||
2264 | void ath_tx_tasklet(struct ath_softc *sc) | 2262 | void ath_tx_tasklet(struct ath_softc *sc) |
2265 | { | 2263 | { |
2264 | struct ath_hw *ah = sc->sc_ah; | ||
2265 | u32 qcumask = ((1 << ATH9K_NUM_TX_QUEUES) - 1) & ah->intr_txqs; | ||
2266 | int i; | 2266 | int i; |
2267 | u32 qcumask = ((1 << ATH9K_NUM_TX_QUEUES) - 1); | ||
2268 | |||
2269 | ath9k_hw_gettxintrtxqs(sc->sc_ah, &qcumask); | ||
2270 | 2267 | ||
2271 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { | 2268 | for (i = 0; i < ATH9K_NUM_TX_QUEUES; i++) { |
2272 | if (ATH_TXQ_SETUP(sc, i) && (qcumask & (1 << i))) | 2269 | if (ATH_TXQ_SETUP(sc, i) && (qcumask & (1 << i))) |