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 | |
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')
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/rx.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/trans.c | 1 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/pcie/tx.c | 2 |
3 files changed, 4 insertions, 12 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. */ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 19c11e3b5481..9f317b016df8 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -933,7 +933,6 @@ static ssize_t iwl_dbgfs_##name##_write(struct file *file, \ | |||
933 | const char __user *user_buf, \ | 933 | const char __user *user_buf, \ |
934 | size_t count, loff_t *ppos); | 934 | size_t count, loff_t *ppos); |
935 | 935 | ||
936 | |||
937 | #define DEBUGFS_READ_FILE_OPS(name) \ | 936 | #define DEBUGFS_READ_FILE_OPS(name) \ |
938 | DEBUGFS_READ_FUNC(name); \ | 937 | DEBUGFS_READ_FUNC(name); \ |
939 | static const struct file_operations iwl_dbgfs_##name##_ops = { \ | 938 | static const struct file_operations iwl_dbgfs_##name##_ops = { \ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index 40e5a6d6e6d3..6c5b867c353a 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c | |||
@@ -112,7 +112,6 @@ static int iwl_queue_init(struct iwl_queue *q, int count, int slots_num, u32 id) | |||
112 | return 0; | 112 | return 0; |
113 | } | 113 | } |
114 | 114 | ||
115 | |||
116 | static int iwl_pcie_alloc_dma_ptr(struct iwl_trans *trans, | 115 | static int iwl_pcie_alloc_dma_ptr(struct iwl_trans *trans, |
117 | struct iwl_dma_ptr *ptr, size_t size) | 116 | struct iwl_dma_ptr *ptr, size_t size) |
118 | { | 117 | { |
@@ -1400,7 +1399,6 @@ static int iwl_pcie_send_hcmd_async(struct iwl_trans *trans, | |||
1400 | if (WARN_ON(cmd->flags & CMD_WANT_SKB)) | 1399 | if (WARN_ON(cmd->flags & CMD_WANT_SKB)) |
1401 | return -EINVAL; | 1400 | return -EINVAL; |
1402 | 1401 | ||
1403 | |||
1404 | ret = iwl_pcie_enqueue_hcmd(trans, cmd); | 1402 | ret = iwl_pcie_enqueue_hcmd(trans, cmd); |
1405 | if (ret < 0) { | 1403 | if (ret < 0) { |
1406 | IWL_ERR(trans, | 1404 | IWL_ERR(trans, |