aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2014-04-23 13:00:56 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2014-05-06 13:41:21 -0400
commit6d6e68f8396269608cb1580a3b14be72069bb5f3 (patch)
treed87726b3a1e77ae77594243b879bc4fc62306145 /drivers/net/wireless/iwlwifi
parentc43e93300a23545ba4a6fc73c42f20edf23a652e (diff)
iwlwifi: pcie: use bool for iwl_pcie_txq_build_tfd() argument
The 'reset' argument is clearly a boolean, so use bool instead of u8 with 0/1 values. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/tx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index dde6031f4257..16ebc4a9514d 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -452,7 +452,7 @@ static void iwl_pcie_txq_free_tfd(struct iwl_trans *trans, struct iwl_txq *txq)
452} 452}
453 453
454static int iwl_pcie_txq_build_tfd(struct iwl_trans *trans, struct iwl_txq *txq, 454static int iwl_pcie_txq_build_tfd(struct iwl_trans *trans, struct iwl_txq *txq,
455 dma_addr_t addr, u16 len, u8 reset) 455 dma_addr_t addr, u16 len, bool reset)
456{ 456{
457 struct iwl_queue *q; 457 struct iwl_queue *q;
458 struct iwl_tfd *tfd, *tfd_tmp; 458 struct iwl_tfd *tfd, *tfd_tmp;
@@ -1363,7 +1363,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1363 memcpy(&txq->scratchbufs[q->write_ptr], &out_cmd->hdr, scratch_size); 1363 memcpy(&txq->scratchbufs[q->write_ptr], &out_cmd->hdr, scratch_size);
1364 iwl_pcie_txq_build_tfd(trans, txq, 1364 iwl_pcie_txq_build_tfd(trans, txq,
1365 iwl_pcie_get_scratchbuf_dma(txq, q->write_ptr), 1365 iwl_pcie_get_scratchbuf_dma(txq, q->write_ptr),
1366 scratch_size, 1); 1366 scratch_size, true);
1367 1367
1368 /* map first command fragment, if any remains */ 1368 /* map first command fragment, if any remains */
1369 if (copy_size > scratch_size) { 1369 if (copy_size > scratch_size) {
@@ -1379,7 +1379,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1379 } 1379 }
1380 1380
1381 iwl_pcie_txq_build_tfd(trans, txq, phys_addr, 1381 iwl_pcie_txq_build_tfd(trans, txq, phys_addr,
1382 copy_size - scratch_size, 0); 1382 copy_size - scratch_size, false);
1383 } 1383 }
1384 1384
1385 /* map the remaining (adjusted) nocopy/dup fragments */ 1385 /* map the remaining (adjusted) nocopy/dup fragments */
@@ -1402,7 +1402,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1402 goto out; 1402 goto out;
1403 } 1403 }
1404 1404
1405 iwl_pcie_txq_build_tfd(trans, txq, phys_addr, cmdlen[i], 0); 1405 iwl_pcie_txq_build_tfd(trans, txq, phys_addr, cmdlen[i], false);
1406 } 1406 }
1407 1407
1408 out_meta->flags = cmd->flags; 1408 out_meta->flags = cmd->flags;
@@ -1740,7 +1740,7 @@ int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
1740 memcpy(&txq->scratchbufs[q->write_ptr], &dev_cmd->hdr, 1740 memcpy(&txq->scratchbufs[q->write_ptr], &dev_cmd->hdr,
1741 IWL_HCMD_SCRATCHBUF_SIZE); 1741 IWL_HCMD_SCRATCHBUF_SIZE);
1742 iwl_pcie_txq_build_tfd(trans, txq, tb0_phys, 1742 iwl_pcie_txq_build_tfd(trans, txq, tb0_phys,
1743 IWL_HCMD_SCRATCHBUF_SIZE, 1); 1743 IWL_HCMD_SCRATCHBUF_SIZE, true);
1744 1744
1745 /* there must be data left over for TB1 or this code must be changed */ 1745 /* there must be data left over for TB1 or this code must be changed */
1746 BUILD_BUG_ON(sizeof(struct iwl_tx_cmd) < IWL_HCMD_SCRATCHBUF_SIZE); 1746 BUILD_BUG_ON(sizeof(struct iwl_tx_cmd) < IWL_HCMD_SCRATCHBUF_SIZE);
@@ -1750,7 +1750,7 @@ int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
1750 tb1_phys = dma_map_single(trans->dev, tb1_addr, tb1_len, DMA_TO_DEVICE); 1750 tb1_phys = dma_map_single(trans->dev, tb1_addr, tb1_len, DMA_TO_DEVICE);
1751 if (unlikely(dma_mapping_error(trans->dev, tb1_phys))) 1751 if (unlikely(dma_mapping_error(trans->dev, tb1_phys)))
1752 goto out_err; 1752 goto out_err;
1753 iwl_pcie_txq_build_tfd(trans, txq, tb1_phys, tb1_len, 0); 1753 iwl_pcie_txq_build_tfd(trans, txq, tb1_phys, tb1_len, false);
1754 1754
1755 /* 1755 /*
1756 * Set up TFD's third entry to point directly to remainder 1756 * Set up TFD's third entry to point directly to remainder
@@ -1766,7 +1766,7 @@ int iwl_trans_pcie_tx(struct iwl_trans *trans, struct sk_buff *skb,
1766 &txq->tfds[q->write_ptr]); 1766 &txq->tfds[q->write_ptr]);
1767 goto out_err; 1767 goto out_err;
1768 } 1768 }
1769 iwl_pcie_txq_build_tfd(trans, txq, tb2_phys, tb2_len, 0); 1769 iwl_pcie_txq_build_tfd(trans, txq, tb2_phys, tb2_len, false);
1770 } 1770 }
1771 1771
1772 /* Set up entry for this TFD in Tx byte-count array */ 1772 /* Set up entry for this TFD in Tx byte-count array */