aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl4965-base.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 06:30:17 -0500
committerStanislaw Gruszka <sgruszka@redhat.com>2011-11-15 06:30:17 -0500
commit0c2c885200057c44ac5660d123e199192689ca5d (patch)
treeca4d8a59465b35247f0ea434a4ef25f260f9303b /drivers/net/wireless/iwlegacy/iwl4965-base.c
parent2d09b0624a1048f6424b2c7ff60ad3a42d8036ff (diff)
iwlegacy: s/index/idx/
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index bc5a0080b9d3..afdec783333c 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -173,7 +173,7 @@ static void il4965_set_beacon_tim(struct il_priv *il,
173 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)beacon; 173 struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)beacon;
174 174
175 /* 175 /*
176 * The index is relative to frame start but we start looking at the 176 * The idx is relative to frame start but we start looking at the
177 * variable-length part of the beacon. 177 * variable-length part of the beacon.
178 */ 178 */
179 tim_idx = mgmt->u.beacon.variable - beacon; 179 tim_idx = mgmt->u.beacon.variable - beacon;
@@ -318,7 +318,7 @@ static inline u8 il4965_tfd_get_num_tbs(struct il_tfd *tfd)
318 * @il - driver ilate data 318 * @il - driver ilate data
319 * @txq - tx queue 319 * @txq - tx queue
320 * 320 *
321 * Does NOT advance any TFD circular buffer read/write indexes 321 * Does NOT advance any TFD circular buffer read/write idxes
322 * Does NOT free the TFD itself (which is within circular buffer) 322 * Does NOT free the TFD itself (which is within circular buffer)
323 */ 323 */
324void il4965_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq) 324void il4965_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq)
@@ -326,11 +326,11 @@ void il4965_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq)
326 struct il_tfd *tfd_tmp = (struct il_tfd *)txq->tfds; 326 struct il_tfd *tfd_tmp = (struct il_tfd *)txq->tfds;
327 struct il_tfd *tfd; 327 struct il_tfd *tfd;
328 struct pci_dev *dev = il->pci_dev; 328 struct pci_dev *dev = il->pci_dev;
329 int index = txq->q.read_ptr; 329 int idx = txq->q.read_ptr;
330 int i; 330 int i;
331 int num_tbs; 331 int num_tbs;
332 332
333 tfd = &tfd_tmp[index]; 333 tfd = &tfd_tmp[idx];
334 334
335 /* Sanity check on number of chunks */ 335 /* Sanity check on number of chunks */
336 num_tbs = il4965_tfd_get_num_tbs(tfd); 336 num_tbs = il4965_tfd_get_num_tbs(tfd);
@@ -344,8 +344,8 @@ void il4965_hw_txq_free_tfd(struct il_priv *il, struct il_tx_queue *txq)
344 /* Unmap tx_cmd */ 344 /* Unmap tx_cmd */
345 if (num_tbs) 345 if (num_tbs)
346 pci_unmap_single(dev, 346 pci_unmap_single(dev,
347 dma_unmap_addr(&txq->meta[index], mapping), 347 dma_unmap_addr(&txq->meta[idx], mapping),
348 dma_unmap_len(&txq->meta[index], len), 348 dma_unmap_len(&txq->meta[idx], len),
349 PCI_DMA_BIDIRECTIONAL); 349 PCI_DMA_BIDIRECTIONAL);
350 350
351 /* Unmap chunks, if any. */ 351 /* Unmap chunks, if any. */
@@ -643,7 +643,7 @@ void il4965_rx_handle(struct il_priv *il)
643 u32 count = 8; 643 u32 count = 8;
644 int total_empty; 644 int total_empty;
645 645
646 /* uCode's read index (stored in shared DRAM) indicates the last Rx 646 /* uCode's read idx (stored in shared DRAM) indicates the last Rx
647 * buffer that the driver may process (last buffer filled by ucode). */ 647 * buffer that the driver may process (last buffer filled by ucode). */
648 r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; 648 r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF;
649 i = rxq->read; 649 i = rxq->read;
@@ -1106,14 +1106,14 @@ static int __must_check il4965_request_firmware(struct il_priv *il, bool first)
1106 char tag[8]; 1106 char tag[8];
1107 1107
1108 if (first) { 1108 if (first) {
1109 il->fw_index = il->cfg->ucode_api_max; 1109 il->fw_idx = il->cfg->ucode_api_max;
1110 sprintf(tag, "%d", il->fw_index); 1110 sprintf(tag, "%d", il->fw_idx);
1111 } else { 1111 } else {
1112 il->fw_index--; 1112 il->fw_idx--;
1113 sprintf(tag, "%d", il->fw_index); 1113 sprintf(tag, "%d", il->fw_idx);
1114 } 1114 }
1115 1115
1116 if (il->fw_index < il->cfg->ucode_api_min) { 1116 if (il->fw_idx < il->cfg->ucode_api_min) {
1117 IL_ERR("no suitable firmware found!\n"); 1117 IL_ERR("no suitable firmware found!\n");
1118 return -ENOENT; 1118 return -ENOENT;
1119 } 1119 }
@@ -1213,7 +1213,7 @@ il4965_ucode_callback(const struct firmware *ucode_raw, void *context)
1213 memset(&pieces, 0, sizeof(pieces)); 1213 memset(&pieces, 0, sizeof(pieces));
1214 1214
1215 if (!ucode_raw) { 1215 if (!ucode_raw) {
1216 if (il->fw_index <= il->cfg->ucode_api_max) 1216 if (il->fw_idx <= il->cfg->ucode_api_max)
1217 IL_ERR( 1217 IL_ERR(
1218 "request for firmware file '%s' failed.\n", 1218 "request for firmware file '%s' failed.\n",
1219 il->firmware_name); 1219 il->firmware_name);
@@ -1655,7 +1655,7 @@ static int il4965_alive_notify(struct il_priv *il)
1655 /* Initialize each Tx queue (including the command queue) */ 1655 /* Initialize each Tx queue (including the command queue) */
1656 for (i = 0; i < il->hw_params.max_txq_num; i++) { 1656 for (i = 0; i < il->hw_params.max_txq_num; i++) {
1657 1657
1658 /* TFD circular buffer read/write indexes */ 1658 /* TFD circular buffer read/write idxes */
1659 il_wr_prph(il, IL49_SCD_QUEUE_RDPTR(i), 0); 1659 il_wr_prph(il, IL49_SCD_QUEUE_RDPTR(i), 0);
1660 il_wr(il, HBUS_TARG_WRPTR, 0 | (i << 8)); 1660 il_wr(il, HBUS_TARG_WRPTR, 0 | (i << 8));
1661 1661
@@ -2713,7 +2713,7 @@ static void il4965_init_hw_rates(struct il_priv *il,
2713 2713
2714 for (i = 0; i < RATE_COUNT_LEGACY; i++) { 2714 for (i = 0; i < RATE_COUNT_LEGACY; i++) {
2715 rates[i].bitrate = il_rates[i].ieee * 5; 2715 rates[i].bitrate = il_rates[i].ieee * 5;
2716 rates[i].hw_value = i; /* Rate scaling will work on indexes */ 2716 rates[i].hw_value = i; /* Rate scaling will work on idxes */
2717 rates[i].hw_value_short = i; 2717 rates[i].hw_value_short = i;
2718 rates[i].flags = 0; 2718 rates[i].flags = 0;
2719 if ((i >= IL_FIRST_CCK_RATE) && (i <= IL_LAST_CCK_RATE)) { 2719 if ((i >= IL_FIRST_CCK_RATE) && (i <= IL_LAST_CCK_RATE)) {
@@ -2729,11 +2729,11 @@ static void il4965_init_hw_rates(struct il_priv *il,
2729/* 2729/*
2730 * Acquire il->lock before calling this function ! 2730 * Acquire il->lock before calling this function !
2731 */ 2731 */
2732void il4965_set_wr_ptrs(struct il_priv *il, int txq_id, u32 index) 2732void il4965_set_wr_ptrs(struct il_priv *il, int txq_id, u32 idx)
2733{ 2733{
2734 il_wr(il, HBUS_TARG_WRPTR, 2734 il_wr(il, HBUS_TARG_WRPTR,
2735 (index & 0xff) | (txq_id << 8)); 2735 (idx & 0xff) | (txq_id << 8));
2736 il_wr_prph(il, IL49_SCD_QUEUE_RDPTR(txq_id), index); 2736 il_wr_prph(il, IL49_SCD_QUEUE_RDPTR(txq_id), idx);
2737} 2737}
2738 2738
2739void il4965_tx_queue_set_status(struct il_priv *il, 2739void il4965_tx_queue_set_status(struct il_priv *il,