aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
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/wireless/iwlwifi/iwl3945-base.c
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/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c376
1 files changed, 188 insertions, 188 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index b42bb8433a57..43af2595c694 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