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>
This commit is contained in:
parent
6ca6ebc160
commit
49bd072d4e
@ -130,10 +130,11 @@ static inline __le32 iwl_pcie_dma_addr2rbd_ptr(dma_addr_t dma_addr)
|
|||||||
return cpu_to_le32((u32)(dma_addr >> 8));
|
return cpu_to_le32((u32)(dma_addr >> 8));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* iwl_pcie_rx_stop - stops the Rx DMA
|
||||||
|
*/
|
||||||
int iwl_pcie_rx_stop(struct iwl_trans *trans)
|
int iwl_pcie_rx_stop(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* stop Rx DMA */
|
|
||||||
iwl_write_direct32(trans, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
|
iwl_write_direct32(trans, FH_MEM_RCSR_CHNL0_CONFIG_REG, 0);
|
||||||
return iwl_poll_direct_bit(trans, FH_MEM_RSSR_RX_STATUS_REG,
|
return iwl_poll_direct_bit(trans, FH_MEM_RSSR_RX_STATUS_REG,
|
||||||
FH_RSSR_CHNL0_RX_STATUS_CHNL_IDLE, 1000);
|
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)
|
|||||||
u32 rb_size;
|
u32 rb_size;
|
||||||
const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */
|
const u32 rfdnlog = RX_QUEUE_SIZE_LOG; /* 256 RBDs */
|
||||||
|
|
||||||
/* FIXME: RX_RB_TIMEOUT for all devices? */
|
|
||||||
u32 rb_timeout = RX_RB_TIMEOUT;
|
|
||||||
|
|
||||||
if (trans_pcie->rx_buf_size_8k)
|
if (trans_pcie->rx_buf_size_8k)
|
||||||
rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K;
|
rb_size = FH_RCSR_RX_CONFIG_REG_VAL_RB_SIZE_8K;
|
||||||
else
|
else
|
||||||
@ -475,7 +473,7 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq)
|
|||||||
FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY |
|
FH_RCSR_CHNL0_RX_IGNORE_RXF_EMPTY |
|
||||||
FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
|
FH_RCSR_CHNL0_RX_CONFIG_IRQ_DEST_INT_HOST_VAL |
|
||||||
rb_size|
|
rb_size|
|
||||||
(rb_timeout << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)|
|
(RX_RB_TIMEOUT << FH_RCSR_RX_CONFIG_REG_IRQ_RBTH_POS)|
|
||||||
(rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
|
(rfdnlog << FH_RCSR_RX_CONFIG_RBDCB_SIZE_POS));
|
||||||
|
|
||||||
/* Set interrupt coalescing timer to default (2048 usecs) */
|
/* Set interrupt coalescing timer to default (2048 usecs) */
|
||||||
@ -776,7 +774,6 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans)
|
|||||||
iwl_op_mode_nic_error(trans->op_mode);
|
iwl_op_mode_nic_error(trans->op_mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tasklet for iwlagn interrupt */
|
|
||||||
void iwl_pcie_tasklet(struct iwl_trans *trans)
|
void iwl_pcie_tasklet(struct iwl_trans *trans)
|
||||||
{
|
{
|
||||||
struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans);
|
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)
|
|||||||
|
|
||||||
trace_iwlwifi_dev_irq(trans->dev);
|
trace_iwlwifi_dev_irq(trans->dev);
|
||||||
|
|
||||||
|
|
||||||
/* Disable (but don't clear!) interrupts here to avoid
|
/* Disable (but don't clear!) interrupts here to avoid
|
||||||
* back-to-back ISRs and sporadic interrupts from our NIC.
|
* back-to-back ISRs and sporadic interrupts from our NIC.
|
||||||
* If we have something to service, the tasklet will re-enable ints.
|
* 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)
|
|||||||
inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */
|
inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */
|
||||||
iwl_write32(trans, CSR_INT_MASK, 0x00000000);
|
iwl_write32(trans, CSR_INT_MASK, 0x00000000);
|
||||||
|
|
||||||
|
|
||||||
/* Ignore interrupt if there's nothing in NIC to service.
|
/* Ignore interrupt if there's nothing in NIC to service.
|
||||||
* This may be due to IRQ shared with another device,
|
* This may be due to IRQ shared with another device,
|
||||||
* or due to sporadic interrupts thrown from our NIC. */
|
* or due to sporadic interrupts thrown from our NIC. */
|
||||||
|
@ -933,7 +933,6 @@ static ssize_t iwl_dbgfs_##name##_write(struct file *file, \
|
|||||||
const char __user *user_buf, \
|
const char __user *user_buf, \
|
||||||
size_t count, loff_t *ppos);
|
size_t count, loff_t *ppos);
|
||||||
|
|
||||||
|
|
||||||
#define DEBUGFS_READ_FILE_OPS(name) \
|
#define DEBUGFS_READ_FILE_OPS(name) \
|
||||||
DEBUGFS_READ_FUNC(name); \
|
DEBUGFS_READ_FUNC(name); \
|
||||||
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
static const struct file_operations iwl_dbgfs_##name##_ops = { \
|
||||||
|
@ -112,7 +112,6 @@ static int iwl_queue_init(struct iwl_queue *q, int count, int slots_num, u32 id)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int iwl_pcie_alloc_dma_ptr(struct iwl_trans *trans,
|
static int iwl_pcie_alloc_dma_ptr(struct iwl_trans *trans,
|
||||||
struct iwl_dma_ptr *ptr, size_t size)
|
struct iwl_dma_ptr *ptr, size_t size)
|
||||||
{
|
{
|
||||||
@ -1400,7 +1399,6 @@ static int iwl_pcie_send_hcmd_async(struct iwl_trans *trans,
|
|||||||
if (WARN_ON(cmd->flags & CMD_WANT_SKB))
|
if (WARN_ON(cmd->flags & CMD_WANT_SKB))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|
||||||
ret = iwl_pcie_enqueue_hcmd(trans, cmd);
|
ret = iwl_pcie_enqueue_hcmd(trans, cmd);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
IWL_ERR(trans,
|
IWL_ERR(trans,
|
||||||
|
Loading…
Reference in New Issue
Block a user