diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2012-11-18 06:14:51 -0500 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-11-19 09:06:28 -0500 |
commit | 49bd072d4ebab59217dadeb779a0a3dd2d0397ec (patch) | |
tree | 5d09acb08ba88b47f4d0941dd753671ab7e039ea /drivers/net/wireless/iwlwifi/pcie/rx.c | |
parent | 6ca6ebc1606c6fa7e8931445e84f21f4843e3bab (diff) |
iwlwifi: more cleanup in pcie/rx.c
Really trivial clean up.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/pcie/rx.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index e3ae28d7a0da..28a4968be1c1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -130,10 +130,11 @@ static inline __le32 iwl_pcie_dma_addr2rbd_ptr(dma_addr_t dma_addr) | |||
130 | return cpu_to_le32((u32)(dma_addr >> 8)); | 130 | return cpu_to_le32((u32)(dma_addr >> 8)); |
131 | } | 131 | } |
132 | 132 | ||
133 | /* | ||
134 | * iwl_pcie_rx_stop - stops the Rx DMA | ||
135 | */ | ||
133 | int iwl_pcie_rx_stop(struct iwl_trans *trans) | 136 | int iwl_pcie_rx_stop(struct iwl_trans *trans) |
134 | { | 137 | { |
135 | |||
136 | /* stop Rx DMA */ | ||
137 | iwl_write_direct32(trans, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); | 138 | iwl_write_direct32(trans, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0); |
138 | return iwl_poll_direct_bit(trans, FH_MEM_RSSR_RX_STATUS_REG, | 139 | return iwl_poll_direct_bit(trans, FH_MEM_RSSR_RX_STATUS_REG, |
139 | FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000); | 140 | FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000); |
@@ -440,9 +441,6 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq) | |||
440 | u32 rb_size; | 441 | u32 rb_size; |
441 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ | 442 | const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */ |
442 | 443 | ||
443 | /* FIXME: RX_RB_TIMEOUT for all devices? */ | ||
444 | u32 rb_timeout = RX_RB_TIMEOUT; | ||
445 | |||
446 | if (trans_pcie->rx_buf_size_8k) | 444 | if (trans_pcie->rx_buf_size_8k) |
447 | rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; | 445 | rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K; |
448 | else | 446 | else |
@@ -475,7 +473,7 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq) | |||
475 | FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | | 473 | FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY | |
476 | FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | | 474 | FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL | |
477 | rb_size| | 475 | rb_size| |
478 | (rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| | 476 | (RX_RB_TIMEOUT << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)| |
479 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); | 477 | (rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS)); |
480 | 478 | ||
481 | /* Set interrupt coalescing timer to default (2048 usecs) */ | 479 | /* Set interrupt coalescing timer to default (2048 usecs) */ |
@@ -776,7 +774,6 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans) | |||
776 | iwl_op_mode_nic_error(trans->op_mode); | 774 | iwl_op_mode_nic_error(trans->op_mode); |
777 | } | 775 | } |
778 | 776 | ||
779 | /* tasklet for iwlagn interrupt */ | ||
780 | void iwl_pcie_tasklet(struct iwl_trans *trans) | 777 | void iwl_pcie_tasklet(struct iwl_trans *trans) |
781 | { | 778 | { |
782 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | 779 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); |
@@ -1189,7 +1186,6 @@ irqreturn_t iwl_pcie_isr_ict(int irq, void *data) | |||
1189 | 1186 | ||
1190 | trace_iwlwifi_dev_irq(trans->dev); | 1187 | trace_iwlwifi_dev_irq(trans->dev); |
1191 | 1188 | ||
1192 | |||
1193 | /* Disable (but don't clear!) interrupts here to avoid | 1189 | /* Disable (but don't clear!) interrupts here to avoid |
1194 | * back-to-back ISRs and sporadic interrupts from our NIC. | 1190 | * back-to-back ISRs and sporadic interrupts from our NIC. |
1195 | * If we have something to service, the tasklet will re-enable ints. | 1191 | * If we have something to service, the tasklet will re-enable ints. |
@@ -1198,7 +1194,6 @@ irqreturn_t iwl_pcie_isr_ict(int irq, void *data) | |||
1198 | inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */ | 1194 | inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */ |
1199 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); | 1195 | iwl_write32(trans, CSR_INT_MASK, 0x00000000); |
1200 | 1196 | ||
1201 | |||
1202 | /* Ignore interrupt if there's nothing in NIC to service. | 1197 | /* Ignore interrupt if there's nothing in NIC to service. |
1203 | * This may be due to IRQ shared with another device, | 1198 | * This may be due to IRQ shared with another device, |
1204 | * or due to sporadic interrupts thrown from our NIC. */ | 1199 | * or due to sporadic interrupts thrown from our NIC. */ |