aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/pcie
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-26 05:32:26 -0500
committerJohannes Berg <johannes.berg@intel.com>2013-02-28 05:48:51 -0500
commit1afbfb6041fb8f639e742620ad933c347e14ba2c (patch)
tree028e6a718d1f338ba5f53d980294393e9251d4ed /drivers/net/wireless/iwlwifi/pcie
parent98891754ea9453de4db9111c91b20122ca330101 (diff)
iwlwifi: rename IWL_MAX_CMD_TFDS to IWL_MAX_CMD_TBS_PER_TFD
The IWL_MAX_CMD_TFDS name for this constant is wrong, the constant really indicates how many TBs we can use in the driver for a single command TFD, rename the constant and also add a comment explaining it. Reviewed-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/tx.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c
index 975492f0b8c8..ff80a7e55f00 100644
--- a/drivers/net/wireless/iwlwifi/pcie/tx.c
+++ b/drivers/net/wireless/iwlwifi/pcie/tx.c
@@ -1146,16 +1146,16 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1146 bool had_nocopy = false; 1146 bool had_nocopy = false;
1147 int i; 1147 int i;
1148 u32 cmd_pos; 1148 u32 cmd_pos;
1149 const u8 *cmddata[IWL_MAX_CMD_TFDS]; 1149 const u8 *cmddata[IWL_MAX_CMD_TBS_PER_TFD];
1150 u16 cmdlen[IWL_MAX_CMD_TFDS]; 1150 u16 cmdlen[IWL_MAX_CMD_TBS_PER_TFD];
1151 1151
1152 copy_size = sizeof(out_cmd->hdr); 1152 copy_size = sizeof(out_cmd->hdr);
1153 cmd_size = sizeof(out_cmd->hdr); 1153 cmd_size = sizeof(out_cmd->hdr);
1154 1154
1155 /* need one for the header if the first is NOCOPY */ 1155 /* need one for the header if the first is NOCOPY */
1156 BUILD_BUG_ON(IWL_MAX_CMD_TFDS > IWL_NUM_OF_TBS - 1); 1156 BUILD_BUG_ON(IWL_MAX_CMD_TBS_PER_TFD > IWL_NUM_OF_TBS - 1);
1157 1157
1158 for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { 1158 for (i = 0; i < IWL_MAX_CMD_TBS_PER_TFD; i++) {
1159 cmddata[i] = cmd->data[i]; 1159 cmddata[i] = cmd->data[i];
1160 cmdlen[i] = cmd->len[i]; 1160 cmdlen[i] = cmd->len[i];
1161 1161
@@ -1250,7 +1250,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1250 /* and copy the data that needs to be copied */ 1250 /* and copy the data that needs to be copied */
1251 cmd_pos = offsetof(struct iwl_device_cmd, payload); 1251 cmd_pos = offsetof(struct iwl_device_cmd, payload);
1252 copy_size = sizeof(out_cmd->hdr); 1252 copy_size = sizeof(out_cmd->hdr);
1253 for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { 1253 for (i = 0; i < IWL_MAX_CMD_TBS_PER_TFD; i++) {
1254 int copy = 0; 1254 int copy = 0;
1255 1255
1256 if (!cmd->len) 1256 if (!cmd->len)
@@ -1319,7 +1319,7 @@ static int iwl_pcie_enqueue_hcmd(struct iwl_trans *trans,
1319 iwl_pcie_txq_build_tfd(trans, txq, phys_addr, copy_size, 1); 1319 iwl_pcie_txq_build_tfd(trans, txq, phys_addr, copy_size, 1);
1320 1320
1321 /* map the remaining (adjusted) nocopy/dup fragments */ 1321 /* map the remaining (adjusted) nocopy/dup fragments */
1322 for (i = 0; i < IWL_MAX_CMD_TFDS; i++) { 1322 for (i = 0; i < IWL_MAX_CMD_TBS_PER_TFD; i++) {
1323 const void *data = cmddata[i]; 1323 const void *data = cmddata[i];
1324 1324
1325 if (!cmdlen[i]) 1325 if (!cmdlen[i])