diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 5f4ae6c9a93c..f7bd2532269c 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -185,13 +185,6 @@ bool ath9k_hw_stop_dma_queue(struct ath_hw *ah, u32 q) | |||
185 | } | 185 | } |
186 | EXPORT_SYMBOL(ath9k_hw_stop_dma_queue); | 186 | EXPORT_SYMBOL(ath9k_hw_stop_dma_queue); |
187 | 187 | ||
188 | void ath9k_hw_gettxintrtxqs(struct ath_hw *ah, u32 *txqs) | ||
189 | { | ||
190 | *txqs &= ah->intr_txqs; | ||
191 | ah->intr_txqs &= ~(*txqs); | ||
192 | } | ||
193 | EXPORT_SYMBOL(ath9k_hw_gettxintrtxqs); | ||
194 | |||
195 | bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, | 188 | bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, |
196 | const struct ath9k_tx_queue_info *qinfo) | 189 | const struct ath9k_tx_queue_info *qinfo) |
197 | { | 190 | { |
@@ -340,6 +333,15 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
340 | } | 333 | } |
341 | EXPORT_SYMBOL(ath9k_hw_setuptxqueue); | 334 | EXPORT_SYMBOL(ath9k_hw_setuptxqueue); |
342 | 335 | ||
336 | static void ath9k_hw_clear_queue_interrupts(struct ath_hw *ah, u32 q) | ||
337 | { | ||
338 | ah->txok_interrupt_mask &= ~(1 << q); | ||
339 | ah->txerr_interrupt_mask &= ~(1 << q); | ||
340 | ah->txdesc_interrupt_mask &= ~(1 << q); | ||
341 | ah->txeol_interrupt_mask &= ~(1 << q); | ||
342 | ah->txurn_interrupt_mask &= ~(1 << q); | ||
343 | } | ||
344 | |||
343 | bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | 345 | bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) |
344 | { | 346 | { |
345 | struct ath_common *common = ath9k_hw_common(ah); | 347 | struct ath_common *common = ath9k_hw_common(ah); |
@@ -354,11 +356,7 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | |||
354 | ath_dbg(common, QUEUE, "Release TX queue: %u\n", q); | 356 | ath_dbg(common, QUEUE, "Release TX queue: %u\n", q); |
355 | 357 | ||
356 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; | 358 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; |
357 | ah->txok_interrupt_mask &= ~(1 << q); | 359 | ath9k_hw_clear_queue_interrupts(ah, q); |
358 | ah->txerr_interrupt_mask &= ~(1 << q); | ||
359 | ah->txdesc_interrupt_mask &= ~(1 << q); | ||
360 | ah->txeol_interrupt_mask &= ~(1 << q); | ||
361 | ah->txurn_interrupt_mask &= ~(1 << q); | ||
362 | ath9k_hw_set_txq_interrupts(ah, qi); | 360 | ath9k_hw_set_txq_interrupts(ah, qi); |
363 | 361 | ||
364 | return true; | 362 | return true; |
@@ -510,26 +508,17 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | |||
510 | if (AR_SREV_9300_20_OR_LATER(ah)) | 508 | if (AR_SREV_9300_20_OR_LATER(ah)) |
511 | REG_WRITE(ah, AR_Q_DESC_CRCCHK, AR_Q_DESC_CRCCHK_EN); | 509 | REG_WRITE(ah, AR_Q_DESC_CRCCHK, AR_Q_DESC_CRCCHK_EN); |
512 | 510 | ||
513 | if (qi->tqi_qflags & TXQ_FLAG_TXOKINT_ENABLE) | 511 | ath9k_hw_clear_queue_interrupts(ah, q); |
512 | if (qi->tqi_qflags & TXQ_FLAG_TXINT_ENABLE) { | ||
514 | ah->txok_interrupt_mask |= 1 << q; | 513 | ah->txok_interrupt_mask |= 1 << q; |
515 | else | ||
516 | ah->txok_interrupt_mask &= ~(1 << q); | ||
517 | if (qi->tqi_qflags & TXQ_FLAG_TXERRINT_ENABLE) | ||
518 | ah->txerr_interrupt_mask |= 1 << q; | 514 | ah->txerr_interrupt_mask |= 1 << q; |
519 | else | 515 | } |
520 | ah->txerr_interrupt_mask &= ~(1 << q); | ||
521 | if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE) | 516 | if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE) |
522 | ah->txdesc_interrupt_mask |= 1 << q; | 517 | ah->txdesc_interrupt_mask |= 1 << q; |
523 | else | ||
524 | ah->txdesc_interrupt_mask &= ~(1 << q); | ||
525 | if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE) | 518 | if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE) |
526 | ah->txeol_interrupt_mask |= 1 << q; | 519 | ah->txeol_interrupt_mask |= 1 << q; |
527 | else | ||
528 | ah->txeol_interrupt_mask &= ~(1 << q); | ||
529 | if (qi->tqi_qflags & TXQ_FLAG_TXURNINT_ENABLE) | 520 | if (qi->tqi_qflags & TXQ_FLAG_TXURNINT_ENABLE) |
530 | ah->txurn_interrupt_mask |= 1 << q; | 521 | ah->txurn_interrupt_mask |= 1 << q; |
531 | else | ||
532 | ah->txurn_interrupt_mask &= ~(1 << q); | ||
533 | ath9k_hw_set_txq_interrupts(ah, qi); | 522 | ath9k_hw_set_txq_interrupts(ah, qi); |
534 | 523 | ||
535 | return true; | 524 | return true; |
@@ -747,8 +736,7 @@ int ath9k_hw_beaconq_setup(struct ath_hw *ah) | |||
747 | qi.tqi_cwmax = 0; | 736 | qi.tqi_cwmax = 0; |
748 | 737 | ||
749 | if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) | 738 | if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) |
750 | qi.tqi_qflags = TXQ_FLAG_TXOKINT_ENABLE | | 739 | qi.tqi_qflags = TXQ_FLAG_TXINT_ENABLE; |
751 | TXQ_FLAG_TXERRINT_ENABLE; | ||
752 | 740 | ||
753 | return ath9k_hw_setuptxqueue(ah, ATH9K_TX_QUEUE_BEACON, &qi); | 741 | return ath9k_hw_setuptxqueue(ah, ATH9K_TX_QUEUE_BEACON, &qi); |
754 | } | 742 | } |