diff options
author | Sujith <Sujith.Manoharan@atheros.com> | 2009-02-09 02:57:26 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-13 13:45:10 -0500 |
commit | 2660b81a378ab227b78c4cc618453fa7e19a7c7b (patch) | |
tree | ea305af43f0e27c86538fecce6c9a4e0151dbc78 /drivers/net/wireless/ath9k/mac.c | |
parent | f74df6fbe31561091bf42be0ed30232be2b9d3ac (diff) |
ath9k: Remove all the useless ah_ variable prefixes
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/mac.c')
-rw-r--r-- | drivers/net/wireless/ath9k/mac.c | 94 |
1 files changed, 47 insertions, 47 deletions
diff --git a/drivers/net/wireless/ath9k/mac.c b/drivers/net/wireless/ath9k/mac.c index ac2071444017..f32c622db6e7 100644 --- a/drivers/net/wireless/ath9k/mac.c +++ b/drivers/net/wireless/ath9k/mac.c | |||
@@ -21,18 +21,18 @@ static void ath9k_hw_set_txq_interrupts(struct ath_hw *ah, | |||
21 | { | 21 | { |
22 | DPRINTF(ah->ah_sc, ATH_DBG_INTERRUPT, | 22 | DPRINTF(ah->ah_sc, ATH_DBG_INTERRUPT, |
23 | "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", | 23 | "tx ok 0x%x err 0x%x desc 0x%x eol 0x%x urn 0x%x\n", |
24 | ah->ah_txOkInterruptMask, ah->ah_txErrInterruptMask, | 24 | ah->txok_interrupt_mask, ah->txerr_interrupt_mask, |
25 | ah->ah_txDescInterruptMask, ah->ah_txEolInterruptMask, | 25 | ah->txdesc_interrupt_mask, ah->txeol_interrupt_mask, |
26 | ah->ah_txUrnInterruptMask); | 26 | ah->txurn_interrupt_mask); |
27 | 27 | ||
28 | REG_WRITE(ah, AR_IMR_S0, | 28 | REG_WRITE(ah, AR_IMR_S0, |
29 | SM(ah->ah_txOkInterruptMask, AR_IMR_S0_QCU_TXOK) | 29 | SM(ah->txok_interrupt_mask, AR_IMR_S0_QCU_TXOK) |
30 | | SM(ah->ah_txDescInterruptMask, AR_IMR_S0_QCU_TXDESC)); | 30 | | SM(ah->txdesc_interrupt_mask, AR_IMR_S0_QCU_TXDESC)); |
31 | REG_WRITE(ah, AR_IMR_S1, | 31 | REG_WRITE(ah, AR_IMR_S1, |
32 | SM(ah->ah_txErrInterruptMask, AR_IMR_S1_QCU_TXERR) | 32 | SM(ah->txerr_interrupt_mask, AR_IMR_S1_QCU_TXERR) |
33 | | SM(ah->ah_txEolInterruptMask, AR_IMR_S1_QCU_TXEOL)); | 33 | | SM(ah->txeol_interrupt_mask, AR_IMR_S1_QCU_TXEOL)); |
34 | REG_RMW_FIELD(ah, AR_IMR_S2, | 34 | REG_RMW_FIELD(ah, AR_IMR_S2, |
35 | AR_IMR_S2_QCU_TXURN, ah->ah_txUrnInterruptMask); | 35 | AR_IMR_S2_QCU_TXURN, ah->txurn_interrupt_mask); |
36 | } | 36 | } |
37 | 37 | ||
38 | u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q) | 38 | u32 ath9k_hw_gettxbuf(struct ath_hw *ah, u32 q) |
@@ -75,10 +75,10 @@ bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel) | |||
75 | u32 txcfg, curLevel, newLevel; | 75 | u32 txcfg, curLevel, newLevel; |
76 | enum ath9k_int omask; | 76 | enum ath9k_int omask; |
77 | 77 | ||
78 | if (ah->ah_txTrigLevel >= MAX_TX_FIFO_THRESHOLD) | 78 | if (ah->tx_trig_level >= MAX_TX_FIFO_THRESHOLD) |
79 | return false; | 79 | return false; |
80 | 80 | ||
81 | omask = ath9k_hw_set_interrupts(ah, ah->ah_maskReg & ~ATH9K_INT_GLOBAL); | 81 | omask = ath9k_hw_set_interrupts(ah, ah->mask_reg & ~ATH9K_INT_GLOBAL); |
82 | 82 | ||
83 | txcfg = REG_READ(ah, AR_TXCFG); | 83 | txcfg = REG_READ(ah, AR_TXCFG); |
84 | curLevel = MS(txcfg, AR_FTRIG); | 84 | curLevel = MS(txcfg, AR_FTRIG); |
@@ -94,7 +94,7 @@ bool ath9k_hw_updatetxtriglevel(struct ath_hw *ah, bool bIncTrigLevel) | |||
94 | 94 | ||
95 | ath9k_hw_set_interrupts(ah, omask); | 95 | ath9k_hw_set_interrupts(ah, omask); |
96 | 96 | ||
97 | ah->ah_txTrigLevel = newLevel; | 97 | ah->tx_trig_level = newLevel; |
98 | 98 | ||
99 | return newLevel != curLevel; | 99 | return newLevel != curLevel; |
100 | } | 100 | } |
@@ -104,7 +104,7 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q) | |||
104 | #define ATH9K_TX_STOP_DMA_TIMEOUT 4000 /* usec */ | 104 | #define ATH9K_TX_STOP_DMA_TIMEOUT 4000 /* usec */ |
105 | #define ATH9K_TIME_QUANTUM 100 /* usec */ | 105 | #define ATH9K_TIME_QUANTUM 100 /* usec */ |
106 | 106 | ||
107 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 107 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
108 | struct ath9k_tx_queue_info *qi; | 108 | struct ath9k_tx_queue_info *qi; |
109 | u32 tsfLow, j, wait; | 109 | u32 tsfLow, j, wait; |
110 | u32 wait_time = ATH9K_TX_STOP_DMA_TIMEOUT / ATH9K_TIME_QUANTUM; | 110 | u32 wait_time = ATH9K_TX_STOP_DMA_TIMEOUT / ATH9K_TIME_QUANTUM; |
@@ -114,7 +114,7 @@ bool ath9k_hw_stoptxdma(struct ath_hw *ah, u32 q) | |||
114 | return false; | 114 | return false; |
115 | } | 115 | } |
116 | 116 | ||
117 | qi = &ah->ah_txq[q]; | 117 | qi = &ah->txq[q]; |
118 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 118 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
119 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); | 119 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); |
120 | return false; | 120 | return false; |
@@ -296,7 +296,7 @@ void ath9k_hw_set11n_txdesc(struct ath_hw *ah, struct ath_desc *ds, | |||
296 | { | 296 | { |
297 | struct ar5416_desc *ads = AR5416DESC(ds); | 297 | struct ar5416_desc *ads = AR5416DESC(ds); |
298 | 298 | ||
299 | txPower += ah->ah_txPowerIndexOffset; | 299 | txPower += ah->txpower_indexoffset; |
300 | if (txPower > 63) | 300 | if (txPower > 63) |
301 | txPower = 63; | 301 | txPower = 63; |
302 | 302 | ||
@@ -442,15 +442,15 @@ void ath9k_hw_set11n_virtualmorefrag(struct ath_hw *ah, struct ath_desc *ds, | |||
442 | 442 | ||
443 | void ath9k_hw_gettxintrtxqs(struct ath_hw *ah, u32 *txqs) | 443 | void ath9k_hw_gettxintrtxqs(struct ath_hw *ah, u32 *txqs) |
444 | { | 444 | { |
445 | *txqs &= ah->ah_intrTxqs; | 445 | *txqs &= ah->intr_txqs; |
446 | ah->ah_intrTxqs &= ~(*txqs); | 446 | ah->intr_txqs &= ~(*txqs); |
447 | } | 447 | } |
448 | 448 | ||
449 | bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, | 449 | bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, |
450 | const struct ath9k_tx_queue_info *qinfo) | 450 | const struct ath9k_tx_queue_info *qinfo) |
451 | { | 451 | { |
452 | u32 cw; | 452 | u32 cw; |
453 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 453 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
454 | struct ath9k_tx_queue_info *qi; | 454 | struct ath9k_tx_queue_info *qi; |
455 | 455 | ||
456 | if (q >= pCap->total_queues) { | 456 | if (q >= pCap->total_queues) { |
@@ -458,7 +458,7 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, | |||
458 | return false; | 458 | return false; |
459 | } | 459 | } |
460 | 460 | ||
461 | qi = &ah->ah_txq[q]; | 461 | qi = &ah->txq[q]; |
462 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 462 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
463 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); | 463 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); |
464 | return false; | 464 | return false; |
@@ -517,7 +517,7 @@ bool ath9k_hw_set_txq_props(struct ath_hw *ah, int q, | |||
517 | bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q, | 517 | bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q, |
518 | struct ath9k_tx_queue_info *qinfo) | 518 | struct ath9k_tx_queue_info *qinfo) |
519 | { | 519 | { |
520 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 520 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
521 | struct ath9k_tx_queue_info *qi; | 521 | struct ath9k_tx_queue_info *qi; |
522 | 522 | ||
523 | if (q >= pCap->total_queues) { | 523 | if (q >= pCap->total_queues) { |
@@ -525,7 +525,7 @@ bool ath9k_hw_get_txq_props(struct ath_hw *ah, int q, | |||
525 | return false; | 525 | return false; |
526 | } | 526 | } |
527 | 527 | ||
528 | qi = &ah->ah_txq[q]; | 528 | qi = &ah->txq[q]; |
529 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 529 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
530 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); | 530 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue\n"); |
531 | return false; | 531 | return false; |
@@ -553,7 +553,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
553 | const struct ath9k_tx_queue_info *qinfo) | 553 | const struct ath9k_tx_queue_info *qinfo) |
554 | { | 554 | { |
555 | struct ath9k_tx_queue_info *qi; | 555 | struct ath9k_tx_queue_info *qi; |
556 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 556 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
557 | int q; | 557 | int q; |
558 | 558 | ||
559 | switch (type) { | 559 | switch (type) { |
@@ -571,7 +571,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
571 | break; | 571 | break; |
572 | case ATH9K_TX_QUEUE_DATA: | 572 | case ATH9K_TX_QUEUE_DATA: |
573 | for (q = 0; q < pCap->total_queues; q++) | 573 | for (q = 0; q < pCap->total_queues; q++) |
574 | if (ah->ah_txq[q].tqi_type == | 574 | if (ah->txq[q].tqi_type == |
575 | ATH9K_TX_QUEUE_INACTIVE) | 575 | ATH9K_TX_QUEUE_INACTIVE) |
576 | break; | 576 | break; |
577 | if (q == pCap->total_queues) { | 577 | if (q == pCap->total_queues) { |
@@ -587,7 +587,7 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
587 | 587 | ||
588 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "queue %u\n", q); | 588 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "queue %u\n", q); |
589 | 589 | ||
590 | qi = &ah->ah_txq[q]; | 590 | qi = &ah->txq[q]; |
591 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { | 591 | if (qi->tqi_type != ATH9K_TX_QUEUE_INACTIVE) { |
592 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, | 592 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, |
593 | "tx queue %u already active\n", q); | 593 | "tx queue %u already active\n", q); |
@@ -616,14 +616,14 @@ int ath9k_hw_setuptxqueue(struct ath_hw *ah, enum ath9k_tx_queue type, | |||
616 | 616 | ||
617 | bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | 617 | bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) |
618 | { | 618 | { |
619 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 619 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
620 | struct ath9k_tx_queue_info *qi; | 620 | struct ath9k_tx_queue_info *qi; |
621 | 621 | ||
622 | if (q >= pCap->total_queues) { | 622 | if (q >= pCap->total_queues) { |
623 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); | 623 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "invalid queue num %u\n", q); |
624 | return false; | 624 | return false; |
625 | } | 625 | } |
626 | qi = &ah->ah_txq[q]; | 626 | qi = &ah->txq[q]; |
627 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 627 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
628 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); | 628 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); |
629 | return false; | 629 | return false; |
@@ -632,11 +632,11 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | |||
632 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "release queue %u\n", q); | 632 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "release queue %u\n", q); |
633 | 633 | ||
634 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; | 634 | qi->tqi_type = ATH9K_TX_QUEUE_INACTIVE; |
635 | ah->ah_txOkInterruptMask &= ~(1 << q); | 635 | ah->txok_interrupt_mask &= ~(1 << q); |
636 | ah->ah_txErrInterruptMask &= ~(1 << q); | 636 | ah->txerr_interrupt_mask &= ~(1 << q); |
637 | ah->ah_txDescInterruptMask &= ~(1 << q); | 637 | ah->txdesc_interrupt_mask &= ~(1 << q); |
638 | ah->ah_txEolInterruptMask &= ~(1 << q); | 638 | ah->txeol_interrupt_mask &= ~(1 << q); |
639 | ah->ah_txUrnInterruptMask &= ~(1 << q); | 639 | ah->txurn_interrupt_mask &= ~(1 << q); |
640 | ath9k_hw_set_txq_interrupts(ah, qi); | 640 | ath9k_hw_set_txq_interrupts(ah, qi); |
641 | 641 | ||
642 | return true; | 642 | return true; |
@@ -644,8 +644,8 @@ bool ath9k_hw_releasetxqueue(struct ath_hw *ah, u32 q) | |||
644 | 644 | ||
645 | bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | 645 | bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) |
646 | { | 646 | { |
647 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 647 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
648 | struct ath9k_channel *chan = ah->ah_curchan; | 648 | struct ath9k_channel *chan = ah->curchan; |
649 | struct ath9k_tx_queue_info *qi; | 649 | struct ath9k_tx_queue_info *qi; |
650 | u32 cwMin, chanCwMin, value; | 650 | u32 cwMin, chanCwMin, value; |
651 | 651 | ||
@@ -654,7 +654,7 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | |||
654 | return false; | 654 | return false; |
655 | } | 655 | } |
656 | 656 | ||
657 | qi = &ah->ah_txq[q]; | 657 | qi = &ah->txq[q]; |
658 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { | 658 | if (qi->tqi_type == ATH9K_TX_QUEUE_INACTIVE) { |
659 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); | 659 | DPRINTF(ah->ah_sc, ATH_DBG_QUEUE, "inactive queue %u\n", q); |
660 | return true; | 660 | return true; |
@@ -742,9 +742,9 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | |||
742 | | AR_Q_MISC_CBR_INCR_DIS1 | 742 | | AR_Q_MISC_CBR_INCR_DIS1 |
743 | | AR_Q_MISC_CBR_INCR_DIS0); | 743 | | AR_Q_MISC_CBR_INCR_DIS0); |
744 | value = (qi->tqi_readyTime - | 744 | value = (qi->tqi_readyTime - |
745 | (ah->ah_config.sw_beacon_response_time - | 745 | (ah->config.sw_beacon_response_time - |
746 | ah->ah_config.dma_beacon_response_time) - | 746 | ah->config.dma_beacon_response_time) - |
747 | ah->ah_config.additional_swba_backoff) * 1024; | 747 | ah->config.additional_swba_backoff) * 1024; |
748 | REG_WRITE(ah, AR_QRDYTIMECFG(q), | 748 | REG_WRITE(ah, AR_QRDYTIMECFG(q), |
749 | value | AR_Q_RDYTIMECFG_EN); | 749 | value | AR_Q_RDYTIMECFG_EN); |
750 | REG_WRITE(ah, AR_DMISC(q), REG_READ(ah, AR_DMISC(q)) | 750 | REG_WRITE(ah, AR_DMISC(q), REG_READ(ah, AR_DMISC(q)) |
@@ -772,25 +772,25 @@ bool ath9k_hw_resettxqueue(struct ath_hw *ah, u32 q) | |||
772 | } | 772 | } |
773 | 773 | ||
774 | if (qi->tqi_qflags & TXQ_FLAG_TXOKINT_ENABLE) | 774 | if (qi->tqi_qflags & TXQ_FLAG_TXOKINT_ENABLE) |
775 | ah->ah_txOkInterruptMask |= 1 << q; | 775 | ah->txok_interrupt_mask |= 1 << q; |
776 | else | 776 | else |
777 | ah->ah_txOkInterruptMask &= ~(1 << q); | 777 | ah->txok_interrupt_mask &= ~(1 << q); |
778 | if (qi->tqi_qflags & TXQ_FLAG_TXERRINT_ENABLE) | 778 | if (qi->tqi_qflags & TXQ_FLAG_TXERRINT_ENABLE) |
779 | ah->ah_txErrInterruptMask |= 1 << q; | 779 | ah->txerr_interrupt_mask |= 1 << q; |
780 | else | 780 | else |
781 | ah->ah_txErrInterruptMask &= ~(1 << q); | 781 | ah->txerr_interrupt_mask &= ~(1 << q); |
782 | if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE) | 782 | if (qi->tqi_qflags & TXQ_FLAG_TXDESCINT_ENABLE) |
783 | ah->ah_txDescInterruptMask |= 1 << q; | 783 | ah->txdesc_interrupt_mask |= 1 << q; |
784 | else | 784 | else |
785 | ah->ah_txDescInterruptMask &= ~(1 << q); | 785 | ah->txdesc_interrupt_mask &= ~(1 << q); |
786 | if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE) | 786 | if (qi->tqi_qflags & TXQ_FLAG_TXEOLINT_ENABLE) |
787 | ah->ah_txEolInterruptMask |= 1 << q; | 787 | ah->txeol_interrupt_mask |= 1 << q; |
788 | else | 788 | else |
789 | ah->ah_txEolInterruptMask &= ~(1 << q); | 789 | ah->txeol_interrupt_mask &= ~(1 << q); |
790 | if (qi->tqi_qflags & TXQ_FLAG_TXURNINT_ENABLE) | 790 | if (qi->tqi_qflags & TXQ_FLAG_TXURNINT_ENABLE) |
791 | ah->ah_txUrnInterruptMask |= 1 << q; | 791 | ah->txurn_interrupt_mask |= 1 << q; |
792 | else | 792 | else |
793 | ah->ah_txUrnInterruptMask &= ~(1 << q); | 793 | ah->txurn_interrupt_mask &= ~(1 << q); |
794 | ath9k_hw_set_txq_interrupts(ah, qi); | 794 | ath9k_hw_set_txq_interrupts(ah, qi); |
795 | 795 | ||
796 | return true; | 796 | return true; |
@@ -865,7 +865,7 @@ bool ath9k_hw_setuprxdesc(struct ath_hw *ah, struct ath_desc *ds, | |||
865 | u32 size, u32 flags) | 865 | u32 size, u32 flags) |
866 | { | 866 | { |
867 | struct ar5416_desc *ads = AR5416DESC(ds); | 867 | struct ar5416_desc *ads = AR5416DESC(ds); |
868 | struct ath9k_hw_capabilities *pCap = &ah->ah_caps; | 868 | struct ath9k_hw_capabilities *pCap = &ah->caps; |
869 | 869 | ||
870 | ads->ds_ctl1 = size & AR_BufLen; | 870 | ads->ds_ctl1 = size & AR_BufLen; |
871 | if (flags & ATH9K_RXDESC_INTREQ) | 871 | if (flags & ATH9K_RXDESC_INTREQ) |