aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
authorBen Cahill <ben.m.cahill@intel.com>2007-11-28 22:09:47 -0500
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:05:17 -0500
commit9fbab5163aa8cb3a5aef845fbf67b0c1c85030b6 (patch)
tree6e078dc2ea37ea4aff9b2fb262ef278ae12b61b5 /drivers/net/wireless/iwlwifi/iwl3945-base.c
parent40ac81a35c3a19f6a78f0a9f58368d36048df35b (diff)
iwlwifi: clean up and clarify some comments after 3945/4965 split
Clean up and clarify some comments after 3945/4965 split. Signed-off-by: Ben Cahill <ben.m.cahill@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c126
1 files changed, 47 insertions, 79 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index e8d198047185..ba5146ffdf4d 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -27,16 +27,6 @@
27 * 27 *
28 *****************************************************************************/ 28 *****************************************************************************/
29 29
30/*
31 * NOTE: This file (iwl-base.c) is used to build to multiple hardware targets
32 * by defining IWL to either 3945 or 4965. The Makefile used when building
33 * the base targets will create base-3945.o and base-4965.o
34 *
35 * The eventual goal is to move as many of the #if IWL / #endif blocks out of
36 * this file and into the hardware specific implementation files (iwl-XXXX.c)
37 * and leave only the common (non #ifdef sprinkled) code in this file
38 */
39
40#include <linux/kernel.h> 30#include <linux/kernel.h>
41#include <linux/module.h> 31#include <linux/module.h>
42#include <linux/version.h> 32#include <linux/version.h>
@@ -75,9 +65,9 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv,
75/* module parameters */ 65/* module parameters */
76static int iwl3945_param_disable_hw_scan; 66static int iwl3945_param_disable_hw_scan;
77static int iwl3945_param_debug; 67static int iwl3945_param_debug;
78static int iwl3945_param_disable; /* def: enable radio */ 68static int iwl3945_param_disable; /* def: enable radio */
79static int iwl3945_param_antenna; /* def: 0 = both antennas (use diversity) */ 69static int iwl3945_param_antenna; /* def: 0 = both antennas (use diversity) */
80int iwl3945_param_hwcrypto; /* def: using software encryption */ 70int iwl3945_param_hwcrypto; /* def: using software encryption */
81static int iwl3945_param_qos_enable = 1; 71static int iwl3945_param_qos_enable = 1;
82int iwl3945_param_queues_num = IWL_MAX_NUM_QUEUES; 72int iwl3945_param_queues_num = IWL_MAX_NUM_QUEUES;
83 73
@@ -396,11 +386,7 @@ void iwl3945_tx_queue_free(struct iwl3945_priv *priv, struct iwl3945_tx_queue *t
396const u8 iwl3945_broadcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }; 386const u8 iwl3945_broadcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
397 387
398/*************** STATION TABLE MANAGEMENT **** 388/*************** STATION TABLE MANAGEMENT ****
399 * 389 * mac80211 should be examined to determine if sta_info is duplicating
400 * NOTE: This needs to be overhauled to better synchronize between
401 * how the iwl-4965.c is using iwl3945_hw_find_station vs. iwl-3945.c
402 *
403 * mac80211 should also be examined to determine if sta_info is duplicating
404 * the functionality provided here 390 * the functionality provided here
405 */ 391 */
406 392
@@ -956,12 +942,12 @@ static int iwl3945_check_rxon_cmd(struct iwl3945_rxon_cmd *rxon)
956} 942}
957 943
958/** 944/**
959 * iwl3945_full_rxon_required - determine if RXON_ASSOC can be used in RXON commit 945 * iwl3945_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed
960 * @priv: staging_rxon is compared to active_rxon 946 * @priv: staging_rxon is compared to active_rxon
961 * 947 *
962 * If the RXON structure is changing sufficient to require a new 948 * If the RXON structure is changing enough to require a new tune,
963 * tune or to clear and reset the RXON_FILTER_ASSOC_MSK then return 1 949 * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that
964 * to indicate a new tune is required. 950 * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required.
965 */ 951 */
966static int iwl3945_full_rxon_required(struct iwl3945_priv *priv) 952static int iwl3945_full_rxon_required(struct iwl3945_priv *priv)
967{ 953{
@@ -1235,7 +1221,7 @@ static int iwl3945_card_state_sync_callback(struct iwl3945_priv *priv,
1235/* 1221/*
1236 * CARD_STATE_CMD 1222 * CARD_STATE_CMD
1237 * 1223 *
1238 * Use: Sets the internal card state to enable, disable, or halt 1224 * Use: Sets the device's internal card state to enable, disable, or halt
1239 * 1225 *
1240 * When in the 'enable' state the card operates as normal. 1226 * When in the 'enable' state the card operates as normal.
1241 * When in the 'disable' state, the card enters into a low power mode. 1227 * When in the 'disable' state, the card enters into a low power mode.
@@ -1589,14 +1575,9 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
1589/** 1575/**
1590 * iwl3945_report_frame - dump frame to syslog during debug sessions 1576 * iwl3945_report_frame - dump frame to syslog during debug sessions
1591 * 1577 *
1592 * hack this function to show different aspects of received frames, 1578 * You may hack this function to show different aspects of received frames,
1593 * including selective frame dumps. 1579 * including selective frame dumps.
1594 * group100 parameter selects whether to show 1 out of 100 good frames. 1580 * group100 parameter selects whether to show 1 out of 100 good frames.
1595 *
1596 * TODO: ieee80211_hdr stuff is common to 3945 and 4965, so frame type
1597 * info output is okay, but some of this stuff (e.g. iwl3945_rx_frame_stats)
1598 * is 3945-specific and gives bad output for 4965. Need to split the
1599 * functionality, keep common stuff here.
1600 */ 1581 */
1601void iwl3945_report_frame(struct iwl3945_priv *priv, 1582void iwl3945_report_frame(struct iwl3945_priv *priv,
1602 struct iwl3945_rx_packet *pkt, 1583 struct iwl3945_rx_packet *pkt,
@@ -3775,13 +3756,10 @@ static void iwl3945_setup_rx_handlers(struct iwl3945_priv *priv)
3775 iwl3945_rx_pm_debug_statistics_notif; 3756 iwl3945_rx_pm_debug_statistics_notif;
3776 priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif; 3757 priv->rx_handlers[BEACON_NOTIFICATION] = iwl3945_rx_beacon_notif;
3777 3758
3778 /* NOTE: iwl3945_rx_statistics is different based on whether 3759 /*
3779 * the build is for the 3945 or the 4965. See the 3760 * The same handler is used for both the REPLY to a discrete
3780 * corresponding implementation in iwl-XXXX.c 3761 * statistics request from the host as well as for the periodic
3781 * 3762 * statistics notifications (after received beacons) from the uCode.
3782 * The same handler is used for both the REPLY to a
3783 * discrete statistics request from the host as well as
3784 * for the periodic statistics notification from the uCode
3785 */ 3763 */
3786 priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl3945_hw_rx_statistics; 3764 priv->rx_handlers[REPLY_STATISTICS_CMD] = iwl3945_hw_rx_statistics;
3787 priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl3945_hw_rx_statistics; 3765 priv->rx_handlers[STATISTICS_NOTIFICATION] = iwl3945_hw_rx_statistics;
@@ -3795,7 +3773,7 @@ static void iwl3945_setup_rx_handlers(struct iwl3945_priv *priv)
3795 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl3945_rx_card_state_notif; 3773 priv->rx_handlers[CARD_STATE_NOTIFICATION] = iwl3945_rx_card_state_notif;
3796 priv->rx_handlers[REPLY_TX] = iwl3945_rx_reply_tx; 3774 priv->rx_handlers[REPLY_TX] = iwl3945_rx_reply_tx;
3797 3775
3798 /* Setup hardware specific Rx handlers */ 3776 /* Set up hardware specific Rx handlers */
3799 iwl3945_hw_rx_handler_setup(priv); 3777 iwl3945_hw_rx_handler_setup(priv);
3800} 3778}
3801 3779
@@ -3867,10 +3845,10 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
3867 * The queue is empty (no good data) if WRITE = READ - 1, and is full if 3845 * The queue is empty (no good data) if WRITE = READ - 1, and is full if
3868 * WRITE = READ. 3846 * WRITE = READ.
3869 * 3847 *
3870 * During initialization the host sets up the READ queue position to the first 3848 * During initialization, the host sets up the READ queue position to the first
3871 * INDEX position, and WRITE to the last (READ - 1 wrapped) 3849 * INDEX position, and WRITE to the last (READ - 1 wrapped)
3872 * 3850 *
3873 * When the firmware places a packet in a buffer it will advance the READ index 3851 * When the firmware places a packet in a buffer, it will advance the READ index
3874 * and fire the RX interrupt. The driver can then query the READ index and 3852 * and fire the RX interrupt. The driver can then query the READ index and
3875 * process as many packets as possible, moving the WRITE index forward as it 3853 * process as many packets as possible, moving the WRITE index forward as it
3876 * resets the Rx queue buffers with new memory. 3854 * resets the Rx queue buffers with new memory.
@@ -3892,16 +3870,16 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
3892 * 3870 *
3893 * Driver sequence: 3871 * Driver sequence:
3894 * 3872 *
3895 * iwl3945_rx_queue_alloc() Allocates rx_free 3873 * iwl3945_rx_queue_alloc() Allocates rx_free
3896 * iwl3945_rx_replenish() Replenishes rx_free list from rx_used, and calls 3874 * iwl3945_rx_replenish() Replenishes rx_free list from rx_used, and calls
3897 * iwl3945_rx_queue_restock 3875 * iwl3945_rx_queue_restock
3898 * iwl3945_rx_queue_restock() Moves available buffers from rx_free into Rx 3876 * iwl3945_rx_queue_restock() Moves available buffers from rx_free into Rx
3899 * queue, updates firmware pointers, and updates 3877 * queue, updates firmware pointers, and updates
3900 * the WRITE index. If insufficient rx_free buffers 3878 * the WRITE index. If insufficient rx_free buffers
3901 * are available, schedules iwl3945_rx_replenish 3879 * are available, schedules iwl3945_rx_replenish
3902 * 3880 *
3903 * -- enable interrupts -- 3881 * -- enable interrupts --
3904 * ISR - iwl3945_rx() Detach iwl3945_rx_mem_buffers from pool up to the 3882 * ISR - iwl3945_rx() Detach iwl3945_rx_mem_buffers from pool up to the
3905 * READ INDEX, detaching the SKB from the pool. 3883 * READ INDEX, detaching the SKB from the pool.
3906 * Moves the packet buffer from queue to rx_used. 3884 * Moves the packet buffer from queue to rx_used.
3907 * Calls iwl3945_rx_queue_restock to refill any empty 3885 * Calls iwl3945_rx_queue_restock to refill any empty
@@ -3927,12 +3905,6 @@ static int iwl3945_rx_queue_space(const struct iwl3945_rx_queue *q)
3927 3905
3928/** 3906/**
3929 * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue 3907 * iwl3945_rx_queue_update_write_ptr - Update the write pointer for the RX queue
3930 *
3931 * NOTE: This function has 3945 and 4965 specific code sections
3932 * but is declared in base due to the majority of the
3933 * implementation being the same (only a numeric constant is
3934 * different)
3935 *
3936 */ 3908 */
3937int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl3945_rx_queue *q) 3909int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl3945_rx_queue *q)
3938{ 3910{
@@ -3973,9 +3945,7 @@ int iwl3945_rx_queue_update_write_ptr(struct iwl3945_priv *priv, struct iwl3945_
3973} 3945}
3974 3946
3975/** 3947/**
3976 * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer pointer. 3948 * iwl3945_dma_addr2rbd_ptr - convert a DMA address to a uCode read buffer ptr
3977 *
3978 * NOTE: This function has 3945 and 4965 specific code paths in it.
3979 */ 3949 */
3980static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv, 3950static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv,
3981 dma_addr_t dma_addr) 3951 dma_addr_t dma_addr)
@@ -3986,9 +3956,9 @@ static inline __le32 iwl3945_dma_addr2rbd_ptr(struct iwl3945_priv *priv,
3986/** 3956/**
3987 * iwl3945_rx_queue_restock - refill RX queue from pre-allocated pool 3957 * iwl3945_rx_queue_restock - refill RX queue from pre-allocated pool
3988 * 3958 *
3989 * If there are slots in the RX queue that need to be restocked, 3959 * If there are slots in the RX queue that need to be restocked,
3990 * and we have free pre-allocated buffers, fill the ranks as much 3960 * and we have free pre-allocated buffers, fill the ranks as much
3991 * as we can pulling from rx_free. 3961 * as we can, pulling from rx_free.
3992 * 3962 *
3993 * This moves the 'write' index forward to catch up with 'processed', and 3963 * This moves the 'write' index forward to catch up with 'processed', and
3994 * also updates the memory address in the firmware to reference the new 3964 * also updates the memory address in the firmware to reference the new
@@ -4080,7 +4050,7 @@ void iwl3945_rx_replenish(void *data)
4080} 4050}
4081 4051
4082/* Assumes that the skb field of the buffers in 'pool' is kept accurate. 4052/* Assumes that the skb field of the buffers in 'pool' is kept accurate.
4083 * If an SKB has been detached, the POOL needs to have it's SKB set to NULL 4053 * If an SKB has been detached, the POOL needs to have its SKB set to NULL
4084 * This free routine walks the list of POOL entries and if SKB is set to 4054 * This free routine walks the list of POOL entries and if SKB is set to
4085 * non NULL it is unmapped and freed 4055 * non NULL it is unmapped and freed
4086 */ 4056 */
@@ -4232,7 +4202,7 @@ int iwl3945_calc_sig_qual(int rssi_dbm, int noise_dbm)
4232} 4202}
4233 4203
4234/** 4204/**
4235 * iwl3945_rx_handle - Main entry function for receiving responses from the uCode 4205 * iwl3945_rx_handle - Main entry function for receiving responses from uCode
4236 * 4206 *
4237 * Uses the priv->rx_handlers callback function array to invoke 4207 * Uses the priv->rx_handlers callback function array to invoke
4238 * the appropriate handlers, including command responses, 4208 * the appropriate handlers, including command responses,
@@ -4257,7 +4227,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
4257 while (i != r) { 4227 while (i != r) {
4258 rxb = rxq->queue[i]; 4228 rxb = rxq->queue[i];
4259 4229
4260 /* If an RXB doesn't have a queue slot associated with it 4230 /* If an RXB doesn't have a Rx queue slot associated with it,
4261 * then a bug has been introduced in the queue refilling 4231 * then a bug has been introduced in the queue refilling
4262 * routines -- catch it here */ 4232 * routines -- catch it here */
4263 BUG_ON(rxb == NULL); 4233 BUG_ON(rxb == NULL);
@@ -4296,8 +4266,8 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
4296 } 4266 }
4297 4267
4298 if (reclaim) { 4268 if (reclaim) {
4299 /* Invoke any callbacks, transfer the skb to caller, 4269 /* Invoke any callbacks, transfer the skb to caller, and
4300 * and fire off the (possibly) blocking iwl3945_send_cmd() 4270 * fire off the (possibly) blocking iwl3945_send_cmd()
4301 * as we reclaim the driver command queue */ 4271 * as we reclaim the driver command queue */
4302 if (rxb && rxb->skb) 4272 if (rxb && rxb->skb)
4303 iwl3945_tx_cmd_complete(priv, rxb); 4273 iwl3945_tx_cmd_complete(priv, rxb);
@@ -4671,7 +4641,8 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
4671 4641
4672#ifdef CONFIG_IWL3945_DEBUG 4642#ifdef CONFIG_IWL3945_DEBUG
4673 if (iwl3945_debug_level & IWL_DL_ISR) { 4643 if (iwl3945_debug_level & IWL_DL_ISR) {
4674 inta_mask = iwl3945_read32(priv, CSR_INT_MASK); /* just for debug */ 4644 /* just for debug */
4645 inta_mask = iwl3945_read32(priv, CSR_INT_MASK);
4675 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", 4646 IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n",
4676 inta, inta_mask, inta_fh); 4647 inta, inta_mask, inta_fh);
4677 } 4648 }
@@ -4901,11 +4872,11 @@ static const u8 iwl3945_eeprom_band_1[14] = {
4901}; 4872};
4902 4873
4903/* 5.2 GHz bands */ 4874/* 5.2 GHz bands */
4904static const u8 iwl3945_eeprom_band_2[] = { 4875static const u8 iwl3945_eeprom_band_2[] = { /* 4915-5080MHz */
4905 183, 184, 185, 187, 188, 189, 192, 196, 7, 8, 11, 12, 16 4876 183, 184, 185, 187, 188, 189, 192, 196, 7, 8, 11, 12, 16
4906}; 4877};
4907 4878
4908static const u8 iwl3945_eeprom_band_3[] = { /* 5205-5320MHz */ 4879static const u8 iwl3945_eeprom_band_3[] = { /* 5170-5320MHz */
4909 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64 4880 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64
4910}; 4881};
4911 4882
@@ -4929,7 +4900,7 @@ static void iwl3945_init_band_reference(const struct iwl3945_priv *priv, int ban
4929 *eeprom_ch_info = priv->eeprom.band_1_channels; 4900 *eeprom_ch_info = priv->eeprom.band_1_channels;
4930 *eeprom_ch_index = iwl3945_eeprom_band_1; 4901 *eeprom_ch_index = iwl3945_eeprom_band_1;
4931 break; 4902 break;
4932 case 2: /* 5.2GHz band */ 4903 case 2: /* 4.9GHz band */
4933 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_2); 4904 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_2);
4934 *eeprom_ch_info = priv->eeprom.band_2_channels; 4905 *eeprom_ch_info = priv->eeprom.band_2_channels;
4935 *eeprom_ch_index = iwl3945_eeprom_band_2; 4906 *eeprom_ch_index = iwl3945_eeprom_band_2;
@@ -4939,12 +4910,12 @@ static void iwl3945_init_band_reference(const struct iwl3945_priv *priv, int ban
4939 *eeprom_ch_info = priv->eeprom.band_3_channels; 4910 *eeprom_ch_info = priv->eeprom.band_3_channels;
4940 *eeprom_ch_index = iwl3945_eeprom_band_3; 4911 *eeprom_ch_index = iwl3945_eeprom_band_3;
4941 break; 4912 break;
4942 case 4: /* 5.2GHz band */ 4913 case 4: /* 5.5GHz band */
4943 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_4); 4914 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_4);
4944 *eeprom_ch_info = priv->eeprom.band_4_channels; 4915 *eeprom_ch_info = priv->eeprom.band_4_channels;
4945 *eeprom_ch_index = iwl3945_eeprom_band_4; 4916 *eeprom_ch_index = iwl3945_eeprom_band_4;
4946 break; 4917 break;
4947 case 5: /* 5.2GHz band */ 4918 case 5: /* 5.7GHz band */
4948 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_5); 4919 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_5);
4949 *eeprom_ch_info = priv->eeprom.band_5_channels; 4920 *eeprom_ch_info = priv->eeprom.band_5_channels;
4950 *eeprom_ch_index = iwl3945_eeprom_band_5; 4921 *eeprom_ch_index = iwl3945_eeprom_band_5;
@@ -5207,7 +5178,7 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, int phymode,
5207 scan_ch->active_dwell = cpu_to_le16(active_dwell); 5178 scan_ch->active_dwell = cpu_to_le16(active_dwell);
5208 scan_ch->passive_dwell = cpu_to_le16(passive_dwell); 5179 scan_ch->passive_dwell = cpu_to_le16(passive_dwell);
5209 5180
5210 /* Set power levels to defaults */ 5181 /* Set txpower levels to defaults */
5211 scan_ch->tpc.dsp_atten = 110; 5182 scan_ch->tpc.dsp_atten = 110;
5212 /* scan_pwr_info->tpc.dsp_atten; */ 5183 /* scan_pwr_info->tpc.dsp_atten; */
5213 5184
@@ -5217,8 +5188,8 @@ static int iwl3945_get_channels_for_scan(struct iwl3945_priv *priv, int phymode,
5217 else { 5188 else {
5218 scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3)); 5189 scan_ch->tpc.tx_gain = ((1 << 5) | (5 << 3));
5219 /* NOTE: if we were doing 6Mb OFDM for scans we'd use 5190 /* NOTE: if we were doing 6Mb OFDM for scans we'd use
5220 * power level 5191 * power level:
5221 scan_ch->tpc.tx_gain = ((1<<5) | (2 << 3)) | 3; 5192 * scan_ch->tpc.tx_gain = ((1<<5) | (2 << 3)) | 3;
5222 */ 5193 */
5223 } 5194 }
5224 5195
@@ -5602,8 +5573,9 @@ static int iwl3945_verify_ucode(struct iwl3945_priv *priv)
5602 5573
5603 IWL_ERROR("NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n"); 5574 IWL_ERROR("NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n");
5604 5575
5605 /* Show first several data entries in instruction SRAM. 5576 /* Since nothing seems to match, show first several data entries in
5606 * Selection of bootstrap image is arbitrary. */ 5577 * instruction SRAM, so maybe visual inspection will give a clue.
5578 * Selection of bootstrap image (vs. other images) is arbitrary. */
5607 image = (__le32 *)priv->ucode_boot.v_addr; 5579 image = (__le32 *)priv->ucode_boot.v_addr;
5608 len = priv->ucode_boot.len; 5580 len = priv->ucode_boot.len;
5609 rc = iwl3945_verify_inst_full(priv, image, len); 5581 rc = iwl3945_verify_inst_full(priv, image, len);
@@ -5695,7 +5667,7 @@ static int iwl3945_load_bsm(struct iwl3945_priv *priv)
5695 return -EINVAL; 5667 return -EINVAL;
5696 5668
5697 /* Tell bootstrap uCode where to find the "Initialize" uCode 5669 /* Tell bootstrap uCode where to find the "Initialize" uCode
5698 * in host DRAM ... bits 31:0 for 3945, bits 35:4 for 4965. 5670 * in host DRAM ... host DRAM physical address bits 31:0 for 3945.
5699 * NOTE: iwl3945_initialize_alive_start() will replace these values, 5671 * NOTE: iwl3945_initialize_alive_start() will replace these values,
5700 * after the "initialize" uCode has run, to point to 5672 * after the "initialize" uCode has run, to point to
5701 * runtime/protocol instructions and backup data cache. */ 5673 * runtime/protocol instructions and backup data cache. */
@@ -6020,12 +5992,8 @@ static int iwl3945_set_ucode_ptrs(struct iwl3945_priv *priv)
6020 * 5992 *
6021 * Called after REPLY_ALIVE notification received from "initialize" uCode. 5993 * Called after REPLY_ALIVE notification received from "initialize" uCode.
6022 * 5994 *
6023 * The 4965 "initialize" ALIVE reply contains calibration data for:
6024 * Voltage, temperature, and MIMO tx gain correction, now stored in priv
6025 * (3945 does not contain this data).
6026 *
6027 * Tell "initialize" uCode to go ahead and load the runtime uCode. 5995 * Tell "initialize" uCode to go ahead and load the runtime uCode.
6028*/ 5996 */
6029static void iwl3945_init_alive_start(struct iwl3945_priv *priv) 5997static void iwl3945_init_alive_start(struct iwl3945_priv *priv)
6030{ 5998{
6031 /* Check alive response for "valid" sign from uCode */ 5999 /* Check alive response for "valid" sign from uCode */
@@ -6120,7 +6088,7 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
6120 } else 6088 } else
6121 set_bit(STATUS_RF_KILL_HW, &priv->status); 6089 set_bit(STATUS_RF_KILL_HW, &priv->status);
6122 6090
6123 /* After the ALIVE response, we can process host commands */ 6091 /* After the ALIVE response, we can send commands to 3945 uCode */
6124 set_bit(STATUS_ALIVE, &priv->status); 6092 set_bit(STATUS_ALIVE, &priv->status);
6125 6093
6126 /* Clear out the uCode error bit if it is set */ 6094 /* Clear out the uCode error bit if it is set */
@@ -6177,7 +6145,7 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
6177 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 6145 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN);
6178 } 6146 }
6179 6147
6180 /* Configure BT coexistence */ 6148 /* Configure Bluetooth device coexistence support */
6181 iwl3945_send_bt_config(priv); 6149 iwl3945_send_bt_config(priv);
6182 6150
6183 /* Configure the adapter for unassociated operation */ 6151 /* Configure the adapter for unassociated operation */
@@ -6365,7 +6333,7 @@ static int __iwl3945_up(struct iwl3945_priv *priv)
6365 /* start card; "initialize" will load runtime ucode */ 6333 /* start card; "initialize" will load runtime ucode */
6366 iwl3945_nic_start(priv); 6334 iwl3945_nic_start(priv);
6367 6335
6368 /* MAC Address location in EEPROM same for 3945/4965 */ 6336 /* MAC Address location in EEPROM is same for 3945/4965 */
6369 get_eeprom_mac(priv, priv->mac_addr); 6337 get_eeprom_mac(priv, priv->mac_addr);
6370 IWL_DEBUG_INFO("MAC address: %s\n", 6338 IWL_DEBUG_INFO("MAC address: %s\n",
6371 print_mac(mac, priv->mac_addr)); 6339 print_mac(mac, priv->mac_addr));