diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/iwl3945-base.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl3945-base.c b/drivers/net/wireless/iwlegacy/iwl3945-base.c index 017b29720423..924420870a2f 100644 --- a/drivers/net/wireless/iwlegacy/iwl3945-base.c +++ b/drivers/net/wireless/iwlegacy/iwl3945-base.c | |||
@@ -163,7 +163,7 @@ static int il3945_set_ccmp_dynamic_key_info(struct il_priv *il, | |||
163 | if ((il->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK) | 163 | if ((il->stations[sta_id].sta.key.key_flags & STA_KEY_FLG_ENCRYPT_MSK) |
164 | == STA_KEY_FLG_NO_ENC) | 164 | == STA_KEY_FLG_NO_ENC) |
165 | il->stations[sta_id].sta.key.key_offset = | 165 | il->stations[sta_id].sta.key.key_offset = |
166 | il_get_free_ucode_key_index(il); | 166 | il_get_free_ucode_key_idx(il); |
167 | /* else, we are overriding an existing key => no need to allocated room | 167 | /* else, we are overriding an existing key => no need to allocated room |
168 | * in uCode. */ | 168 | * in uCode. */ |
169 | 169 | ||
@@ -513,7 +513,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
513 | 513 | ||
514 | hdr_len = ieee80211_hdrlen(fc); | 514 | hdr_len = ieee80211_hdrlen(fc); |
515 | 515 | ||
516 | /* Find index into station table for destination station */ | 516 | /* Find idx into station table for destination station */ |
517 | sta_id = il_sta_id_or_broadcast( | 517 | sta_id = il_sta_id_or_broadcast( |
518 | il, &il->ctx, | 518 | il, &il->ctx, |
519 | info->control.sta); | 519 | info->control.sta); |
@@ -541,7 +541,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
541 | 541 | ||
542 | spin_lock_irqsave(&il->lock, flags); | 542 | spin_lock_irqsave(&il->lock, flags); |
543 | 543 | ||
544 | idx = il_get_cmd_index(q, q->write_ptr, 0); | 544 | idx = il_get_cmd_idx(q, q->write_ptr, 0); |
545 | 545 | ||
546 | /* Set up driver data for this TFD */ | 546 | /* Set up driver data for this TFD */ |
547 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct il_tx_info)); | 547 | memset(&(txq->txb[q->write_ptr]), 0, sizeof(struct il_tx_info)); |
@@ -557,7 +557,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
557 | 557 | ||
558 | /* | 558 | /* |
559 | * Set up the Tx-command (not MAC!) header. | 559 | * Set up the Tx-command (not MAC!) header. |
560 | * Store the chosen Tx queue and TFD index within the sequence field; | 560 | * Store the chosen Tx queue and TFD idx within the sequence field; |
561 | * after Tx, uCode's Tx response will return this value so driver can | 561 | * after Tx, uCode's Tx response will return this value so driver can |
562 | * locate the frame within the tx queue and do post-tx processing. | 562 | * locate the frame within the tx queue and do post-tx processing. |
563 | */ | 563 | */ |
@@ -641,7 +641,7 @@ static int il3945_tx_skb(struct il_priv *il, struct sk_buff *skb) | |||
641 | } | 641 | } |
642 | 642 | ||
643 | 643 | ||
644 | /* Tell device the write index *just past* this latest filled TFD */ | 644 | /* Tell device the write idx *just past* this latest filled TFD */ |
645 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); | 645 | q->write_ptr = il_queue_inc_wrap(q->write_ptr, q->n_bd); |
646 | il_txq_update_write_ptr(il, txq); | 646 | il_txq_update_write_ptr(il, txq); |
647 | spin_unlock_irqrestore(&il->lock, flags); | 647 | spin_unlock_irqrestore(&il->lock, flags); |
@@ -889,14 +889,14 @@ static void il3945_setup_rx_handlers(struct il_priv *il) | |||
889 | * 0 to 31 | 889 | * 0 to 31 |
890 | * | 890 | * |
891 | * Rx Queue Indexes | 891 | * Rx Queue Indexes |
892 | * The host/firmware share two index registers for managing the Rx buffers. | 892 | * The host/firmware share two idx registers for managing the Rx buffers. |
893 | * | 893 | * |
894 | * The READ index maps to the first position that the firmware may be writing | 894 | * The READ idx maps to the first position that the firmware may be writing |
895 | * to -- the driver can read up to (but not including) this position and get | 895 | * to -- the driver can read up to (but not including) this position and get |
896 | * good data. | 896 | * good data. |
897 | * The READ index is managed by the firmware once the card is enabled. | 897 | * The READ idx is managed by the firmware once the card is enabled. |
898 | * | 898 | * |
899 | * The WRITE index maps to the last position the driver has read from -- the | 899 | * The WRITE idx maps to the last position the driver has read from -- the |
900 | * position preceding WRITE is the last slot the firmware can place a packet. | 900 | * position preceding WRITE is the last slot the firmware can place a packet. |
901 | * | 901 | * |
902 | * The queue is empty (no good data) if WRITE = READ - 1, and is full if | 902 | * The queue is empty (no good data) if WRITE = READ - 1, and is full if |
@@ -905,9 +905,9 @@ static void il3945_setup_rx_handlers(struct il_priv *il) | |||
905 | * During initialization, the host sets up the READ queue position to the first | 905 | * During initialization, the host sets up the READ queue position to the first |
906 | * IDX position, and WRITE to the last (READ - 1 wrapped) | 906 | * IDX position, and WRITE to the last (READ - 1 wrapped) |
907 | * | 907 | * |
908 | * When the firmware places a packet in a buffer, it will advance the READ index | 908 | * When the firmware places a packet in a buffer, it will advance the READ idx |
909 | * and fire the RX interrupt. The driver can then query the READ index and | 909 | * and fire the RX interrupt. The driver can then query the READ idx and |
910 | * process as many packets as possible, moving the WRITE index forward as it | 910 | * process as many packets as possible, moving the WRITE idx forward as it |
911 | * resets the Rx queue buffers with new memory. | 911 | * resets the Rx queue buffers with new memory. |
912 | * | 912 | * |
913 | * The management in the driver is as follows: | 913 | * The management in the driver is as follows: |
@@ -916,9 +916,9 @@ static void il3945_setup_rx_handlers(struct il_priv *il) | |||
916 | * to replenish the iwl->rxq->rx_free. | 916 | * to replenish the iwl->rxq->rx_free. |
917 | * + In il3945_rx_replenish (scheduled) if 'processed' != 'read' then the | 917 | * + In il3945_rx_replenish (scheduled) if 'processed' != 'read' then the |
918 | * iwl->rxq is replenished and the READ IDX is updated (updating the | 918 | * iwl->rxq is replenished and the READ IDX is updated (updating the |
919 | * 'processed' and 'read' driver indexes as well) | 919 | * 'processed' and 'read' driver idxes as well) |
920 | * + A received packet is processed and handed to the kernel network stack, | 920 | * + A received packet is processed and handed to the kernel network stack, |
921 | * detached from the iwl->rxq. The driver 'processed' index is updated. | 921 | * detached from the iwl->rxq. The driver 'processed' idx is updated. |
922 | * + The Host/Firmware iwl->rxq is replenished at tasklet time from the rx_free | 922 | * + The Host/Firmware iwl->rxq is replenished at tasklet time from the rx_free |
923 | * list. If there are no allocated buffers in iwl->rxq->rx_free, the READ | 923 | * list. If there are no allocated buffers in iwl->rxq->rx_free, the READ |
924 | * IDX is not incremented and iwl->status(RX_STALLED) is set. If there | 924 | * IDX is not incremented and iwl->status(RX_STALLED) is set. If there |
@@ -931,7 +931,7 @@ static void il3945_setup_rx_handlers(struct il_priv *il) | |||
931 | * il3945_rx_queue_restock | 931 | * il3945_rx_queue_restock |
932 | * il3945_rx_queue_restock() Moves available buffers from rx_free into Rx | 932 | * il3945_rx_queue_restock() Moves available buffers from rx_free into Rx |
933 | * queue, updates firmware pointers, and updates | 933 | * queue, updates firmware pointers, and updates |
934 | * the WRITE index. If insufficient rx_free buffers | 934 | * the WRITE idx. If insufficient rx_free buffers |
935 | * are available, schedules il3945_rx_replenish | 935 | * are available, schedules il3945_rx_replenish |
936 | * | 936 | * |
937 | * -- enable interrupts -- | 937 | * -- enable interrupts -- |
@@ -960,7 +960,7 @@ static inline __le32 il3945_dma_addr2rbd_ptr(struct il_priv *il, | |||
960 | * and we have free pre-allocated buffers, fill the ranks as much | 960 | * and we have free pre-allocated buffers, fill the ranks as much |
961 | * as we can, pulling from rx_free. | 961 | * as we can, pulling from rx_free. |
962 | * | 962 | * |
963 | * This moves the 'write' index forward to catch up with 'processed', and | 963 | * This moves the 'write' idx forward to catch up with 'processed', and |
964 | * also updates the memory address in the firmware to reference the new | 964 | * also updates the memory address in the firmware to reference the new |
965 | * target buffer. | 965 | * target buffer. |
966 | */ | 966 | */ |
@@ -1211,7 +1211,7 @@ static void il3945_rx_handle(struct il_priv *il) | |||
1211 | u32 count = 8; | 1211 | u32 count = 8; |
1212 | int total_empty = 0; | 1212 | int total_empty = 0; |
1213 | 1213 | ||
1214 | /* uCode's read index (stored in shared DRAM) indicates the last Rx | 1214 | /* uCode's read idx (stored in shared DRAM) indicates the last Rx |
1215 | * buffer that the driver may process (last buffer filled by ucode). */ | 1215 | * buffer that the driver may process (last buffer filled by ucode). */ |
1216 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; | 1216 | r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF; |
1217 | i = rxq->read; | 1217 | i = rxq->read; |
@@ -1656,7 +1656,7 @@ static void il3945_init_hw_rates(struct il_priv *il, | |||
1656 | 1656 | ||
1657 | for (i = 0; i < RATE_COUNT_LEGACY; i++) { | 1657 | for (i = 0; i < RATE_COUNT_LEGACY; i++) { |
1658 | rates[i].bitrate = il3945_rates[i].ieee * 5; | 1658 | rates[i].bitrate = il3945_rates[i].ieee * 5; |
1659 | rates[i].hw_value = i; /* Rate scaling will work on indexes */ | 1659 | rates[i].hw_value = i; /* Rate scaling will work on idxes */ |
1660 | rates[i].hw_value_short = i; | 1660 | rates[i].hw_value_short = i; |
1661 | rates[i].flags = 0; | 1661 | rates[i].flags = 0; |
1662 | if (i > IL39_LAST_OFDM_RATE || i < IL_FIRST_OFDM_RATE) { | 1662 | if (i > IL39_LAST_OFDM_RATE || i < IL_FIRST_OFDM_RATE) { |
@@ -1850,7 +1850,7 @@ IL3945_UCODE_GET(boot_size); | |||
1850 | static int il3945_read_ucode(struct il_priv *il) | 1850 | static int il3945_read_ucode(struct il_priv *il) |
1851 | { | 1851 | { |
1852 | const struct il_ucode_header *ucode; | 1852 | const struct il_ucode_header *ucode; |
1853 | int ret = -EINVAL, index; | 1853 | int ret = -EINVAL, idx; |
1854 | const struct firmware *ucode_raw; | 1854 | const struct firmware *ucode_raw; |
1855 | /* firmware file name contains uCode/driver compatibility version */ | 1855 | /* firmware file name contains uCode/driver compatibility version */ |
1856 | const char *name_pre = il->cfg->fw_name_pre; | 1856 | const char *name_pre = il->cfg->fw_name_pre; |
@@ -1863,8 +1863,8 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1863 | 1863 | ||
1864 | /* Ask kernel firmware_class module to get the boot firmware off disk. | 1864 | /* Ask kernel firmware_class module to get the boot firmware off disk. |
1865 | * request_firmware() is synchronous, file is in memory on return. */ | 1865 | * request_firmware() is synchronous, file is in memory on return. */ |
1866 | for (index = api_max; index >= api_min; index--) { | 1866 | for (idx = api_max; idx >= api_min; idx--) { |
1867 | sprintf(buf, "%s%u%s", name_pre, index, ".ucode"); | 1867 | sprintf(buf, "%s%u%s", name_pre, idx, ".ucode"); |
1868 | ret = request_firmware(&ucode_raw, buf, &il->pci_dev->dev); | 1868 | ret = request_firmware(&ucode_raw, buf, &il->pci_dev->dev); |
1869 | if (ret < 0) { | 1869 | if (ret < 0) { |
1870 | IL_ERR("%s firmware file req failed: %d\n", | 1870 | IL_ERR("%s firmware file req failed: %d\n", |
@@ -1874,7 +1874,7 @@ static int il3945_read_ucode(struct il_priv *il) | |||
1874 | else | 1874 | else |
1875 | goto error; | 1875 | goto error; |
1876 | } else { | 1876 | } else { |
1877 | if (index < api_max) | 1877 | if (idx < api_max) |
1878 | IL_ERR("Loaded firmware %s, " | 1878 | IL_ERR("Loaded firmware %s, " |
1879 | "which is deprecated. " | 1879 | "which is deprecated. " |
1880 | " Please use API v%u instead.\n", | 1880 | " Please use API v%u instead.\n", |