diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 0e4fbb3bea33..fd3f19c2e550 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -21,7 +21,7 @@ | |||
21 | static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, | 21 | static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, |
22 | struct ath9k_tx_queue_info *qi) | 22 | struct ath9k_tx_queue_info *qi) |
23 | { | 23 | { |
24 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_INTERRUPT, | 24 | ath_dbg(ath9k_hw_common(ah), INTERRUPT, |
25 | "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", | 25 | "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", |
26 | ah->txok_interrupt_mask, ah->txerr_interrupt_mask, | 26 | ah->txok_interrupt_mask, ah->txerr_interrupt_mask, |
27 | ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, | 27 | ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, |
@@ -57,8 +57,7 @@ EXPORT_SYMBOL(ath9k_hw_puttxbuf); | |||
57 | 57 | ||
58 | void ath9k_hw_txstart(struct ath_hw *ah, u32 q) | 58 | void ath9k_hw_txstart(struct ath_hw *ah, u32 q) |
59 | { | 59 | { |
60 | ath_dbg(ath9k_hw_common(ah), ATH_DBG_QUEUE, | 60 | ath_dbg(ath9k_hw_common(ah), QUEUE, "Enable TXE on queue: %u\n", q); |
61 | "Enable TXE on queue: %u\n", q); | ||
62 | REG_WRITE(ah, AR_Q_TXE, 1 << q); | 61 | REG_WRITE(ah, AR_Q_TXE, 1 << q); |
63 | } | 62 | } |
64 | EXPORT_SYMBOL(ath9k_hw_txstart); | 63 | EXPORT_SYMBOL(ath9k_hw_txstart); |
@@ -202,12 +201,12 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, | |||
202 | 201 | ||
203 | qi = &ah->txq[q]; | 202 | qi = &ah->txq[q]; |
204 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 203 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
205 | ath_dbg(common, ATH_DBG_QUEUE, | 204 | ath_dbg(common, QUEUE, |
206 | "Set TXQ properties, inactive queue: %u\n", q); | 205 | "Set TXQ properties, inactive queue: %u\n", q); |
207 | return false; | 206 | return false; |
208 | } | 207 | } |
209 | 208 | ||
210 | ath_dbg(common, ATH_DBG_QUEUE, "Set queue properties for: %u\n", q); | 209 | ath_dbg(common, QUEUE, "Set queue properties for: %u\n", q); |
211 | 210 | ||
212 | qi->tqi_ver = qinfo->tqi_ver; | 211 | qi->tqi_ver = qinfo->tqi_ver; |
213 | qi->tqi_subtype = qinfo->tqi_subtype; | 212 | qi->tqi_subtype = qinfo->tqi_subtype; |
@@ -266,7 +265,7 @@ bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q, | |||
266 | 265 | ||
267 | qi = &ah->txq[q]; | 266 | qi = &ah->txq[q]; |
268 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 267 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
269 | ath_dbg(common, ATH_DBG_QUEUE, | 268 | ath_dbg(common, QUEUE, |
270 | "Get TXQ properties, inactive queue: %u\n", q); | 269 | "Get TXQ properties, inactive queue: %u\n", q); |
271 | return false; | 270 | return false; |
272 | } | 271 | } |
@@ -325,7 +324,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
325 | return -1; | 324 | return -1; |
326 | } | 325 | } |
327 | 326 | ||
328 | ath_dbg(common, ATH_DBG_QUEUE, "Setup TX queue: %u\n", q); | 327 | ath_dbg(common, QUEUE, "Setup TX queue: %u\n", q); |
329 | 328 | ||
330 | qi = &ah->txq[q]; | 329 | qi = &ah->txq[q]; |
331 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { | 330 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { |
@@ -348,12 +347,11 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | |||
348 | 347 | ||
349 | qi = &ah->txq[q]; | 348 | qi = &ah->txq[q]; |
350 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 349 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
351 | ath_dbg(common, ATH_DBG_QUEUE, | 350 | ath_dbg(common, QUEUE, "Release TXQ, inactive queue: %u\n", q); |
352 | "Release TXQ, inactive queue: %u\n", q); | ||
353 | return false; | 351 | return false; |
354 | } | 352 | } |
355 | 353 | ||
356 | ath_dbg(common, ATH_DBG_QUEUE, "Release TX queue: %u\n", q); | 354 | ath_dbg(common, QUEUE, "Release TX queue: %u\n", q); |
357 | 355 | ||
358 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; | 356 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; |
359 | ah->txok_interrupt_mask &= ~(1 << q); | 357 | ah->txok_interrupt_mask &= ~(1 << q); |
@@ -376,12 +374,11 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | |||
376 | 374 | ||
377 | qi = &ah->txq[q]; | 375 | qi = &ah->txq[q]; |
378 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 376 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
379 | ath_dbg(common, ATH_DBG_QUEUE, | 377 | ath_dbg(common, QUEUE, "Reset TXQ, inactive queue: %u\n", q); |
380 | "Reset TXQ, inactive queue: %u\n", q); | ||
381 | return true; | 378 | return true; |
382 | } | 379 | } |
383 | 380 | ||
384 | ath_dbg(common, ATH_DBG_QUEUE, "Reset TX queue: %u\n", q); | 381 | ath_dbg(common, QUEUE, "Reset TX queue: %u\n", q); |
385 | 382 | ||
386 | if (qi->tqi_cwmin == ATH9K_TXQ_USEDEFAULT) { | 383 | if (qi->tqi_cwmin == ATH9K_TXQ_USEDEFAULT) { |
387 | if (chan && IS_CHAN_B(chan)) | 384 | if (chan && IS_CHAN_B(chan)) |
@@ -784,7 +781,7 @@ void ath9k_hw_disable_interrupts(struct ath_hw *ah) | |||
784 | else | 781 | else |
785 | atomic_dec(&ah->intr_ref_cnt); | 782 | atomic_dec(&ah->intr_ref_cnt); |
786 | 783 | ||
787 | ath_dbg(common, ATH_DBG_INTERRUPT, "disable IER\n"); | 784 | ath_dbg(common, INTERRUPT, "disable IER\n"); |
788 | REG_WRITE(ah, AR_IER, AR_IER_DISABLE); | 785 | REG_WRITE(ah, AR_IER, AR_IER_DISABLE); |
789 | (void) REG_READ(ah, AR_IER); | 786 | (void) REG_READ(ah, AR_IER); |
790 | if (!AR_SREV_9100(ah)) { | 787 | if (!AR_SREV_9100(ah)) { |
@@ -807,8 +804,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) | |||
807 | return; | 804 | return; |
808 | 805 | ||
809 | if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { | 806 | if (!atomic_inc_and_test(&ah->intr_ref_cnt)) { |
810 | ath_dbg(common, ATH_DBG_INTERRUPT, | 807 | ath_dbg(common, INTERRUPT, "Do not enable IER ref count %d\n", |
811 | "Do not enable IER ref count %d\n", | ||
812 | atomic_read(&ah->intr_ref_cnt)); | 808 | atomic_read(&ah->intr_ref_cnt)); |
813 | return; | 809 | return; |
814 | } | 810 | } |
@@ -821,7 +817,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) | |||
821 | if (ah->imask & ATH9K_INT_MCI) | 817 | if (ah->imask & ATH9K_INT_MCI) |
822 | async_mask |= AR_INTR_ASYNC_MASK_MCI; | 818 | async_mask |= AR_INTR_ASYNC_MASK_MCI; |
823 | 819 | ||
824 | ath_dbg(common, ATH_DBG_INTERRUPT, "enable IER\n"); | 820 | ath_dbg(common, INTERRUPT, "enable IER\n"); |
825 | REG_WRITE(ah, AR_IER, AR_IER_ENABLE); | 821 | REG_WRITE(ah, AR_IER, AR_IER_ENABLE); |
826 | if (!AR_SREV_9100(ah)) { | 822 | if (!AR_SREV_9100(ah)) { |
827 | REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, async_mask); | 823 | REG_WRITE(ah, AR_INTR_ASYNC_ENABLE, async_mask); |
@@ -830,7 +826,7 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) | |||
830 | REG_WRITE(ah, AR_INTR_SYNC_ENABLE, sync_default); | 826 | REG_WRITE(ah, AR_INTR_SYNC_ENABLE, sync_default); |
831 | REG_WRITE(ah, AR_INTR_SYNC_MASK, sync_default); | 827 | REG_WRITE(ah, AR_INTR_SYNC_MASK, sync_default); |
832 | } | 828 | } |
833 | ath_dbg(common, ATH_DBG_INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", | 829 | ath_dbg(common, INTERRUPT, "AR_IMR 0x%x IER 0x%x\n", |
834 | REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); | 830 | REG_READ(ah, AR_IMR), REG_READ(ah, AR_IER)); |
835 | } | 831 | } |
836 | EXPORT_SYMBOL(ath9k_hw_enable_interrupts); | 832 | EXPORT_SYMBOL(ath9k_hw_enable_interrupts); |
@@ -845,7 +841,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah) | |||
845 | if (!(ints & ATH9K_INT_GLOBAL)) | 841 | if (!(ints & ATH9K_INT_GLOBAL)) |
846 | ath9k_hw_disable_interrupts(ah); | 842 | ath9k_hw_disable_interrupts(ah); |
847 | 843 | ||
848 | ath_dbg(common, ATH_DBG_INTERRUPT, "New interrupt mask 0x%x\n", ints); | 844 | ath_dbg(common, INTERRUPT, "New interrupt mask 0x%x\n", ints); |
849 | 845 | ||
850 | mask = ints & ATH9K_INT_COMMON; | 846 | mask = ints & ATH9K_INT_COMMON; |
851 | mask2 = 0; | 847 | mask2 = 0; |
@@ -908,7 +904,7 @@ void ath9k_hw_set_interrupts(struct ath_hw *ah) | |||
908 | mask2 |= AR_IMR_S2_CST; | 904 | mask2 |= AR_IMR_S2_CST; |
909 | } | 905 | } |
910 | 906 | ||
911 | ath_dbg(common, ATH_DBG_INTERRUPT, "new IMR 0x%x\n", mask); | 907 | ath_dbg(common, INTERRUPT, "new IMR 0x%x\n", mask); |
912 | REG_WRITE(ah, AR_IMR, mask); | 908 | REG_WRITE(ah, AR_IMR, mask); |
913 | ah->imrs2_reg &= ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | | 909 | ah->imrs2_reg &= ~(AR_IMR_S2_TIM | AR_IMR_S2_DTIM | AR_IMR_S2_DTIMSYNC | |
914 | AR_IMR_S2_CABEND | AR_IMR_S2_CABTO | | 910 | AR_IMR_S2_CABEND | AR_IMR_S2_CABTO | |