aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAbhijeet Kolekar <abhijeet.kolekar@intel.com>2008-12-18 21:37:27 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-01-29 15:59:11 -0500
commitf2c7e52100545e54af064fe0345d141fdcf2d243 (patch)
treee75d927bc367b7ff178fdcef7e27b81133fbd4a2 /drivers/net
parent3832ec9dc919a0994d713390eb4fb3c7e7500b94 (diff)
iwl3945: rename iwl3945_priv variables
The patch renames iwl3945 specific variables in iwl3945_priv structure. iwl3945_priv structure differs with iwl_priv structure with these variables. Goal of this patch is to make transition from iwl3945_priv to iwl_priv smoothly. Signed-off-by: Abhijeet Kolekar <abhijeet.kolekar@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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-led.c56
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c66
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h24
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c376
5 files changed, 263 insertions, 263 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-led.c b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
index 32d09ba3e69..1ef21b6b3c4 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-led.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-led.c
@@ -313,66 +313,66 @@ int iwl3945_led_register(struct iwl3945_priv *priv)
313 priv->allow_blinking = 0; 313 priv->allow_blinking = 0;
314 314
315 trigger = ieee80211_get_radio_led_name(priv->hw); 315 trigger = ieee80211_get_radio_led_name(priv->hw);
316 snprintf(priv->led[IWL_LED_TRG_RADIO].name, 316 snprintf(priv->led39[IWL_LED_TRG_RADIO].name,
317 sizeof(priv->led[IWL_LED_TRG_RADIO].name), "iwl-%s:radio", 317 sizeof(priv->led39[IWL_LED_TRG_RADIO].name), "iwl-%s:radio",
318 wiphy_name(priv->hw->wiphy)); 318 wiphy_name(priv->hw->wiphy));
319 319
320 priv->led[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on; 320 priv->led39[IWL_LED_TRG_RADIO].led_on = iwl3945_led_on;
321 priv->led[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off; 321 priv->led39[IWL_LED_TRG_RADIO].led_off = iwl3945_led_off;
322 priv->led[IWL_LED_TRG_RADIO].led_pattern = NULL; 322 priv->led39[IWL_LED_TRG_RADIO].led_pattern = NULL;
323 323
324 ret = iwl3945_led_register_led(priv, 324 ret = iwl3945_led_register_led(priv,
325 &priv->led[IWL_LED_TRG_RADIO], 325 &priv->led39[IWL_LED_TRG_RADIO],
326 IWL_LED_TRG_RADIO, 1, trigger); 326 IWL_LED_TRG_RADIO, 1, trigger);
327 327
328 if (ret) 328 if (ret)
329 goto exit_fail; 329 goto exit_fail;
330 330
331 trigger = ieee80211_get_assoc_led_name(priv->hw); 331 trigger = ieee80211_get_assoc_led_name(priv->hw);
332 snprintf(priv->led[IWL_LED_TRG_ASSOC].name, 332 snprintf(priv->led39[IWL_LED_TRG_ASSOC].name,
333 sizeof(priv->led[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc", 333 sizeof(priv->led39[IWL_LED_TRG_ASSOC].name), "iwl-%s:assoc",
334 wiphy_name(priv->hw->wiphy)); 334 wiphy_name(priv->hw->wiphy));
335 335
336 ret = iwl3945_led_register_led(priv, 336 ret = iwl3945_led_register_led(priv,
337 &priv->led[IWL_LED_TRG_ASSOC], 337 &priv->led39[IWL_LED_TRG_ASSOC],
338 IWL_LED_TRG_ASSOC, 0, trigger); 338 IWL_LED_TRG_ASSOC, 0, trigger);
339 339
340 /* for assoc always turn led on */ 340 /* for assoc always turn led on */
341 priv->led[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on; 341 priv->led39[IWL_LED_TRG_ASSOC].led_on = iwl3945_led_on;
342 priv->led[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on; 342 priv->led39[IWL_LED_TRG_ASSOC].led_off = iwl3945_led_on;
343 priv->led[IWL_LED_TRG_ASSOC].led_pattern = NULL; 343 priv->led39[IWL_LED_TRG_ASSOC].led_pattern = NULL;
344 344
345 if (ret) 345 if (ret)
346 goto exit_fail; 346 goto exit_fail;
347 347
348 trigger = ieee80211_get_rx_led_name(priv->hw); 348 trigger = ieee80211_get_rx_led_name(priv->hw);
349 snprintf(priv->led[IWL_LED_TRG_RX].name, 349 snprintf(priv->led39[IWL_LED_TRG_RX].name,
350 sizeof(priv->led[IWL_LED_TRG_RX].name), "iwl-%s:RX", 350 sizeof(priv->led39[IWL_LED_TRG_RX].name), "iwl-%s:RX",
351 wiphy_name(priv->hw->wiphy)); 351 wiphy_name(priv->hw->wiphy));
352 352
353 ret = iwl3945_led_register_led(priv, 353 ret = iwl3945_led_register_led(priv,
354 &priv->led[IWL_LED_TRG_RX], 354 &priv->led39[IWL_LED_TRG_RX],
355 IWL_LED_TRG_RX, 0, trigger); 355 IWL_LED_TRG_RX, 0, trigger);
356 356
357 priv->led[IWL_LED_TRG_RX].led_on = iwl3945_led_associated; 357 priv->led39[IWL_LED_TRG_RX].led_on = iwl3945_led_associated;
358 priv->led[IWL_LED_TRG_RX].led_off = iwl3945_led_associated; 358 priv->led39[IWL_LED_TRG_RX].led_off = iwl3945_led_associated;
359 priv->led[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern; 359 priv->led39[IWL_LED_TRG_RX].led_pattern = iwl3945_led_pattern;
360 360
361 if (ret) 361 if (ret)
362 goto exit_fail; 362 goto exit_fail;
363 363
364 trigger = ieee80211_get_tx_led_name(priv->hw); 364 trigger = ieee80211_get_tx_led_name(priv->hw);
365 snprintf(priv->led[IWL_LED_TRG_TX].name, 365 snprintf(priv->led39[IWL_LED_TRG_TX].name,
366 sizeof(priv->led[IWL_LED_TRG_TX].name), "iwl-%s:TX", 366 sizeof(priv->led39[IWL_LED_TRG_TX].name), "iwl-%s:TX",
367 wiphy_name(priv->hw->wiphy)); 367 wiphy_name(priv->hw->wiphy));
368 368
369 ret = iwl3945_led_register_led(priv, 369 ret = iwl3945_led_register_led(priv,
370 &priv->led[IWL_LED_TRG_TX], 370 &priv->led39[IWL_LED_TRG_TX],
371 IWL_LED_TRG_TX, 0, trigger); 371 IWL_LED_TRG_TX, 0, trigger);
372 372
373 priv->led[IWL_LED_TRG_TX].led_on = iwl3945_led_associated; 373 priv->led39[IWL_LED_TRG_TX].led_on = iwl3945_led_associated;
374 priv->led[IWL_LED_TRG_TX].led_off = iwl3945_led_associated; 374 priv->led39[IWL_LED_TRG_TX].led_off = iwl3945_led_associated;
375 priv->led[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern; 375 priv->led39[IWL_LED_TRG_TX].led_pattern = iwl3945_led_pattern;
376 376
377 if (ret) 377 if (ret)
378 goto exit_fail; 378 goto exit_fail;
@@ -401,9 +401,9 @@ static void iwl3945_led_unregister_led(struct iwl3945_led *led, u8 set_led)
401/* Unregister all led handlers */ 401/* Unregister all led handlers */
402void iwl3945_led_unregister(struct iwl3945_priv *priv) 402void iwl3945_led_unregister(struct iwl3945_priv *priv)
403{ 403{
404 iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_ASSOC], 0); 404 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_ASSOC], 0);
405 iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RX], 0); 405 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RX], 0);
406 iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_TX], 0); 406 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_TX], 0);
407 iwl3945_led_unregister_led(&priv->led[IWL_LED_TRG_RADIO], 1); 407 iwl3945_led_unregister_led(&priv->led39[IWL_LED_TRG_RADIO], 1);
408} 408}
409 409
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index 3fa9570f82b..daaac3196ce 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -901,7 +901,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
901 901
902 rcu_read_lock(); 902 rcu_read_lock();
903 903
904 sta = ieee80211_find_sta(hw, priv->stations[sta_id].sta.sta.addr); 904 sta = ieee80211_find_sta(hw, priv->stations_39[sta_id].sta.sta.addr);
905 if (!sta) { 905 if (!sta) {
906 rcu_read_unlock(); 906 rcu_read_unlock();
907 return; 907 return;
@@ -916,7 +916,7 @@ void iwl3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
916 switch (priv->band) { 916 switch (priv->band) {
917 case IEEE80211_BAND_2GHZ: 917 case IEEE80211_BAND_2GHZ:
918 /* TODO: this always does G, not a regression */ 918 /* TODO: this always does G, not a regression */
919 if (priv->active_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) { 919 if (priv->active39_rxon.flags & RXON_FLG_TGG_PROTECT_MSK) {
920 rs_sta->tgg = 1; 920 rs_sta->tgg = 1;
921 rs_sta->expected_tpt = iwl3945_expected_tpt_g_prot; 921 rs_sta->expected_tpt = iwl3945_expected_tpt_g_prot;
922 } else 922 } else
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index b5b23b1ad24..f480c437cd6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -199,7 +199,7 @@ static int iwl3945_hwrate_to_plcp_idx(u8 plcp)
199 * iwl3945_get_antenna_flags - Get antenna flags for RXON command 199 * iwl3945_get_antenna_flags - Get antenna flags for RXON command
200 * @priv: eeprom and antenna fields are used to determine antenna flags 200 * @priv: eeprom and antenna fields are used to determine antenna flags
201 * 201 *
202 * priv->eeprom is used to determine if antenna AUX/MAIN are reversed 202 * priv->eeprom39 is used to determine if antenna AUX/MAIN are reversed
203 * priv->antenna specifies the antenna diversity mode: 203 * priv->antenna specifies the antenna diversity mode:
204 * 204 *
205 * IWL_ANTENNA_DIVERSITY - NIC selects best antenna by itself 205 * IWL_ANTENNA_DIVERSITY - NIC selects best antenna by itself
@@ -213,12 +213,12 @@ __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv)
213 return 0; 213 return 0;
214 214
215 case IWL_ANTENNA_MAIN: 215 case IWL_ANTENNA_MAIN:
216 if (priv->eeprom.antenna_switch_type) 216 if (priv->eeprom39.antenna_switch_type)
217 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_B_MSK; 217 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_B_MSK;
218 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK; 218 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK;
219 219
220 case IWL_ANTENNA_AUX: 220 case IWL_ANTENNA_AUX:
221 if (priv->eeprom.antenna_switch_type) 221 if (priv->eeprom39.antenna_switch_type)
222 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK; 222 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_A_MSK;
223 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_B_MSK; 223 return RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_B_MSK;
224 } 224 }
@@ -305,7 +305,7 @@ int iwl3945_rs_next_rate(struct iwl3945_priv *priv, int rate)
305static void iwl3945_tx_queue_reclaim(struct iwl3945_priv *priv, 305static void iwl3945_tx_queue_reclaim(struct iwl3945_priv *priv,
306 int txq_id, int index) 306 int txq_id, int index)
307{ 307{
308 struct iwl3945_tx_queue *txq = &priv->txq[txq_id]; 308 struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];
309 struct iwl_queue *q = &txq->q; 309 struct iwl_queue *q = &txq->q;
310 struct iwl3945_tx_info *tx_info; 310 struct iwl3945_tx_info *tx_info;
311 311
@@ -336,7 +336,7 @@ static void iwl3945_rx_reply_tx(struct iwl3945_priv *priv,
336 u16 sequence = le16_to_cpu(pkt->hdr.sequence); 336 u16 sequence = le16_to_cpu(pkt->hdr.sequence);
337 int txq_id = SEQ_TO_QUEUE(sequence); 337 int txq_id = SEQ_TO_QUEUE(sequence);
338 int index = SEQ_TO_INDEX(sequence); 338 int index = SEQ_TO_INDEX(sequence);
339 struct iwl3945_tx_queue *txq = &priv->txq[txq_id]; 339 struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];
340 struct ieee80211_tx_info *info; 340 struct ieee80211_tx_info *info;
341 struct iwl3945_tx_resp *tx_resp = (void *)&pkt->u.raw[0]; 341 struct iwl3945_tx_resp *tx_resp = (void *)&pkt->u.raw[0];
342 u32 status = le32_to_cpu(tx_resp->status); 342 u32 status = le32_to_cpu(tx_resp->status);
@@ -396,7 +396,7 @@ void iwl3945_hw_rx_statistics(struct iwl3945_priv *priv, struct iwl_rx_mem_buffe
396 (int)sizeof(struct iwl3945_notif_statistics), 396 (int)sizeof(struct iwl3945_notif_statistics),
397 le32_to_cpu(pkt->len)); 397 le32_to_cpu(pkt->len));
398 398
399 memcpy(&priv->statistics, pkt->u.raw, sizeof(priv->statistics)); 399 memcpy(&priv->statistics_39, pkt->u.raw, sizeof(priv->statistics_39));
400 400
401 iwl3945_led_background(priv); 401 iwl3945_led_background(priv);
402 402
@@ -808,9 +808,9 @@ u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr)
808 808
809 spin_lock_irqsave(&priv->sta_lock, flags); 809 spin_lock_irqsave(&priv->sta_lock, flags);
810 for (i = start; i < priv->hw_params.max_stations; i++) 810 for (i = start; i < priv->hw_params.max_stations; i++)
811 if ((priv->stations[i].used) && 811 if ((priv->stations_39[i].used) &&
812 (!compare_ether_addr 812 (!compare_ether_addr
813 (priv->stations[i].sta.sta.addr, addr))) { 813 (priv->stations_39[i].sta.sta.addr, addr))) {
814 ret = i; 814 ret = i;
815 goto out; 815 goto out;
816 } 816 }
@@ -905,7 +905,7 @@ u8 iwl3945_sync_sta(struct iwl3945_priv *priv, int sta_id, u16 tx_rate, u8 flags
905 return IWL_INVALID_STATION; 905 return IWL_INVALID_STATION;
906 906
907 spin_lock_irqsave(&priv->sta_lock, flags_spin); 907 spin_lock_irqsave(&priv->sta_lock, flags_spin);
908 station = &priv->stations[sta_id]; 908 station = &priv->stations_39[sta_id];
909 909
910 station->sta.sta.modify_mask = STA_MODIFY_TX_RATE_MSK; 910 station->sta.sta.modify_mask = STA_MODIFY_TX_RATE_MSK;
911 station->sta.rate_n_flags = cpu_to_le16(tx_rate); 911 station->sta.rate_n_flags = cpu_to_le16(tx_rate);
@@ -1062,7 +1062,7 @@ static int iwl3945_txq_ctx_reset(struct iwl3945_priv *priv)
1062 for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) { 1062 for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) {
1063 slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ? 1063 slots_num = (txq_id == IWL_CMD_QUEUE_NUM) ?
1064 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS; 1064 TFD_CMD_SLOTS : TFD_TX_CMD_SLOTS;
1065 rc = iwl3945_tx_queue_init(priv, &priv->txq[txq_id], slots_num, 1065 rc = iwl3945_tx_queue_init(priv, &priv->txq39[txq_id], slots_num,
1066 txq_id); 1066 txq_id);
1067 if (rc) { 1067 if (rc) {
1068 IWL_ERROR("Tx %d queue init failed\n", txq_id); 1068 IWL_ERROR("Tx %d queue init failed\n", txq_id);
@@ -1135,42 +1135,42 @@ int iwl3945_hw_nic_init(struct iwl3945_priv *priv)
1135 CSR39_HW_IF_CONFIG_REG_BIT_3945_MM); 1135 CSR39_HW_IF_CONFIG_REG_BIT_3945_MM);
1136 } 1136 }
1137 1137
1138 if (EEPROM_SKU_CAP_OP_MODE_MRC == priv->eeprom.sku_cap) { 1138 if (EEPROM_SKU_CAP_OP_MODE_MRC == priv->eeprom39.sku_cap) {
1139 IWL_DEBUG_INFO("SKU OP mode is mrc\n"); 1139 IWL_DEBUG_INFO("SKU OP mode is mrc\n");
1140 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1140 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1141 CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC); 1141 CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC);
1142 } else 1142 } else
1143 IWL_DEBUG_INFO("SKU OP mode is basic\n"); 1143 IWL_DEBUG_INFO("SKU OP mode is basic\n");
1144 1144
1145 if ((priv->eeprom.board_revision & 0xF0) == 0xD0) { 1145 if ((priv->eeprom39.board_revision & 0xF0) == 0xD0) {
1146 IWL_DEBUG_INFO("3945ABG revision is 0x%X\n", 1146 IWL_DEBUG_INFO("3945ABG revision is 0x%X\n",
1147 priv->eeprom.board_revision); 1147 priv->eeprom39.board_revision);
1148 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1148 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1149 CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); 1149 CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE);
1150 } else { 1150 } else {
1151 IWL_DEBUG_INFO("3945ABG revision is 0x%X\n", 1151 IWL_DEBUG_INFO("3945ABG revision is 0x%X\n",
1152 priv->eeprom.board_revision); 1152 priv->eeprom39.board_revision);
1153 iwl3945_clear_bit(priv, CSR_HW_IF_CONFIG_REG, 1153 iwl3945_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
1154 CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); 1154 CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE);
1155 } 1155 }
1156 1156
1157 if (priv->eeprom.almgor_m_version <= 1) { 1157 if (priv->eeprom39.almgor_m_version <= 1) {
1158 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1158 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1159 CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A); 1159 CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A);
1160 IWL_DEBUG_INFO("Card M type A version is 0x%X\n", 1160 IWL_DEBUG_INFO("Card M type A version is 0x%X\n",
1161 priv->eeprom.almgor_m_version); 1161 priv->eeprom39.almgor_m_version);
1162 } else { 1162 } else {
1163 IWL_DEBUG_INFO("Card M type B version is 0x%X\n", 1163 IWL_DEBUG_INFO("Card M type B version is 0x%X\n",
1164 priv->eeprom.almgor_m_version); 1164 priv->eeprom39.almgor_m_version);
1165 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG, 1165 iwl3945_set_bit(priv, CSR_HW_IF_CONFIG_REG,
1166 CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B); 1166 CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B);
1167 } 1167 }
1168 spin_unlock_irqrestore(&priv->lock, flags); 1168 spin_unlock_irqrestore(&priv->lock, flags);
1169 1169
1170 if (priv->eeprom.sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) 1170 if (priv->eeprom39.sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE)
1171 IWL_DEBUG_RF_KILL("SW RF KILL supported in EEPROM.\n"); 1171 IWL_DEBUG_RF_KILL("SW RF KILL supported in EEPROM.\n");
1172 1172
1173 if (priv->eeprom.sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) 1173 if (priv->eeprom39.sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE)
1174 IWL_DEBUG_RF_KILL("HW RF KILL supported in EEPROM.\n"); 1174 IWL_DEBUG_RF_KILL("HW RF KILL supported in EEPROM.\n");
1175 1175
1176 /* Allocate the RX queue, or reset if it is already allocated */ 1176 /* Allocate the RX queue, or reset if it is already allocated */
@@ -1224,7 +1224,7 @@ void iwl3945_hw_txq_ctx_free(struct iwl3945_priv *priv)
1224 1224
1225 /* Tx queues */ 1225 /* Tx queues */
1226 for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++) 1226 for (txq_id = 0; txq_id < TFD_QUEUE_MAX; txq_id++)
1227 iwl3945_tx_queue_free(priv, &priv->txq[txq_id]); 1227 iwl3945_tx_queue_free(priv, &priv->txq39[txq_id]);
1228} 1228}
1229 1229
1230void iwl3945_hw_txq_ctx_stop(struct iwl3945_priv *priv) 1230void iwl3945_hw_txq_ctx_stop(struct iwl3945_priv *priv)
@@ -1382,7 +1382,7 @@ static int iwl3945_hw_reg_txpower_get_temperature(struct iwl3945_priv *priv)
1382 /* if really really hot(?), 1382 /* if really really hot(?),
1383 * substitute the 3rd band/group's temp measured at factory */ 1383 * substitute the 3rd band/group's temp measured at factory */
1384 if (priv->last_temperature > 100) 1384 if (priv->last_temperature > 100)
1385 temperature = priv->eeprom.groups[2].temperature; 1385 temperature = priv->eeprom39.groups[2].temperature;
1386 else /* else use most recent "sane" value from driver */ 1386 else /* else use most recent "sane" value from driver */
1387 temperature = priv->last_temperature; 1387 temperature = priv->last_temperature;
1388 } 1388 }
@@ -1677,17 +1677,17 @@ int iwl3945_hw_reg_send_txpower(struct iwl3945_priv *priv)
1677 int rate_idx, i; 1677 int rate_idx, i;
1678 const struct iwl_channel_info *ch_info = NULL; 1678 const struct iwl_channel_info *ch_info = NULL;
1679 struct iwl3945_txpowertable_cmd txpower = { 1679 struct iwl3945_txpowertable_cmd txpower = {
1680 .channel = priv->active_rxon.channel, 1680 .channel = priv->active39_rxon.channel,
1681 }; 1681 };
1682 1682
1683 txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1; 1683 txpower.band = (priv->band == IEEE80211_BAND_5GHZ) ? 0 : 1;
1684 ch_info = iwl3945_get_channel_info(priv, 1684 ch_info = iwl3945_get_channel_info(priv,
1685 priv->band, 1685 priv->band,
1686 le16_to_cpu(priv->active_rxon.channel)); 1686 le16_to_cpu(priv->active39_rxon.channel));
1687 if (!ch_info) { 1687 if (!ch_info) {
1688 IWL_ERROR 1688 IWL_ERROR
1689 ("Failed to get channel info for channel %d [%d]\n", 1689 ("Failed to get channel info for channel %d [%d]\n",
1690 le16_to_cpu(priv->active_rxon.channel), priv->band); 1690 le16_to_cpu(priv->active39_rxon.channel), priv->band);
1691 return -EINVAL; 1691 return -EINVAL;
1692 } 1692 }
1693 1693
@@ -1757,7 +1757,7 @@ static int iwl3945_hw_reg_set_new_power(struct iwl3945_priv *priv,
1757 int power; 1757 int power;
1758 1758
1759 /* Get this chnlgrp's rate-to-max/clip-powers table */ 1759 /* Get this chnlgrp's rate-to-max/clip-powers table */
1760 clip_pwrs = priv->clip_groups[ch_info->group_index].clip_powers; 1760 clip_pwrs = priv->clip39_groups[ch_info->group_index].clip_powers;
1761 1761
1762 /* Get this channel's rate-to-current-power settings table */ 1762 /* Get this channel's rate-to-current-power settings table */
1763 power_info = ch_info->power_info; 1763 power_info = ch_info->power_info;
@@ -1856,7 +1856,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl3945_priv *priv)
1856 a_band = is_channel_a_band(ch_info); 1856 a_band = is_channel_a_band(ch_info);
1857 1857
1858 /* Get this chnlgrp's factory calibration temperature */ 1858 /* Get this chnlgrp's factory calibration temperature */
1859 ref_temp = (s16)priv->eeprom.groups[ch_info->group_index]. 1859 ref_temp = (s16)priv->eeprom39.groups[ch_info->group_index].
1860 temperature; 1860 temperature;
1861 1861
1862 /* get power index adjustment based on current and factory 1862 /* get power index adjustment based on current and factory
@@ -1882,7 +1882,7 @@ static int iwl3945_hw_reg_comp_txpower_temp(struct iwl3945_priv *priv)
1882 } 1882 }
1883 1883
1884 /* Get this chnlgrp's rate-to-max/clip-powers table */ 1884 /* Get this chnlgrp's rate-to-max/clip-powers table */
1885 clip_pwrs = priv->clip_groups[ch_info->group_index].clip_powers; 1885 clip_pwrs = priv->clip39_groups[ch_info->group_index].clip_powers;
1886 1886
1887 /* set scan tx power, 1Mbit for CCK, 6Mbit for OFDM */ 1887 /* set scan tx power, 1Mbit for CCK, 6Mbit for OFDM */
1888 for (scan_tbl_index = 0; 1888 for (scan_tbl_index = 0;
@@ -2001,7 +2001,7 @@ static void iwl3945_bg_reg_txpower_periodic(struct work_struct *work)
2001static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl3945_priv *priv, 2001static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl3945_priv *priv,
2002 const struct iwl_channel_info *ch_info) 2002 const struct iwl_channel_info *ch_info)
2003{ 2003{
2004 struct iwl3945_eeprom_txpower_group *ch_grp = &priv->eeprom.groups[0]; 2004 struct iwl3945_eeprom_txpower_group *ch_grp = &priv->eeprom39.groups[0];
2005 u8 group; 2005 u8 group;
2006 u16 group_index = 0; /* based on factory calib frequencies */ 2006 u16 group_index = 0; /* based on factory calib frequencies */
2007 u8 grp_channel; 2007 u8 grp_channel;
@@ -2045,7 +2045,7 @@ static int iwl3945_hw_reg_get_matched_power_index(struct iwl3945_priv *priv,
2045 s32 res; 2045 s32 res;
2046 s32 denominator; 2046 s32 denominator;
2047 2047
2048 chnl_grp = &priv->eeprom.groups[setting_index]; 2048 chnl_grp = &priv->eeprom39.groups[setting_index];
2049 samples = chnl_grp->samples; 2049 samples = chnl_grp->samples;
2050 for (i = 0; i < 5; i++) { 2050 for (i = 0; i < 5; i++) {
2051 if (power == samples[i].power) { 2051 if (power == samples[i].power) {
@@ -2091,7 +2091,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl3945_priv *priv)
2091 for (i = 0; i < IWL_NUM_TX_CALIB_GROUPS; i++) { 2091 for (i = 0; i < IWL_NUM_TX_CALIB_GROUPS; i++) {
2092 s8 *clip_pwrs; /* table of power levels for each rate */ 2092 s8 *clip_pwrs; /* table of power levels for each rate */
2093 s8 satur_pwr; /* saturation power for each chnl group */ 2093 s8 satur_pwr; /* saturation power for each chnl group */
2094 group = &priv->eeprom.groups[i]; 2094 group = &priv->eeprom39.groups[i];
2095 2095
2096 /* sanity check on factory saturation power value */ 2096 /* sanity check on factory saturation power value */
2097 if (group->saturation_power < 40) { 2097 if (group->saturation_power < 40) {
@@ -2110,7 +2110,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl3945_priv *priv)
2110 * power peaks, without too much distortion (clipping). 2110 * power peaks, without too much distortion (clipping).
2111 */ 2111 */
2112 /* we'll fill in this array with h/w max power levels */ 2112 /* we'll fill in this array with h/w max power levels */
2113 clip_pwrs = (s8 *) priv->clip_groups[i].clip_powers; 2113 clip_pwrs = (s8 *) priv->clip39_groups[i].clip_powers;
2114 2114
2115 /* divide factory saturation power by 2 to find -3dB level */ 2115 /* divide factory saturation power by 2 to find -3dB level */
2116 satur_pwr = (s8) (group->saturation_power >> 1); 2116 satur_pwr = (s8) (group->saturation_power >> 1);
@@ -2193,12 +2193,12 @@ int iwl3945_txpower_set_from_eeprom(struct iwl3945_priv *priv)
2193 iwl3945_hw_reg_get_ch_grp_index(priv, ch_info); 2193 iwl3945_hw_reg_get_ch_grp_index(priv, ch_info);
2194 2194
2195 /* Get this chnlgrp's rate->max/clip-powers table */ 2195 /* Get this chnlgrp's rate->max/clip-powers table */
2196 clip_pwrs = priv->clip_groups[ch_info->group_index].clip_powers; 2196 clip_pwrs = priv->clip39_groups[ch_info->group_index].clip_powers;
2197 2197
2198 /* calculate power index *adjustment* value according to 2198 /* calculate power index *adjustment* value according to
2199 * diff between current temperature and factory temperature */ 2199 * diff between current temperature and factory temperature */
2200 delta_index = iwl3945_hw_reg_adjust_power_by_temp(temperature, 2200 delta_index = iwl3945_hw_reg_adjust_power_by_temp(temperature,
2201 priv->eeprom.groups[ch_info->group_index]. 2201 priv->eeprom39.groups[ch_info->group_index].
2202 temperature); 2202 temperature);
2203 2203
2204 IWL_DEBUG_POWER("Delta index for channel %d: %d [%d]\n", 2204 IWL_DEBUG_POWER("Delta index for channel %d: %d [%d]\n",
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index cfceee18814..788cd9cc4b1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -422,7 +422,7 @@ struct iwl3945_priv {
422 422
423 /* each calibration channel group in the EEPROM has a derived 423 /* each calibration channel group in the EEPROM has a derived
424 * clip setting for each rate. */ 424 * clip setting for each rate. */
425 const struct iwl3945_clip_group clip_groups[5]; 425 const struct iwl3945_clip_group clip39_groups[5];
426 426
427 /* thermal calibration */ 427 /* thermal calibration */
428 s32 temperature; /* degrees Kelvin */ 428 s32 temperature; /* degrees Kelvin */
@@ -438,7 +438,7 @@ struct iwl3945_priv {
438 int one_direct_scan; 438 int one_direct_scan;
439 u8 direct_ssid_len; 439 u8 direct_ssid_len;
440 u8 direct_ssid[IW_ESSID_MAX_SIZE]; 440 u8 direct_ssid[IW_ESSID_MAX_SIZE];
441 struct iwl3945_scan_cmd *scan; 441 struct iwl3945_scan_cmd *scan39;
442 442
443 /* spinlock */ 443 /* spinlock */
444 spinlock_t lock; /* protect general shared data */ 444 spinlock_t lock; /* protect general shared data */
@@ -468,11 +468,11 @@ struct iwl3945_priv {
468 * changed via explicit cast within the 468 * changed via explicit cast within the
469 * routines that actually update the physical 469 * routines that actually update the physical
470 * hardware */ 470 * hardware */
471 const struct iwl3945_rxon_cmd active_rxon; 471 const struct iwl3945_rxon_cmd active39_rxon;
472 struct iwl3945_rxon_cmd staging_rxon; 472 struct iwl3945_rxon_cmd staging39_rxon;
473 473
474 int error_recovering; 474 int error_recovering;
475 struct iwl3945_rxon_cmd recovery_rxon; 475 struct iwl3945_rxon_cmd recovery39_rxon;
476 476
477 /* 1st responses from initialize and runtime uCode images. 477 /* 1st responses from initialize and runtime uCode images.
478 * 4965's initialize alive response contains some calibration data. */ 478 * 4965's initialize alive response contains some calibration data. */
@@ -485,7 +485,7 @@ struct iwl3945_priv {
485#endif 485#endif
486 486
487#ifdef CONFIG_IWL3945_LEDS 487#ifdef CONFIG_IWL3945_LEDS
488 struct iwl3945_led led[IWL_LED_TRG_MAX]; 488 struct iwl3945_led led39[IWL_LED_TRG_MAX];
489 unsigned long last_blink_time; 489 unsigned long last_blink_time;
490 u8 last_blink_rate; 490 u8 last_blink_rate;
491 u8 allow_blinking; 491 u8 allow_blinking;
@@ -510,16 +510,16 @@ struct iwl3945_priv {
510 510
511 /* Rx and Tx DMA processing queues */ 511 /* Rx and Tx DMA processing queues */
512 struct iwl_rx_queue rxq; 512 struct iwl_rx_queue rxq;
513 struct iwl3945_tx_queue txq[IWL39_MAX_NUM_QUEUES]; 513 struct iwl3945_tx_queue txq39[IWL39_MAX_NUM_QUEUES];
514 514
515 unsigned long status; 515 unsigned long status;
516 516
517 int last_rx_rssi; /* From Rx packet statisitics */ 517 int last_rx_rssi; /* From Rx packet statisitics */
518 int last_rx_noise; /* From beacon statistics */ 518 int last_rx_noise; /* From beacon statistics */
519 519
520 struct iwl3945_power_mgr power_data; 520 struct iwl3945_power_mgr power_data_39;
521 521
522 struct iwl3945_notif_statistics statistics; 522 struct iwl3945_notif_statistics statistics_39;
523 unsigned long last_statistics_time; 523 unsigned long last_statistics_time;
524 524
525 /* context information */ 525 /* context information */
@@ -534,7 +534,7 @@ struct iwl3945_priv {
534 /*station table variables */ 534 /*station table variables */
535 spinlock_t sta_lock; 535 spinlock_t sta_lock;
536 int num_stations; 536 int num_stations;
537 struct iwl3945_station_entry stations[IWL_STATION_COUNT]; 537 struct iwl3945_station_entry stations_39[IWL_STATION_COUNT];
538 538
539 /* Indication if ieee80211_ops->open has been called */ 539 /* Indication if ieee80211_ops->open has been called */
540 u8 is_open; 540 u8 is_open;
@@ -546,7 +546,7 @@ struct iwl3945_priv {
546 u64 last_tsf; 546 u64 last_tsf;
547 547
548 /* eeprom */ 548 /* eeprom */
549 struct iwl3945_eeprom eeprom; 549 struct iwl3945_eeprom eeprom39;
550 550
551 enum nl80211_iftype iw_mode; 551 enum nl80211_iftype iw_mode;
552 552
@@ -607,7 +607,7 @@ struct iwl3945_priv {
607 607
608static inline int iwl3945_is_associated(struct iwl3945_priv *priv) 608static inline int iwl3945_is_associated(struct iwl3945_priv *priv)
609{ 609{
610 return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0; 610 return (priv->active39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
611} 611}
612 612
613extern const struct iwl_channel_info *iwl3945_get_channel_info( 613extern const struct iwl_channel_info *iwl3945_get_channel_info(
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index b42bb8433a5..43af2595c69 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -329,8 +329,8 @@ static u8 iwl3945_remove_station(struct iwl3945_priv *priv, const u8 *addr, int
329 index = priv->hw_params.bcast_sta_id; 329 index = priv->hw_params.bcast_sta_id;
330 else 330 else
331 for (i = IWL_STA_ID; i < priv->hw_params.max_stations; i++) 331 for (i = IWL_STA_ID; i < priv->hw_params.max_stations; i++)
332 if (priv->stations[i].used && 332 if (priv->stations_39[i].used &&
333 !compare_ether_addr(priv->stations[i].sta.sta.addr, 333 !compare_ether_addr(priv->stations_39[i].sta.sta.addr,
334 addr)) { 334 addr)) {
335 index = i; 335 index = i;
336 break; 336 break;
@@ -339,8 +339,8 @@ static u8 iwl3945_remove_station(struct iwl3945_priv *priv, const u8 *addr, int
339 if (unlikely(index == IWL_INVALID_STATION)) 339 if (unlikely(index == IWL_INVALID_STATION))
340 goto out; 340 goto out;
341 341
342 if (priv->stations[index].used) { 342 if (priv->stations_39[index].used) {
343 priv->stations[index].used = 0; 343 priv->stations_39[index].used = 0;
344 priv->num_stations--; 344 priv->num_stations--;
345 } 345 }
346 346
@@ -364,7 +364,7 @@ static void iwl3945_clear_stations_table(struct iwl3945_priv *priv)
364 spin_lock_irqsave(&priv->sta_lock, flags); 364 spin_lock_irqsave(&priv->sta_lock, flags);
365 365
366 priv->num_stations = 0; 366 priv->num_stations = 0;
367 memset(priv->stations, 0, sizeof(priv->stations)); 367 memset(priv->stations_39, 0, sizeof(priv->stations_39));
368 368
369 spin_unlock_irqrestore(&priv->sta_lock, flags); 369 spin_unlock_irqrestore(&priv->sta_lock, flags);
370} 370}
@@ -387,13 +387,13 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8
387 index = priv->hw_params.bcast_sta_id; 387 index = priv->hw_params.bcast_sta_id;
388 else 388 else
389 for (i = IWL_STA_ID; i < priv->hw_params.max_stations; i++) { 389 for (i = IWL_STA_ID; i < priv->hw_params.max_stations; i++) {
390 if (!compare_ether_addr(priv->stations[i].sta.sta.addr, 390 if (!compare_ether_addr(priv->stations_39[i].sta.sta.addr,
391 addr)) { 391 addr)) {
392 index = i; 392 index = i;
393 break; 393 break;
394 } 394 }
395 395
396 if (!priv->stations[i].used && 396 if (!priv->stations_39[i].used &&
397 index == IWL_INVALID_STATION) 397 index == IWL_INVALID_STATION)
398 index = i; 398 index = i;
399 } 399 }
@@ -405,14 +405,14 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8
405 return index; 405 return index;
406 } 406 }
407 407
408 if (priv->stations[index].used && 408 if (priv->stations_39[index].used &&
409 !compare_ether_addr(priv->stations[index].sta.sta.addr, addr)) { 409 !compare_ether_addr(priv->stations_39[index].sta.sta.addr, addr)) {
410 spin_unlock_irqrestore(&priv->sta_lock, flags_spin); 410 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
411 return index; 411 return index;
412 } 412 }
413 413
414 IWL_DEBUG_ASSOC("Add STA ID %d: %pM\n", index, addr); 414 IWL_DEBUG_ASSOC("Add STA ID %d: %pM\n", index, addr);
415 station = &priv->stations[index]; 415 station = &priv->stations_39[index];
416 station->used = 1; 416 station->used = 1;
417 priv->num_stations++; 417 priv->num_stations++;
418 418
@@ -502,7 +502,7 @@ static inline int iwl3945_is_ready_rf(struct iwl3945_priv *priv)
502 */ 502 */
503static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd) 503static int iwl3945_enqueue_hcmd(struct iwl3945_priv *priv, struct iwl3945_host_cmd *cmd)
504{ 504{
505 struct iwl3945_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM]; 505 struct iwl3945_tx_queue *txq = &priv->txq39[IWL_CMD_QUEUE_NUM];
506 struct iwl_queue *q = &txq->q; 506 struct iwl_queue *q = &txq->q;
507 struct iwl3945_tfd_frame *tfd; 507 struct iwl3945_tfd_frame *tfd;
508 u32 *control_flags; 508 u32 *control_flags;
@@ -678,7 +678,7 @@ cancel:
678 * TX cmd queue. Otherwise in case the cmd comes 678 * TX cmd queue. Otherwise in case the cmd comes
679 * in later, it will possibly set an invalid 679 * in later, it will possibly set an invalid
680 * address (cmd->meta.source). */ 680 * address (cmd->meta.source). */
681 qcmd = &priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_idx]; 681 qcmd = &priv->txq39[IWL_CMD_QUEUE_NUM].cmd[cmd_idx];
682 qcmd->meta.flags &= ~CMD_WANT_SKB; 682 qcmd->meta.flags &= ~CMD_WANT_SKB;
683 } 683 }
684fail: 684fail:
@@ -746,15 +746,15 @@ static int iwl3945_set_rxon_channel(struct iwl3945_priv *priv,
746 return -EINVAL; 746 return -EINVAL;
747 } 747 }
748 748
749 if ((le16_to_cpu(priv->staging_rxon.channel) == channel) && 749 if ((le16_to_cpu(priv->staging39_rxon.channel) == channel) &&
750 (priv->band == band)) 750 (priv->band == band))
751 return 0; 751 return 0;
752 752
753 priv->staging_rxon.channel = cpu_to_le16(channel); 753 priv->staging39_rxon.channel = cpu_to_le16(channel);
754 if (band == IEEE80211_BAND_5GHZ) 754 if (band == IEEE80211_BAND_5GHZ)
755 priv->staging_rxon.flags &= ~RXON_FLG_BAND_24G_MSK; 755 priv->staging39_rxon.flags &= ~RXON_FLG_BAND_24G_MSK;
756 else 756 else
757 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK; 757 priv->staging39_rxon.flags |= RXON_FLG_BAND_24G_MSK;
758 758
759 priv->band = band; 759 priv->band = band;
760 760
@@ -774,7 +774,7 @@ static int iwl3945_check_rxon_cmd(struct iwl3945_priv *priv)
774{ 774{
775 int error = 0; 775 int error = 0;
776 int counter = 1; 776 int counter = 1;
777 struct iwl3945_rxon_cmd *rxon = &priv->staging_rxon; 777 struct iwl3945_rxon_cmd *rxon = &priv->staging39_rxon;
778 778
779 if (rxon->flags & RXON_FLG_BAND_24G_MSK) { 779 if (rxon->flags & RXON_FLG_BAND_24G_MSK) {
780 error |= le32_to_cpu(rxon->flags & 780 error |= le32_to_cpu(rxon->flags &
@@ -856,17 +856,17 @@ static int iwl3945_full_rxon_required(struct iwl3945_priv *priv)
856 856
857 /* These items are only settable from the full RXON command */ 857 /* These items are only settable from the full RXON command */
858 if (!(iwl3945_is_associated(priv)) || 858 if (!(iwl3945_is_associated(priv)) ||
859 compare_ether_addr(priv->staging_rxon.bssid_addr, 859 compare_ether_addr(priv->staging39_rxon.bssid_addr,
860 priv->active_rxon.bssid_addr) || 860 priv->active39_rxon.bssid_addr) ||
861 compare_ether_addr(priv->staging_rxon.node_addr, 861 compare_ether_addr(priv->staging39_rxon.node_addr,
862 priv->active_rxon.node_addr) || 862 priv->active39_rxon.node_addr) ||
863 compare_ether_addr(priv->staging_rxon.wlap_bssid_addr, 863 compare_ether_addr(priv->staging39_rxon.wlap_bssid_addr,
864 priv->active_rxon.wlap_bssid_addr) || 864 priv->active39_rxon.wlap_bssid_addr) ||
865 (priv->staging_rxon.dev_type != priv->active_rxon.dev_type) || 865 (priv->staging39_rxon.dev_type != priv->active39_rxon.dev_type) ||
866 (priv->staging_rxon.channel != priv->active_rxon.channel) || 866 (priv->staging39_rxon.channel != priv->active39_rxon.channel) ||
867 (priv->staging_rxon.air_propagation != 867 (priv->staging39_rxon.air_propagation !=
868 priv->active_rxon.air_propagation) || 868 priv->active39_rxon.air_propagation) ||
869 (priv->staging_rxon.assoc_id != priv->active_rxon.assoc_id)) 869 (priv->staging39_rxon.assoc_id != priv->active39_rxon.assoc_id))
870 return 1; 870 return 1;
871 871
872 /* flags, filter_flags, ofdm_basic_rates, and cck_basic_rates can 872 /* flags, filter_flags, ofdm_basic_rates, and cck_basic_rates can
@@ -874,13 +874,13 @@ static int iwl3945_full_rxon_required(struct iwl3945_priv *priv)
874 * flag transitions are allowed using RXON_ASSOC */ 874 * flag transitions are allowed using RXON_ASSOC */
875 875
876 /* Check if we are not switching bands */ 876 /* Check if we are not switching bands */
877 if ((priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) != 877 if ((priv->staging39_rxon.flags & RXON_FLG_BAND_24G_MSK) !=
878 (priv->active_rxon.flags & RXON_FLG_BAND_24G_MSK)) 878 (priv->active39_rxon.flags & RXON_FLG_BAND_24G_MSK))
879 return 1; 879 return 1;
880 880
881 /* Check if we are switching association toggle */ 881 /* Check if we are switching association toggle */
882 if ((priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) != 882 if ((priv->staging39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) !=
883 (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK)) 883 (priv->active39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK))
884 return 1; 884 return 1;
885 885
886 return 0; 886 return 0;
@@ -897,8 +897,8 @@ static int iwl3945_send_rxon_assoc(struct iwl3945_priv *priv)
897 .meta.flags = CMD_WANT_SKB, 897 .meta.flags = CMD_WANT_SKB,
898 .data = &rxon_assoc, 898 .data = &rxon_assoc,
899 }; 899 };
900 const struct iwl3945_rxon_cmd *rxon1 = &priv->staging_rxon; 900 const struct iwl3945_rxon_cmd *rxon1 = &priv->staging39_rxon;
901 const struct iwl3945_rxon_cmd *rxon2 = &priv->active_rxon; 901 const struct iwl3945_rxon_cmd *rxon2 = &priv->active39_rxon;
902 902
903 if ((rxon1->flags == rxon2->flags) && 903 if ((rxon1->flags == rxon2->flags) &&
904 (rxon1->filter_flags == rxon2->filter_flags) && 904 (rxon1->filter_flags == rxon2->filter_flags) &&
@@ -908,10 +908,10 @@ static int iwl3945_send_rxon_assoc(struct iwl3945_priv *priv)
908 return 0; 908 return 0;
909 } 909 }
910 910
911 rxon_assoc.flags = priv->staging_rxon.flags; 911 rxon_assoc.flags = priv->staging39_rxon.flags;
912 rxon_assoc.filter_flags = priv->staging_rxon.filter_flags; 912 rxon_assoc.filter_flags = priv->staging39_rxon.filter_flags;
913 rxon_assoc.ofdm_basic_rates = priv->staging_rxon.ofdm_basic_rates; 913 rxon_assoc.ofdm_basic_rates = priv->staging39_rxon.ofdm_basic_rates;
914 rxon_assoc.cck_basic_rates = priv->staging_rxon.cck_basic_rates; 914 rxon_assoc.cck_basic_rates = priv->staging39_rxon.cck_basic_rates;
915 rxon_assoc.reserved = 0; 915 rxon_assoc.reserved = 0;
916 916
917 rc = iwl3945_send_cmd_sync(priv, &cmd); 917 rc = iwl3945_send_cmd_sync(priv, &cmd);
@@ -941,19 +941,19 @@ static int iwl3945_send_rxon_assoc(struct iwl3945_priv *priv)
941static int iwl3945_commit_rxon(struct iwl3945_priv *priv) 941static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
942{ 942{
943 /* cast away the const for active_rxon in this function */ 943 /* cast away the const for active_rxon in this function */
944 struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 944 struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active39_rxon;
945 int rc = 0; 945 int rc = 0;
946 946
947 if (!iwl3945_is_alive(priv)) 947 if (!iwl3945_is_alive(priv))
948 return -1; 948 return -1;
949 949
950 /* always get timestamp with Rx frame */ 950 /* always get timestamp with Rx frame */
951 priv->staging_rxon.flags |= RXON_FLG_TSF2HOST_MSK; 951 priv->staging39_rxon.flags |= RXON_FLG_TSF2HOST_MSK;
952 952
953 /* select antenna */ 953 /* select antenna */
954 priv->staging_rxon.flags &= 954 priv->staging39_rxon.flags &=
955 ~(RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_SEL_MSK); 955 ~(RXON_FLG_DIS_DIV_MSK | RXON_FLG_ANT_SEL_MSK);
956 priv->staging_rxon.flags |= iwl3945_get_antenna_flags(priv); 956 priv->staging39_rxon.flags |= iwl3945_get_antenna_flags(priv);
957 957
958 rc = iwl3945_check_rxon_cmd(priv); 958 rc = iwl3945_check_rxon_cmd(priv);
959 if (rc) { 959 if (rc) {
@@ -972,7 +972,7 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
972 return rc; 972 return rc;
973 } 973 }
974 974
975 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 975 memcpy(active_rxon, &priv->staging39_rxon, sizeof(*active_rxon));
976 976
977 return 0; 977 return 0;
978 } 978 }
@@ -982,13 +982,13 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
982 * we must clear the associated from the active configuration 982 * we must clear the associated from the active configuration
983 * before we apply the new config */ 983 * before we apply the new config */
984 if (iwl3945_is_associated(priv) && 984 if (iwl3945_is_associated(priv) &&
985 (priv->staging_rxon.filter_flags & RXON_FILTER_ASSOC_MSK)) { 985 (priv->staging39_rxon.filter_flags & RXON_FILTER_ASSOC_MSK)) {
986 IWL_DEBUG_INFO("Toggling associated bit on current RXON\n"); 986 IWL_DEBUG_INFO("Toggling associated bit on current RXON\n");
987 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; 987 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
988 988
989 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON, 989 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON,
990 sizeof(struct iwl3945_rxon_cmd), 990 sizeof(struct iwl3945_rxon_cmd),
991 &priv->active_rxon); 991 &priv->active39_rxon);
992 992
993 /* If the mask clearing failed then we set 993 /* If the mask clearing failed then we set
994 * active_rxon back to what it was previously */ 994 * active_rxon back to what it was previously */
@@ -1004,20 +1004,20 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1004 "* with%s RXON_FILTER_ASSOC_MSK\n" 1004 "* with%s RXON_FILTER_ASSOC_MSK\n"
1005 "* channel = %d\n" 1005 "* channel = %d\n"
1006 "* bssid = %pM\n", 1006 "* bssid = %pM\n",
1007 ((priv->staging_rxon.filter_flags & 1007 ((priv->staging39_rxon.filter_flags &
1008 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1008 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1009 le16_to_cpu(priv->staging_rxon.channel), 1009 le16_to_cpu(priv->staging39_rxon.channel),
1010 priv->staging_rxon.bssid_addr); 1010 priv->staging_rxon.bssid_addr);
1011 1011
1012 /* Apply the new configuration */ 1012 /* Apply the new configuration */
1013 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON, 1013 rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON,
1014 sizeof(struct iwl3945_rxon_cmd), &priv->staging_rxon); 1014 sizeof(struct iwl3945_rxon_cmd), &priv->staging39_rxon);
1015 if (rc) { 1015 if (rc) {
1016 IWL_ERROR("Error setting new configuration (%d).\n", rc); 1016 IWL_ERROR("Error setting new configuration (%d).\n", rc);
1017 return rc; 1017 return rc;
1018 } 1018 }
1019 1019
1020 memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); 1020 memcpy(active_rxon, &priv->staging39_rxon, sizeof(*active_rxon));
1021 1021
1022 iwl3945_clear_stations_table(priv); 1022 iwl3945_clear_stations_table(priv);
1023 1023
@@ -1040,7 +1040,7 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1040 * add the IWL_AP_ID to the station rate table */ 1040 * add the IWL_AP_ID to the station rate table */
1041 if (iwl3945_is_associated(priv) && 1041 if (iwl3945_is_associated(priv) &&
1042 (priv->iw_mode == NL80211_IFTYPE_STATION)) 1042 (priv->iw_mode == NL80211_IFTYPE_STATION))
1043 if (iwl3945_add_station(priv, priv->active_rxon.bssid_addr, 1, 0) 1043 if (iwl3945_add_station(priv, priv->active39_rxon.bssid_addr, 1, 0)
1044 == IWL_INVALID_STATION) { 1044 == IWL_INVALID_STATION) {
1045 IWL_ERROR("Error adding AP address for transmit.\n"); 1045 IWL_ERROR("Error adding AP address for transmit.\n");
1046 return -EIO; 1046 return -EIO;
@@ -1238,21 +1238,21 @@ static int iwl3945_update_sta_key_info(struct iwl3945_priv *priv,
1238 return -EINVAL; 1238 return -EINVAL;
1239 } 1239 }
1240 spin_lock_irqsave(&priv->sta_lock, flags); 1240 spin_lock_irqsave(&priv->sta_lock, flags);
1241 priv->stations[sta_id].keyinfo.alg = keyconf->alg; 1241 priv->stations_39[sta_id].keyinfo.alg = keyconf->alg;
1242 priv->stations[sta_id].keyinfo.keylen = keyconf->keylen; 1242 priv->stations_39[sta_id].keyinfo.keylen = keyconf->keylen;
1243 memcpy(priv->stations[sta_id].keyinfo.key, keyconf->key, 1243 memcpy(priv->stations_39[sta_id].keyinfo.key, keyconf->key,
1244 keyconf->keylen); 1244 keyconf->keylen);
1245 1245
1246 memcpy(priv->stations[sta_id].sta.key.key, keyconf->key, 1246 memcpy(priv->stations_39[sta_id].sta.key.key, keyconf->key,
1247 keyconf->keylen); 1247 keyconf->keylen);
1248 priv->stations[sta_id].sta.key.key_flags = key_flags; 1248 priv->stations_39[sta_id].sta.key.key_flags = key_flags;
1249 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 1249 priv->stations_39[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
1250 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 1250 priv->stations_39[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
1251 1251
1252 spin_unlock_irqrestore(&priv->sta_lock, flags); 1252 spin_unlock_irqrestore(&priv->sta_lock, flags);
1253 1253
1254 IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n"); 1254 IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n");
1255 iwl3945_send_add_station(priv, &priv->stations[sta_id].sta, 0); 1255 iwl3945_send_add_station(priv, &priv->stations_39[sta_id].sta, 0);
1256 return 0; 1256 return 0;
1257} 1257}
1258 1258
@@ -1261,16 +1261,16 @@ static int iwl3945_clear_sta_key_info(struct iwl3945_priv *priv, u8 sta_id)
1261 unsigned long flags; 1261 unsigned long flags;
1262 1262
1263 spin_lock_irqsave(&priv->sta_lock, flags); 1263 spin_lock_irqsave(&priv->sta_lock, flags);
1264 memset(&priv->stations[sta_id].keyinfo, 0, sizeof(struct iwl3945_hw_key)); 1264 memset(&priv->stations_39[sta_id].keyinfo, 0, sizeof(struct iwl3945_hw_key));
1265 memset(&priv->stations[sta_id].sta.key, 0, 1265 memset(&priv->stations_39[sta_id].sta.key, 0,
1266 sizeof(struct iwl4965_keyinfo)); 1266 sizeof(struct iwl4965_keyinfo));
1267 priv->stations[sta_id].sta.key.key_flags = STA_KEY_FLG_NO_ENC; 1267 priv->stations_39[sta_id].sta.key.key_flags = STA_KEY_FLG_NO_ENC;
1268 priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; 1268 priv->stations_39[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK;
1269 priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; 1269 priv->stations_39[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK;
1270 spin_unlock_irqrestore(&priv->sta_lock, flags); 1270 spin_unlock_irqrestore(&priv->sta_lock, flags);
1271 1271
1272 IWL_DEBUG_INFO("hwcrypto: clear ucode station key info\n"); 1272 IWL_DEBUG_INFO("hwcrypto: clear ucode station key info\n");
1273 iwl3945_send_add_station(priv, &priv->stations[sta_id].sta, 0); 1273 iwl3945_send_add_station(priv, &priv->stations_39[sta_id].sta, 0);
1274 return 0; 1274 return 0;
1275} 1275}
1276 1276
@@ -1345,7 +1345,7 @@ static u8 iwl3945_rate_get_lowest_plcp(struct iwl3945_priv *priv)
1345 int rate_mask; 1345 int rate_mask;
1346 1346
1347 /* Set rate mask*/ 1347 /* Set rate mask*/
1348 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) 1348 if (priv->staging39_rxon.flags & RXON_FLG_BAND_24G_MSK)
1349 rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK; 1349 rate_mask = priv->active_rate_basic & IWL_CCK_RATES_MASK;
1350 else 1350 else
1351 rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK; 1351 rate_mask = priv->active_rate_basic & IWL_OFDM_RATES_MASK;
@@ -1357,7 +1357,7 @@ static u8 iwl3945_rate_get_lowest_plcp(struct iwl3945_priv *priv)
1357 } 1357 }
1358 1358
1359 /* No valid rate was found. Assign the lowest one */ 1359 /* No valid rate was found. Assign the lowest one */
1360 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) 1360 if (priv->staging39_rxon.flags & RXON_FLG_BAND_24G_MSK)
1361 return IWL_RATE_1M_PLCP; 1361 return IWL_RATE_1M_PLCP;
1362 else 1362 else
1363 return IWL_RATE_6M_PLCP; 1363 return IWL_RATE_6M_PLCP;
@@ -1398,7 +1398,7 @@ static int iwl3945_send_beacon_cmd(struct iwl3945_priv *priv)
1398 1398
1399static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac) 1399static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac)
1400{ 1400{
1401 memcpy(mac, priv->eeprom.mac_address, 6); 1401 memcpy(mac, priv->eeprom39.mac_address, 6);
1402} 1402}
1403 1403
1404/* 1404/*
@@ -1418,15 +1418,15 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)
1418/** 1418/**
1419 * iwl3945_eeprom_init - read EEPROM contents 1419 * iwl3945_eeprom_init - read EEPROM contents
1420 * 1420 *
1421 * Load the EEPROM contents from adapter into priv->eeprom 1421 * Load the EEPROM contents from adapter into priv->eeprom39
1422 * 1422 *
1423 * NOTE: This routine uses the non-debug IO access functions. 1423 * NOTE: This routine uses the non-debug IO access functions.
1424 */ 1424 */
1425int iwl3945_eeprom_init(struct iwl3945_priv *priv) 1425int iwl3945_eeprom_init(struct iwl3945_priv *priv)
1426{ 1426{
1427 u16 *e = (u16 *)&priv->eeprom; 1427 u16 *e = (u16 *)&priv->eeprom39;
1428 u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP); 1428 u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP);
1429 int sz = sizeof(priv->eeprom); 1429 int sz = sizeof(priv->eeprom39);
1430 int ret; 1430 int ret;
1431 u16 addr; 1431 u16 addr;
1432 1432
@@ -1434,7 +1434,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
1434 * and when adding new EEPROM maps is subject to programmer errors 1434 * and when adding new EEPROM maps is subject to programmer errors
1435 * which may be very difficult to identify without explicitly 1435 * which may be very difficult to identify without explicitly
1436 * checking the resulting size of the eeprom map. */ 1436 * checking the resulting size of the eeprom map. */
1437 BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE); 1437 BUILD_BUG_ON(sizeof(priv->eeprom39) != IWL_EEPROM_IMAGE_SIZE);
1438 1438
1439 if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { 1439 if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
1440 IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); 1440 IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp);
@@ -1625,7 +1625,7 @@ static void iwl3945_reset_qos(struct iwl3945_priv *priv)
1625 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC && 1625 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC &&
1626 (priv->active_rate & IWL_OFDM_RATES_MASK) == 0) || 1626 (priv->active_rate & IWL_OFDM_RATES_MASK) == 0) ||
1627 (priv->iw_mode == NL80211_IFTYPE_STATION && 1627 (priv->iw_mode == NL80211_IFTYPE_STATION &&
1628 (priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK) == 0)) { 1628 (priv->staging39_rxon.flags & RXON_FLG_SHORT_SLOT_MSK) == 0)) {
1629 cw_min = 31; 1629 cw_min = 31;
1630 is_legacy = 1; 1630 is_legacy = 1;
1631 } 1631 }
@@ -1769,7 +1769,7 @@ int iwl3945_power_init_handle(struct iwl3945_priv *priv)
1769 1769
1770 IWL_DEBUG_POWER("Initialize power \n"); 1770 IWL_DEBUG_POWER("Initialize power \n");
1771 1771
1772 pow_data = &(priv->power_data); 1772 pow_data = &(priv->power_data_39);
1773 1773
1774 memset(pow_data, 0, sizeof(*pow_data)); 1774 memset(pow_data, 0, sizeof(*pow_data));
1775 1775
@@ -1813,7 +1813,7 @@ static int iwl3945_update_power_cmd(struct iwl3945_priv *priv,
1813 IWL_DEBUG_POWER("Error invalid power mode \n"); 1813 IWL_DEBUG_POWER("Error invalid power mode \n");
1814 return -1; 1814 return -1;
1815 } 1815 }
1816 pow_data = &(priv->power_data); 1816 pow_data = &(priv->power_data_39);
1817 1817
1818 if (pow_data->active_index == IWL_POWER_RANGE_0) 1818 if (pow_data->active_index == IWL_POWER_RANGE_0)
1819 range = &pow_data->pwr_range_0[0]; 1819 range = &pow_data->pwr_range_0[0];
@@ -2053,7 +2053,7 @@ static int iwl3945_scan_initiate(struct iwl3945_priv *priv)
2053 2053
2054static int iwl3945_set_rxon_hwcrypto(struct iwl3945_priv *priv, int hw_decrypt) 2054static int iwl3945_set_rxon_hwcrypto(struct iwl3945_priv *priv, int hw_decrypt)
2055{ 2055{
2056 struct iwl3945_rxon_cmd *rxon = &priv->staging_rxon; 2056 struct iwl3945_rxon_cmd *rxon = &priv->staging39_rxon;
2057 2057
2058 if (hw_decrypt) 2058 if (hw_decrypt)
2059 rxon->filter_flags &= ~RXON_FILTER_DIS_DECRYPT_MSK; 2059 rxon->filter_flags &= ~RXON_FILTER_DIS_DECRYPT_MSK;
@@ -2067,23 +2067,23 @@ static void iwl3945_set_flags_for_phymode(struct iwl3945_priv *priv,
2067 enum ieee80211_band band) 2067 enum ieee80211_band band)
2068{ 2068{
2069 if (band == IEEE80211_BAND_5GHZ) { 2069 if (band == IEEE80211_BAND_5GHZ) {
2070 priv->staging_rxon.flags &= 2070 priv->staging39_rxon.flags &=
2071 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK 2071 ~(RXON_FLG_BAND_24G_MSK | RXON_FLG_AUTO_DETECT_MSK
2072 | RXON_FLG_CCK_MSK); 2072 | RXON_FLG_CCK_MSK);
2073 priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; 2073 priv->staging39_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
2074 } else { 2074 } else {
2075 /* Copied from iwl3945_bg_post_associate() */ 2075 /* Copied from iwl3945_bg_post_associate() */
2076 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) 2076 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
2077 priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; 2077 priv->staging39_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
2078 else 2078 else
2079 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2079 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2080 2080
2081 if (priv->iw_mode == NL80211_IFTYPE_ADHOC) 2081 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
2082 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2082 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2083 2083
2084 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK; 2084 priv->staging39_rxon.flags |= RXON_FLG_BAND_24G_MSK;
2085 priv->staging_rxon.flags |= RXON_FLG_AUTO_DETECT_MSK; 2085 priv->staging39_rxon.flags |= RXON_FLG_AUTO_DETECT_MSK;
2086 priv->staging_rxon.flags &= ~RXON_FLG_CCK_MSK; 2086 priv->staging39_rxon.flags &= ~RXON_FLG_CCK_MSK;
2087 } 2087 }
2088} 2088}
2089 2089
@@ -2095,28 +2095,28 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv,
2095{ 2095{
2096 const struct iwl_channel_info *ch_info; 2096 const struct iwl_channel_info *ch_info;
2097 2097
2098 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon)); 2098 memset(&priv->staging39_rxon, 0, sizeof(priv->staging39_rxon));
2099 2099
2100 switch (mode) { 2100 switch (mode) {
2101 case NL80211_IFTYPE_AP: 2101 case NL80211_IFTYPE_AP:
2102 priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP; 2102 priv->staging39_rxon.dev_type = RXON_DEV_TYPE_AP;
2103 break; 2103 break;
2104 2104
2105 case NL80211_IFTYPE_STATION: 2105 case NL80211_IFTYPE_STATION:
2106 priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS; 2106 priv->staging39_rxon.dev_type = RXON_DEV_TYPE_ESS;
2107 priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; 2107 priv->staging39_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK;
2108 break; 2108 break;
2109 2109
2110 case NL80211_IFTYPE_ADHOC: 2110 case NL80211_IFTYPE_ADHOC:
2111 priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS; 2111 priv->staging39_rxon.dev_type = RXON_DEV_TYPE_IBSS;
2112 priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK; 2112 priv->staging39_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK;
2113 priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK | 2113 priv->staging39_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK |
2114 RXON_FILTER_ACCEPT_GRP_MSK; 2114 RXON_FILTER_ACCEPT_GRP_MSK;
2115 break; 2115 break;
2116 2116
2117 case NL80211_IFTYPE_MONITOR: 2117 case NL80211_IFTYPE_MONITOR:
2118 priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER; 2118 priv->staging39_rxon.dev_type = RXON_DEV_TYPE_SNIFFER;
2119 priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK | 2119 priv->staging39_rxon.filter_flags = RXON_FILTER_PROMISC_MSK |
2120 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; 2120 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK;
2121 break; 2121 break;
2122 default: 2122 default:
@@ -2128,13 +2128,13 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv,
2128 /* TODO: Figure out when short_preamble would be set and cache from 2128 /* TODO: Figure out when short_preamble would be set and cache from
2129 * that */ 2129 * that */
2130 if (!hw_to_local(priv->hw)->short_preamble) 2130 if (!hw_to_local(priv->hw)->short_preamble)
2131 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; 2131 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
2132 else 2132 else
2133 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; 2133 priv->staging39_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
2134#endif 2134#endif
2135 2135
2136 ch_info = iwl3945_get_channel_info(priv, priv->band, 2136 ch_info = iwl3945_get_channel_info(priv, priv->band,
2137 le16_to_cpu(priv->active_rxon.channel)); 2137 le16_to_cpu(priv->active39_rxon.channel));
2138 2138
2139 if (!ch_info) 2139 if (!ch_info)
2140 ch_info = &priv->channel_info[0]; 2140 ch_info = &priv->channel_info[0];
@@ -2146,7 +2146,7 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv,
2146 if ((mode == NL80211_IFTYPE_ADHOC) && !(is_channel_ibss(ch_info))) 2146 if ((mode == NL80211_IFTYPE_ADHOC) && !(is_channel_ibss(ch_info)))
2147 ch_info = &priv->channel_info[0]; 2147 ch_info = &priv->channel_info[0];
2148 2148
2149 priv->staging_rxon.channel = cpu_to_le16(ch_info->channel); 2149 priv->staging39_rxon.channel = cpu_to_le16(ch_info->channel);
2150 if (is_channel_a_band(ch_info)) 2150 if (is_channel_a_band(ch_info))
2151 priv->band = IEEE80211_BAND_5GHZ; 2151 priv->band = IEEE80211_BAND_5GHZ;
2152 else 2152 else
@@ -2154,9 +2154,9 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv,
2154 2154
2155 iwl3945_set_flags_for_phymode(priv, priv->band); 2155 iwl3945_set_flags_for_phymode(priv, priv->band);
2156 2156
2157 priv->staging_rxon.ofdm_basic_rates = 2157 priv->staging39_rxon.ofdm_basic_rates =
2158 (IWL_OFDM_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; 2158 (IWL_OFDM_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
2159 priv->staging_rxon.cck_basic_rates = 2159 priv->staging39_rxon.cck_basic_rates =
2160 (IWL_CCK_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF; 2160 (IWL_CCK_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
2161} 2161}
2162 2162
@@ -2167,17 +2167,17 @@ static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode)
2167 2167
2168 ch_info = iwl3945_get_channel_info(priv, 2168 ch_info = iwl3945_get_channel_info(priv,
2169 priv->band, 2169 priv->band,
2170 le16_to_cpu(priv->staging_rxon.channel)); 2170 le16_to_cpu(priv->staging39_rxon.channel));
2171 2171
2172 if (!ch_info || !is_channel_ibss(ch_info)) { 2172 if (!ch_info || !is_channel_ibss(ch_info)) {
2173 IWL_ERROR("channel %d not IBSS channel\n", 2173 IWL_ERROR("channel %d not IBSS channel\n",
2174 le16_to_cpu(priv->staging_rxon.channel)); 2174 le16_to_cpu(priv->staging39_rxon.channel));
2175 return -EINVAL; 2175 return -EINVAL;
2176 } 2176 }
2177 } 2177 }
2178 2178
2179 iwl3945_connection_init_rx_config(priv, mode); 2179 iwl3945_connection_init_rx_config(priv, mode);
2180 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 2180 memcpy(priv->staging39_rxon.node_addr, priv->mac_addr, ETH_ALEN);
2181 2181
2182 iwl3945_clear_stations_table(priv); 2182 iwl3945_clear_stations_table(priv);
2183 2183
@@ -2204,7 +2204,7 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl3945_priv *priv,
2204 int last_frag) 2204 int last_frag)
2205{ 2205{
2206 struct iwl3945_hw_key *keyinfo = 2206 struct iwl3945_hw_key *keyinfo =
2207 &priv->stations[info->control.hw_key->hw_key_idx].keyinfo; 2207 &priv->stations_39[info->control.hw_key->hw_key_idx].keyinfo;
2208 2208
2209 switch (keyinfo->alg) { 2209 switch (keyinfo->alg) {
2210 case ALG_CCMP: 2210 case ALG_CCMP:
@@ -2446,7 +2446,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
2446 if (ieee80211_is_data_qos(fc)) { 2446 if (ieee80211_is_data_qos(fc)) {
2447 qc = ieee80211_get_qos_ctl(hdr); 2447 qc = ieee80211_get_qos_ctl(hdr);
2448 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK; 2448 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
2449 seq_number = priv->stations[sta_id].tid[tid].seq_number & 2449 seq_number = priv->stations_39[sta_id].tid[tid].seq_number &
2450 IEEE80211_SCTL_SEQ; 2450 IEEE80211_SCTL_SEQ;
2451 hdr->seq_ctrl = cpu_to_le16(seq_number) | 2451 hdr->seq_ctrl = cpu_to_le16(seq_number) |
2452 (hdr->seq_ctrl & 2452 (hdr->seq_ctrl &
@@ -2455,7 +2455,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
2455 } 2455 }
2456 2456
2457 /* Descriptor for chosen Tx queue */ 2457 /* Descriptor for chosen Tx queue */
2458 txq = &priv->txq[txq_id]; 2458 txq = &priv->txq39[txq_id];
2459 q = &txq->q; 2459 q = &txq->q;
2460 2460
2461 spin_lock_irqsave(&priv->lock, flags); 2461 spin_lock_irqsave(&priv->lock, flags);
@@ -2554,7 +2554,7 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
2554 if (!ieee80211_has_morefrags(hdr->frame_control)) { 2554 if (!ieee80211_has_morefrags(hdr->frame_control)) {
2555 txq->need_update = 1; 2555 txq->need_update = 1;
2556 if (qc) 2556 if (qc)
2557 priv->stations[sta_id].tid[tid].seq_number = seq_number; 2557 priv->stations_39[sta_id].tid[tid].seq_number = seq_number;
2558 } else { 2558 } else {
2559 wait_write_ptr = 1; 2559 wait_write_ptr = 1;
2560 txq->need_update = 0; 2560 txq->need_update = 0;
@@ -2631,20 +2631,20 @@ static void iwl3945_set_rate(struct iwl3945_priv *priv)
2631 * OFDM 2631 * OFDM
2632 */ 2632 */
2633 if (priv->active_rate_basic & IWL_CCK_BASIC_RATES_MASK) 2633 if (priv->active_rate_basic & IWL_CCK_BASIC_RATES_MASK)
2634 priv->staging_rxon.cck_basic_rates = 2634 priv->staging39_rxon.cck_basic_rates =
2635 ((priv->active_rate_basic & 2635 ((priv->active_rate_basic &
2636 IWL_CCK_RATES_MASK) >> IWL_FIRST_CCK_RATE) & 0xF; 2636 IWL_CCK_RATES_MASK) >> IWL_FIRST_CCK_RATE) & 0xF;
2637 else 2637 else
2638 priv->staging_rxon.cck_basic_rates = 2638 priv->staging39_rxon.cck_basic_rates =
2639 (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF; 2639 (IWL_CCK_BASIC_RATES_MASK >> IWL_FIRST_CCK_RATE) & 0xF;
2640 2640
2641 if (priv->active_rate_basic & IWL_OFDM_BASIC_RATES_MASK) 2641 if (priv->active_rate_basic & IWL_OFDM_BASIC_RATES_MASK)
2642 priv->staging_rxon.ofdm_basic_rates = 2642 priv->staging39_rxon.ofdm_basic_rates =
2643 ((priv->active_rate_basic & 2643 ((priv->active_rate_basic &
2644 (IWL_OFDM_BASIC_RATES_MASK | IWL_RATE_6M_MASK)) >> 2644 (IWL_OFDM_BASIC_RATES_MASK | IWL_RATE_6M_MASK)) >>
2645 IWL_FIRST_OFDM_RATE) & 0xFF; 2645 IWL_FIRST_OFDM_RATE) & 0xFF;
2646 else 2646 else
2647 priv->staging_rxon.ofdm_basic_rates = 2647 priv->staging39_rxon.ofdm_basic_rates =
2648 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF; 2648 (IWL_OFDM_BASIC_RATES_MASK >> IWL_FIRST_OFDM_RATE) & 0xFF;
2649} 2649}
2650 2650
@@ -2704,7 +2704,7 @@ void iwl3945_set_decrypted_flag(struct iwl3945_priv *priv, struct sk_buff *skb,
2704 u16 fc = 2704 u16 fc =
2705 le16_to_cpu(((struct ieee80211_hdr *)skb->data)->frame_control); 2705 le16_to_cpu(((struct ieee80211_hdr *)skb->data)->frame_control);
2706 2706
2707 if (priv->active_rxon.filter_flags & RXON_FILTER_DIS_DECRYPT_MSK) 2707 if (priv->active39_rxon.filter_flags & RXON_FILTER_DIS_DECRYPT_MSK)
2708 return; 2708 return;
2709 2709
2710 if (!(fc & IEEE80211_FCTL_PROTECTED)) 2710 if (!(fc & IEEE80211_FCTL_PROTECTED))
@@ -2825,7 +2825,7 @@ static int iwl3945_get_measurement(struct iwl3945_priv *priv,
2825 spectrum.channels[0].duration = cpu_to_le32(duration * TIME_UNIT); 2825 spectrum.channels[0].duration = cpu_to_le32(duration * TIME_UNIT);
2826 spectrum.channels[0].channel = params->channel; 2826 spectrum.channels[0].channel = params->channel;
2827 spectrum.channels[0].type = type; 2827 spectrum.channels[0].type = type;
2828 if (priv->active_rxon.flags & RXON_FLG_BAND_24G_MSK) 2828 if (priv->active39_rxon.flags & RXON_FLG_BAND_24G_MSK)
2829 spectrum.flags |= RXON_FLG_BAND_24G_MSK | 2829 spectrum.flags |= RXON_FLG_BAND_24G_MSK |
2830 RXON_FLG_AUTO_DETECT_MSK | RXON_FLG_TGG_PROTECT_MSK; 2830 RXON_FLG_AUTO_DETECT_MSK | RXON_FLG_TGG_PROTECT_MSK;
2831 2831
@@ -2926,12 +2926,12 @@ static void iwl3945_rx_reply_error(struct iwl3945_priv *priv,
2926static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb) 2926static void iwl3945_rx_csa(struct iwl3945_priv *priv, struct iwl_rx_mem_buffer *rxb)
2927{ 2927{
2928 struct iwl_rx_packet *pkt = (void *)rxb->skb->data; 2928 struct iwl_rx_packet *pkt = (void *)rxb->skb->data;
2929 struct iwl3945_rxon_cmd *rxon = (void *)&priv->active_rxon; 2929 struct iwl3945_rxon_cmd *rxon = (void *)&priv->active39_rxon;
2930 struct iwl_csa_notification *csa = &(pkt->u.csa_notif); 2930 struct iwl_csa_notification *csa = &(pkt->u.csa_notif);
2931 IWL_DEBUG_11H("CSA notif: channel %d, status %d\n", 2931 IWL_DEBUG_11H("CSA notif: channel %d, status %d\n",
2932 le16_to_cpu(csa->channel), le32_to_cpu(csa->status)); 2932 le16_to_cpu(csa->channel), le32_to_cpu(csa->status));
2933 rxon->channel = csa->channel; 2933 rxon->channel = csa->channel;
2934 priv->staging_rxon.channel = csa->channel; 2934 priv->staging39_rxon.channel = csa->channel;
2935} 2935}
2936 2936
2937static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv, 2937static void iwl3945_rx_spectrum_measure_notif(struct iwl3945_priv *priv,
@@ -3226,7 +3226,7 @@ static void iwl3945_setup_rx_handlers(struct iwl3945_priv *priv)
3226static void iwl3945_cmd_queue_reclaim(struct iwl3945_priv *priv, 3226static void iwl3945_cmd_queue_reclaim(struct iwl3945_priv *priv,
3227 int txq_id, int index) 3227 int txq_id, int index)
3228{ 3228{
3229 struct iwl3945_tx_queue *txq = &priv->txq[txq_id]; 3229 struct iwl3945_tx_queue *txq = &priv->txq39[txq_id];
3230 struct iwl_queue *q = &txq->q; 3230 struct iwl_queue *q = &txq->q;
3231 int nfreed = 0; 3231 int nfreed = 0;
3232 3232
@@ -3271,8 +3271,8 @@ static void iwl3945_tx_cmd_complete(struct iwl3945_priv *priv,
3271 3271
3272 BUG_ON(txq_id != IWL_CMD_QUEUE_NUM); 3272 BUG_ON(txq_id != IWL_CMD_QUEUE_NUM);
3273 3273
3274 cmd_index = get_cmd_index(&priv->txq[IWL_CMD_QUEUE_NUM].q, index, huge); 3274 cmd_index = get_cmd_index(&priv->txq39[IWL_CMD_QUEUE_NUM].q, index, huge);
3275 cmd = &priv->txq[IWL_CMD_QUEUE_NUM].cmd[cmd_index]; 3275 cmd = &priv->txq39[IWL_CMD_QUEUE_NUM].cmd[cmd_index];
3276 3276
3277 /* Input error checking is done when commands are added to queue. */ 3277 /* Input error checking is done when commands are added to queue. */
3278 if (cmd->meta.flags & CMD_WANT_SKB) { 3278 if (cmd->meta.flags & CMD_WANT_SKB) {
@@ -4113,7 +4113,7 @@ static void iwl3945_irq_handle_error(struct iwl3945_priv *priv)
4113 if (priv->debug_level & IWL_DL_FW_ERRORS) { 4113 if (priv->debug_level & IWL_DL_FW_ERRORS) {
4114 iwl3945_dump_nic_error_log(priv); 4114 iwl3945_dump_nic_error_log(priv);
4115 iwl3945_dump_nic_event_log(priv); 4115 iwl3945_dump_nic_event_log(priv);
4116 iwl3945_print_rx_config_cmd(priv, &priv->staging_rxon); 4116 iwl3945_print_rx_config_cmd(priv, &priv->staging39_rxon);
4117 } 4117 }
4118#endif 4118#endif
4119 4119
@@ -4128,8 +4128,8 @@ static void iwl3945_irq_handle_error(struct iwl3945_priv *priv)
4128 "Restarting adapter due to uCode error.\n"); 4128 "Restarting adapter due to uCode error.\n");
4129 4129
4130 if (iwl3945_is_associated(priv)) { 4130 if (iwl3945_is_associated(priv)) {
4131 memcpy(&priv->recovery_rxon, &priv->active_rxon, 4131 memcpy(&priv->recovery39_rxon, &priv->active39_rxon,
4132 sizeof(priv->recovery_rxon)); 4132 sizeof(priv->recovery39_rxon));
4133 priv->error_recovering = 1; 4133 priv->error_recovering = 1;
4134 } 4134 }
4135 queue_work(priv->workqueue, &priv->restart); 4135 queue_work(priv->workqueue, &priv->restart);
@@ -4140,15 +4140,15 @@ static void iwl3945_error_recovery(struct iwl3945_priv *priv)
4140{ 4140{
4141 unsigned long flags; 4141 unsigned long flags;
4142 4142
4143 memcpy(&priv->staging_rxon, &priv->recovery_rxon, 4143 memcpy(&priv->staging39_rxon, &priv->recovery39_rxon,
4144 sizeof(priv->staging_rxon)); 4144 sizeof(priv->staging39_rxon));
4145 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 4145 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
4146 iwl3945_commit_rxon(priv); 4146 iwl3945_commit_rxon(priv);
4147 4147
4148 iwl3945_add_station(priv, priv->bssid, 1, 0); 4148 iwl3945_add_station(priv, priv->bssid, 1, 0);
4149 4149
4150 spin_lock_irqsave(&priv->lock, flags); 4150 spin_lock_irqsave(&priv->lock, flags);
4151 priv->assoc_id = le16_to_cpu(priv->staging_rxon.assoc_id); 4151 priv->assoc_id = le16_to_cpu(priv->staging39_rxon.assoc_id);
4152 priv->error_recovering = 0; 4152 priv->error_recovering = 0;
4153 spin_unlock_irqrestore(&priv->lock, flags); 4153 spin_unlock_irqrestore(&priv->lock, flags);
4154} 4154}
@@ -4237,12 +4237,12 @@ static void iwl3945_irq_tasklet(struct iwl3945_priv *priv)
4237 if (inta & CSR_INT_BIT_WAKEUP) { 4237 if (inta & CSR_INT_BIT_WAKEUP) {
4238 IWL_DEBUG_ISR("Wakeup interrupt\n"); 4238 IWL_DEBUG_ISR("Wakeup interrupt\n");
4239 iwl3945_rx_queue_update_write_ptr(priv, &priv->rxq); 4239 iwl3945_rx_queue_update_write_ptr(priv, &priv->rxq);
4240 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[0]); 4240 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[0]);
4241 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[1]); 4241 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[1]);
4242 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[2]); 4242 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[2]);
4243 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[3]); 4243 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[3]);
4244 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[4]); 4244 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[4]);
4245 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq[5]); 4245 iwl3945_tx_queue_update_write_ptr(priv, &priv->txq39[5]);
4246 4246
4247 handled |= CSR_INT_BIT_WAKEUP; 4247 handled |= CSR_INT_BIT_WAKEUP;
4248 } 4248 }
@@ -4356,7 +4356,7 @@ unplugged:
4356 * EEPROM contents to the specific channel number supported for each 4356 * EEPROM contents to the specific channel number supported for each
4357 * band. 4357 * band.
4358 * 4358 *
4359 * For example, iwl3945_priv->eeprom.band_3_channels[4] from the band_3 4359 * For example, iwl3945_priv->eeprom39.band_3_channels[4] from the band_3
4360 * definition below maps to physical channel 42 in the 5.2GHz spectrum. 4360 * definition below maps to physical channel 42 in the 5.2GHz spectrum.
4361 * The specific geography and calibration information for that channel 4361 * The specific geography and calibration information for that channel
4362 * is contained in the eeprom map itself. 4362 * is contained in the eeprom map itself.
@@ -4412,27 +4412,27 @@ static void iwl3945_init_band_reference(const struct iwl3945_priv *priv, int ban
4412 switch (band) { 4412 switch (band) {
4413 case 1: /* 2.4GHz band */ 4413 case 1: /* 2.4GHz band */
4414 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_1); 4414 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_1);
4415 *eeprom_ch_info = priv->eeprom.band_1_channels; 4415 *eeprom_ch_info = priv->eeprom39.band_1_channels;
4416 *eeprom_ch_index = iwl3945_eeprom_band_1; 4416 *eeprom_ch_index = iwl3945_eeprom_band_1;
4417 break; 4417 break;
4418 case 2: /* 4.9GHz band */ 4418 case 2: /* 4.9GHz band */
4419 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_2); 4419 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_2);
4420 *eeprom_ch_info = priv->eeprom.band_2_channels; 4420 *eeprom_ch_info = priv->eeprom39.band_2_channels;
4421 *eeprom_ch_index = iwl3945_eeprom_band_2; 4421 *eeprom_ch_index = iwl3945_eeprom_band_2;
4422 break; 4422 break;
4423 case 3: /* 5.2GHz band */ 4423 case 3: /* 5.2GHz band */
4424 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_3); 4424 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_3);
4425 *eeprom_ch_info = priv->eeprom.band_3_channels; 4425 *eeprom_ch_info = priv->eeprom39.band_3_channels;
4426 *eeprom_ch_index = iwl3945_eeprom_band_3; 4426 *eeprom_ch_index = iwl3945_eeprom_band_3;
4427 break; 4427 break;
4428 case 4: /* 5.5GHz band */ 4428 case 4: /* 5.5GHz band */
4429 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_4); 4429 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_4);
4430 *eeprom_ch_info = priv->eeprom.band_4_channels; 4430 *eeprom_ch_info = priv->eeprom39.band_4_channels;
4431 *eeprom_ch_index = iwl3945_eeprom_band_4; 4431 *eeprom_ch_index = iwl3945_eeprom_band_4;
4432 break; 4432 break;
4433 case 5: /* 5.7GHz band */ 4433 case 5: /* 5.7GHz band */
4434 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_5); 4434 *eeprom_ch_count = ARRAY_SIZE(iwl3945_eeprom_band_5);
4435 *eeprom_ch_info = priv->eeprom.band_5_channels; 4435 *eeprom_ch_info = priv->eeprom39.band_5_channels;
4436 *eeprom_ch_index = iwl3945_eeprom_band_5; 4436 *eeprom_ch_index = iwl3945_eeprom_band_5;
4437 break; 4437 break;
4438 default: 4438 default:
@@ -4490,9 +4490,9 @@ static int iwl3945_init_channel_map(struct iwl3945_priv *priv)
4490 return 0; 4490 return 0;
4491 } 4491 }
4492 4492
4493 if (priv->eeprom.version < 0x2f) { 4493 if (priv->eeprom39.version < 0x2f) {
4494 IWL_WARNING("Unsupported EEPROM version: 0x%04X\n", 4494 IWL_WARNING("Unsupported EEPROM version: 0x%04X\n",
4495 priv->eeprom.version); 4495 priv->eeprom39.version);
4496 return -EINVAL; 4496 return -EINVAL;
4497 } 4497 }
4498 4498
@@ -5626,15 +5626,15 @@ static void iwl3945_alive_start(struct iwl3945_priv *priv)
5626 5626
5627 if (iwl3945_is_associated(priv)) { 5627 if (iwl3945_is_associated(priv)) {
5628 struct iwl3945_rxon_cmd *active_rxon = 5628 struct iwl3945_rxon_cmd *active_rxon =
5629 (struct iwl3945_rxon_cmd *)(&priv->active_rxon); 5629 (struct iwl3945_rxon_cmd *)(&priv->active39_rxon);
5630 5630
5631 memcpy(&priv->staging_rxon, &priv->active_rxon, 5631 memcpy(&priv->staging39_rxon, &priv->active39_rxon,
5632 sizeof(priv->staging_rxon)); 5632 sizeof(priv->staging39_rxon));
5633 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; 5633 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
5634 } else { 5634 } else {
5635 /* Initialize our rx_config data */ 5635 /* Initialize our rx_config data */
5636 iwl3945_connection_init_rx_config(priv, priv->iw_mode); 5636 iwl3945_connection_init_rx_config(priv, priv->iw_mode);
5637 memcpy(priv->staging_rxon.node_addr, priv->mac_addr, ETH_ALEN); 5637 memcpy(priv->staging39_rxon.node_addr, priv->mac_addr, ETH_ALEN);
5638 } 5638 }
5639 5639
5640 /* Configure Bluetooth device coexistence support */ 5640 /* Configure Bluetooth device coexistence support */
@@ -6027,15 +6027,15 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6027 goto done; 6027 goto done;
6028 } 6028 }
6029 6029
6030 if (!priv->scan) { 6030 if (!priv->scan39) {
6031 priv->scan = kmalloc(sizeof(struct iwl3945_scan_cmd) + 6031 priv->scan39 = kmalloc(sizeof(struct iwl3945_scan_cmd) +
6032 IWL_MAX_SCAN_SIZE, GFP_KERNEL); 6032 IWL_MAX_SCAN_SIZE, GFP_KERNEL);
6033 if (!priv->scan) { 6033 if (!priv->scan39) {
6034 rc = -ENOMEM; 6034 rc = -ENOMEM;
6035 goto done; 6035 goto done;
6036 } 6036 }
6037 } 6037 }
6038 scan = priv->scan; 6038 scan = priv->scan39;
6039 memset(scan, 0, sizeof(struct iwl3945_scan_cmd) + IWL_MAX_SCAN_SIZE); 6039 memset(scan, 0, sizeof(struct iwl3945_scan_cmd) + IWL_MAX_SCAN_SIZE);
6040 6040
6041 scan->quiet_plcp_th = IWL_PLCP_QUIET_THRESH; 6041 scan->quiet_plcp_th = IWL_PLCP_QUIET_THRESH;
@@ -6210,7 +6210,7 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6210 6210
6211 6211
6212 IWL_DEBUG_ASSOC("Associated as %d to: %pM\n", 6212 IWL_DEBUG_ASSOC("Associated as %d to: %pM\n",
6213 priv->assoc_id, priv->active_rxon.bssid_addr); 6213 priv->assoc_id, priv->active39_rxon.bssid_addr);
6214 6214
6215 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6215 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6216 return; 6216 return;
@@ -6222,7 +6222,7 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6222 6222
6223 conf = ieee80211_get_hw_conf(priv->hw); 6223 conf = ieee80211_get_hw_conf(priv->hw);
6224 6224
6225 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 6225 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
6226 iwl3945_commit_rxon(priv); 6226 iwl3945_commit_rxon(priv);
6227 6227
6228 memset(&priv->rxon_timing, 0, sizeof(struct iwl_rxon_time_cmd)); 6228 memset(&priv->rxon_timing, 0, sizeof(struct iwl_rxon_time_cmd));
@@ -6233,26 +6233,26 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6233 IWL_WARNING("REPLY_RXON_TIMING failed - " 6233 IWL_WARNING("REPLY_RXON_TIMING failed - "
6234 "Attempting to continue.\n"); 6234 "Attempting to continue.\n");
6235 6235
6236 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 6236 priv->staging39_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
6237 6237
6238 priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); 6238 priv->staging39_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
6239 6239
6240 IWL_DEBUG_ASSOC("assoc id %d beacon interval %d\n", 6240 IWL_DEBUG_ASSOC("assoc id %d beacon interval %d\n",
6241 priv->assoc_id, priv->beacon_int); 6241 priv->assoc_id, priv->beacon_int);
6242 6242
6243 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) 6243 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
6244 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; 6244 priv->staging39_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
6245 else 6245 else
6246 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; 6246 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
6247 6247
6248 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) { 6248 if (priv->staging39_rxon.flags & RXON_FLG_BAND_24G_MSK) {
6249 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME) 6249 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
6250 priv->staging_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK; 6250 priv->staging39_rxon.flags |= RXON_FLG_SHORT_SLOT_MSK;
6251 else 6251 else
6252 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 6252 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
6253 6253
6254 if (priv->iw_mode == NL80211_IFTYPE_ADHOC) 6254 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
6255 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 6255 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
6256 6256
6257 } 6257 }
6258 6258
@@ -6359,7 +6359,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw)
6359 /* we should be verifying the device is ready to be opened */ 6359 /* we should be verifying the device is ready to be opened */
6360 mutex_lock(&priv->mutex); 6360 mutex_lock(&priv->mutex);
6361 6361
6362 memset(&priv->staging_rxon, 0, sizeof(struct iwl3945_rxon_cmd)); 6362 memset(&priv->staging39_rxon, 0, sizeof(struct iwl3945_rxon_cmd));
6363 /* fetch ucode file from disk, alloc and copy to bus-master buffers ... 6363 /* fetch ucode file from disk, alloc and copy to bus-master buffers ...
6364 * ucode filename and max sizes are card-specific. */ 6364 * ucode filename and max sizes are card-specific. */
6365 6365
@@ -6576,8 +6576,8 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed)
6576 6576
6577 iwl3945_set_rate(priv); 6577 iwl3945_set_rate(priv);
6578 6578
6579 if (memcmp(&priv->active_rxon, 6579 if (memcmp(&priv->active39_rxon,
6580 &priv->staging_rxon, sizeof(priv->staging_rxon))) 6580 &priv->staging39_rxon, sizeof(priv->staging39_rxon)))
6581 iwl3945_commit_rxon(priv); 6581 iwl3945_commit_rxon(priv);
6582 else 6582 else
6583 IWL_DEBUG_INFO("No re-sending same RXON configuration.\n"); 6583 IWL_DEBUG_INFO("No re-sending same RXON configuration.\n");
@@ -6601,7 +6601,7 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv)
6601 if (!(iwl3945_is_associated(priv))) { 6601 if (!(iwl3945_is_associated(priv))) {
6602 6602
6603 /* RXON - unassoc (to set timing command) */ 6603 /* RXON - unassoc (to set timing command) */
6604 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 6604 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
6605 iwl3945_commit_rxon(priv); 6605 iwl3945_commit_rxon(priv);
6606 6606
6607 /* RXON Timing */ 6607 /* RXON Timing */
@@ -6614,29 +6614,29 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv)
6614 "Attempting to continue.\n"); 6614 "Attempting to continue.\n");
6615 6615
6616 /* FIXME: what should be the assoc_id for AP? */ 6616 /* FIXME: what should be the assoc_id for AP? */
6617 priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); 6617 priv->staging39_rxon.assoc_id = cpu_to_le16(priv->assoc_id);
6618 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) 6618 if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE)
6619 priv->staging_rxon.flags |= 6619 priv->staging39_rxon.flags |=
6620 RXON_FLG_SHORT_PREAMBLE_MSK; 6620 RXON_FLG_SHORT_PREAMBLE_MSK;
6621 else 6621 else
6622 priv->staging_rxon.flags &= 6622 priv->staging39_rxon.flags &=
6623 ~RXON_FLG_SHORT_PREAMBLE_MSK; 6623 ~RXON_FLG_SHORT_PREAMBLE_MSK;
6624 6624
6625 if (priv->staging_rxon.flags & RXON_FLG_BAND_24G_MSK) { 6625 if (priv->staging39_rxon.flags & RXON_FLG_BAND_24G_MSK) {
6626 if (priv->assoc_capability & 6626 if (priv->assoc_capability &
6627 WLAN_CAPABILITY_SHORT_SLOT_TIME) 6627 WLAN_CAPABILITY_SHORT_SLOT_TIME)
6628 priv->staging_rxon.flags |= 6628 priv->staging39_rxon.flags |=
6629 RXON_FLG_SHORT_SLOT_MSK; 6629 RXON_FLG_SHORT_SLOT_MSK;
6630 else 6630 else
6631 priv->staging_rxon.flags &= 6631 priv->staging39_rxon.flags &=
6632 ~RXON_FLG_SHORT_SLOT_MSK; 6632 ~RXON_FLG_SHORT_SLOT_MSK;
6633 6633
6634 if (priv->iw_mode == NL80211_IFTYPE_ADHOC) 6634 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
6635 priv->staging_rxon.flags &= 6635 priv->staging39_rxon.flags &=
6636 ~RXON_FLG_SHORT_SLOT_MSK; 6636 ~RXON_FLG_SHORT_SLOT_MSK;
6637 } 6637 }
6638 /* restore RXON assoc */ 6638 /* restore RXON assoc */
6639 priv->staging_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK; 6639 priv->staging39_rxon.filter_flags |= RXON_FILTER_ASSOC_MSK;
6640 iwl3945_commit_rxon(priv); 6640 iwl3945_commit_rxon(priv);
6641 iwl3945_add_station(priv, iwl_bcast_addr, 0, 0); 6641 iwl3945_add_station(priv, iwl_bcast_addr, 0, 0);
6642 } 6642 }
@@ -6717,7 +6717,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6717 mutex_unlock(&priv->mutex); 6717 mutex_unlock(&priv->mutex);
6718 return -EAGAIN; 6718 return -EAGAIN;
6719 } 6719 }
6720 memcpy(priv->staging_rxon.bssid_addr, conf->bssid, ETH_ALEN); 6720 memcpy(priv->staging39_rxon.bssid_addr, conf->bssid, ETH_ALEN);
6721 6721
6722 /* TODO: Audit driver for usage of these members and see 6722 /* TODO: Audit driver for usage of these members and see
6723 * if mac80211 deprecates them (priv->bssid looks like it 6723 * if mac80211 deprecates them (priv->bssid looks like it
@@ -6731,12 +6731,12 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6731 rc = iwl3945_commit_rxon(priv); 6731 rc = iwl3945_commit_rxon(priv);
6732 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc) 6732 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
6733 iwl3945_add_station(priv, 6733 iwl3945_add_station(priv,
6734 priv->active_rxon.bssid_addr, 1, 0); 6734 priv->active39_rxon.bssid_addr, 1, 0);
6735 } 6735 }
6736 6736
6737 } else { 6737 } else {
6738 iwl3945_scan_cancel_timeout(priv, 100); 6738 iwl3945_scan_cancel_timeout(priv, 100);
6739 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 6739 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
6740 iwl3945_commit_rxon(priv); 6740 iwl3945_commit_rxon(priv);
6741 } 6741 }
6742 6742
@@ -6753,7 +6753,7 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw,
6753 int mc_count, struct dev_addr_list *mc_list) 6753 int mc_count, struct dev_addr_list *mc_list)
6754{ 6754{
6755 struct iwl3945_priv *priv = hw->priv; 6755 struct iwl3945_priv *priv = hw->priv;
6756 __le32 *filter_flags = &priv->staging_rxon.filter_flags; 6756 __le32 *filter_flags = &priv->staging39_rxon.filter_flags;
6757 6757
6758 IWL_DEBUG_MAC80211("Enter: changed: 0x%x, total: 0x%x\n", 6758 IWL_DEBUG_MAC80211("Enter: changed: 0x%x, total: 0x%x\n",
6759 changed_flags, *total_flags); 6759 changed_flags, *total_flags);
@@ -6804,7 +6804,7 @@ static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw,
6804 6804
6805 if (iwl3945_is_ready_rf(priv)) { 6805 if (iwl3945_is_ready_rf(priv)) {
6806 iwl3945_scan_cancel_timeout(priv, 100); 6806 iwl3945_scan_cancel_timeout(priv, 100);
6807 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 6807 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
6808 iwl3945_commit_rxon(priv); 6808 iwl3945_commit_rxon(priv);
6809 } 6809 }
6810 if (priv->vif == conf->vif) { 6810 if (priv->vif == conf->vif) {
@@ -6831,17 +6831,17 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw,
6831 IWL_DEBUG_MAC80211("ERP_PREAMBLE %d\n", 6831 IWL_DEBUG_MAC80211("ERP_PREAMBLE %d\n",
6832 bss_conf->use_short_preamble); 6832 bss_conf->use_short_preamble);
6833 if (bss_conf->use_short_preamble) 6833 if (bss_conf->use_short_preamble)
6834 priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; 6834 priv->staging39_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK;
6835 else 6835 else
6836 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; 6836 priv->staging39_rxon.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK;
6837 } 6837 }
6838 6838
6839 if (changes & BSS_CHANGED_ERP_CTS_PROT) { 6839 if (changes & BSS_CHANGED_ERP_CTS_PROT) {
6840 IWL_DEBUG_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot); 6840 IWL_DEBUG_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot);
6841 if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) 6841 if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ))
6842 priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; 6842 priv->staging39_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
6843 else 6843 else
6844 priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK; 6844 priv->staging39_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
6845 } 6845 }
6846 6846
6847 if (changes & BSS_CHANGED_ASSOC) { 6847 if (changes & BSS_CHANGED_ASSOC) {
@@ -7048,7 +7048,7 @@ static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw,
7048 spin_lock_irqsave(&priv->lock, flags); 7048 spin_lock_irqsave(&priv->lock, flags);
7049 7049
7050 for (i = 0; i < AC_NUM; i++) { 7050 for (i = 0; i < AC_NUM; i++) {
7051 txq = &priv->txq[i]; 7051 txq = &priv->txq39[i];
7052 q = &txq->q; 7052 q = &txq->q;
7053 avail = iwl_queue_space(q); 7053 avail = iwl_queue_space(q);
7054 7054
@@ -7103,7 +7103,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
7103 */ 7103 */
7104 if (priv->iw_mode != NL80211_IFTYPE_AP) { 7104 if (priv->iw_mode != NL80211_IFTYPE_AP) {
7105 iwl3945_scan_cancel_timeout(priv, 100); 7105 iwl3945_scan_cancel_timeout(priv, 100);
7106 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 7106 priv->staging39_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
7107 iwl3945_commit_rxon(priv); 7107 iwl3945_commit_rxon(priv);
7108 } 7108 }
7109 7109
@@ -7250,7 +7250,7 @@ static ssize_t show_flags(struct device *d,
7250{ 7250{
7251 struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; 7251 struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data;
7252 7252
7253 return sprintf(buf, "0x%04X\n", priv->active_rxon.flags); 7253 return sprintf(buf, "0x%04X\n", priv->active39_rxon.flags);
7254} 7254}
7255 7255
7256static ssize_t store_flags(struct device *d, 7256static ssize_t store_flags(struct device *d,
@@ -7261,14 +7261,14 @@ static ssize_t store_flags(struct device *d,
7261 u32 flags = simple_strtoul(buf, NULL, 0); 7261 u32 flags = simple_strtoul(buf, NULL, 0);
7262 7262
7263 mutex_lock(&priv->mutex); 7263 mutex_lock(&priv->mutex);
7264 if (le32_to_cpu(priv->staging_rxon.flags) != flags) { 7264 if (le32_to_cpu(priv->staging39_rxon.flags) != flags) {
7265 /* Cancel any currently running scans... */ 7265 /* Cancel any currently running scans... */
7266 if (iwl3945_scan_cancel_timeout(priv, 100)) 7266 if (iwl3945_scan_cancel_timeout(priv, 100))
7267 IWL_WARNING("Could not cancel scan.\n"); 7267 IWL_WARNING("Could not cancel scan.\n");
7268 else { 7268 else {
7269 IWL_DEBUG_INFO("Committing rxon.flags = 0x%04X\n", 7269 IWL_DEBUG_INFO("Committing rxon.flags = 0x%04X\n",
7270 flags); 7270 flags);
7271 priv->staging_rxon.flags = cpu_to_le32(flags); 7271 priv->staging39_rxon.flags = cpu_to_le32(flags);
7272 iwl3945_commit_rxon(priv); 7272 iwl3945_commit_rxon(priv);
7273 } 7273 }
7274 } 7274 }
@@ -7285,7 +7285,7 @@ static ssize_t show_filter_flags(struct device *d,
7285 struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data; 7285 struct iwl3945_priv *priv = (struct iwl3945_priv *)d->driver_data;
7286 7286
7287 return sprintf(buf, "0x%04X\n", 7287 return sprintf(buf, "0x%04X\n",
7288 le32_to_cpu(priv->active_rxon.filter_flags)); 7288 le32_to_cpu(priv->active39_rxon.filter_flags));
7289} 7289}
7290 7290
7291static ssize_t store_filter_flags(struct device *d, 7291static ssize_t store_filter_flags(struct device *d,
@@ -7296,14 +7296,14 @@ static ssize_t store_filter_flags(struct device *d,
7296 u32 filter_flags = simple_strtoul(buf, NULL, 0); 7296 u32 filter_flags = simple_strtoul(buf, NULL, 0);
7297 7297
7298 mutex_lock(&priv->mutex); 7298 mutex_lock(&priv->mutex);
7299 if (le32_to_cpu(priv->staging_rxon.filter_flags) != filter_flags) { 7299 if (le32_to_cpu(priv->staging39_rxon.filter_flags) != filter_flags) {
7300 /* Cancel any currently running scans... */ 7300 /* Cancel any currently running scans... */
7301 if (iwl3945_scan_cancel_timeout(priv, 100)) 7301 if (iwl3945_scan_cancel_timeout(priv, 100))
7302 IWL_WARNING("Could not cancel scan.\n"); 7302 IWL_WARNING("Could not cancel scan.\n");
7303 else { 7303 else {
7304 IWL_DEBUG_INFO("Committing rxon.filter_flags = " 7304 IWL_DEBUG_INFO("Committing rxon.filter_flags = "
7305 "0x%04X\n", filter_flags); 7305 "0x%04X\n", filter_flags);
7306 priv->staging_rxon.filter_flags = 7306 priv->staging39_rxon.filter_flags =
7307 cpu_to_le32(filter_flags); 7307 cpu_to_le32(filter_flags);
7308 iwl3945_commit_rxon(priv); 7308 iwl3945_commit_rxon(priv);
7309 } 7309 }
@@ -7356,7 +7356,7 @@ static ssize_t store_measurement(struct device *d,
7356{ 7356{
7357 struct iwl3945_priv *priv = dev_get_drvdata(d); 7357 struct iwl3945_priv *priv = dev_get_drvdata(d);
7358 struct ieee80211_measurement_params params = { 7358 struct ieee80211_measurement_params params = {
7359 .channel = le16_to_cpu(priv->active_rxon.channel), 7359 .channel = le16_to_cpu(priv->active39_rxon.channel),
7360 .start_time = cpu_to_le64(priv->last_tsf), 7360 .start_time = cpu_to_le64(priv->last_tsf),
7361 .duration = cpu_to_le16(1), 7361 .duration = cpu_to_le16(1),
7362 }; 7362 };
@@ -7518,7 +7518,7 @@ static ssize_t show_statistics(struct device *d,
7518 struct iwl3945_priv *priv = dev_get_drvdata(d); 7518 struct iwl3945_priv *priv = dev_get_drvdata(d);
7519 u32 size = sizeof(struct iwl3945_notif_statistics); 7519 u32 size = sizeof(struct iwl3945_notif_statistics);
7520 u32 len = 0, ofs = 0; 7520 u32 len = 0, ofs = 0;
7521 u8 *data = (u8 *)&priv->statistics; 7521 u8 *data = (u8 *)&priv->statistics_39;
7522 int rc = 0; 7522 int rc = 0;
7523 7523
7524 if (!iwl3945_is_alive(priv)) 7524 if (!iwl3945_is_alive(priv))
@@ -7860,7 +7860,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7860 priv->ibss_beacon = NULL; 7860 priv->ibss_beacon = NULL;
7861 7861
7862 spin_lock_init(&priv->lock); 7862 spin_lock_init(&priv->lock);
7863 spin_lock_init(&priv->power_data.lock); 7863 spin_lock_init(&priv->power_data_39.lock);
7864 spin_lock_init(&priv->sta_lock); 7864 spin_lock_init(&priv->sta_lock);
7865 spin_lock_init(&priv->hcmd_lock); 7865 spin_lock_init(&priv->hcmd_lock);
7866 7866
@@ -8040,7 +8040,7 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
8040 8040
8041 iwl3945_free_channel_map(priv); 8041 iwl3945_free_channel_map(priv);
8042 iwl3945_free_geos(priv); 8042 iwl3945_free_geos(priv);
8043 kfree(priv->scan); 8043 kfree(priv->scan39);
8044 if (priv->ibss_beacon) 8044 if (priv->ibss_beacon)
8045 dev_kfree_skb(priv->ibss_beacon); 8045 dev_kfree_skb(priv->ibss_beacon);
8046 8046