diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 427 |
1 files changed, 223 insertions, 204 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 346a3018d8a5..ac337177fdb3 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -203,7 +203,7 @@ u8 iwl3945_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flag | |||
203 | return index; | 203 | return index; |
204 | } | 204 | } |
205 | 205 | ||
206 | IWL_DEBUG_ASSOC("Add STA ID %d: %pM\n", index, addr); | 206 | IWL_DEBUG_ASSOC(priv, "Add STA ID %d: %pM\n", index, addr); |
207 | station = &priv->stations_39[index]; | 207 | station = &priv->stations_39[index]; |
208 | station->used = 1; | 208 | station->used = 1; |
209 | priv->num_stations++; | 209 | priv->num_stations++; |
@@ -251,7 +251,7 @@ static int iwl3945_send_rxon_assoc(struct iwl_priv *priv) | |||
251 | (rxon1->filter_flags == rxon2->filter_flags) && | 251 | (rxon1->filter_flags == rxon2->filter_flags) && |
252 | (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && | 252 | (rxon1->cck_basic_rates == rxon2->cck_basic_rates) && |
253 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { | 253 | (rxon1->ofdm_basic_rates == rxon2->ofdm_basic_rates)) { |
254 | IWL_DEBUG_INFO("Using current RXON_ASSOC. Not resending.\n"); | 254 | IWL_DEBUG_INFO(priv, "Using current RXON_ASSOC. Not resending.\n"); |
255 | return 0; | 255 | return 0; |
256 | } | 256 | } |
257 | 257 | ||
@@ -368,7 +368,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
368 | * before we apply the new config */ | 368 | * before we apply the new config */ |
369 | if (iwl_is_associated(priv) && | 369 | if (iwl_is_associated(priv) && |
370 | (staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK)) { | 370 | (staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK)) { |
371 | IWL_DEBUG_INFO("Toggling associated bit on current RXON\n"); | 371 | IWL_DEBUG_INFO(priv, "Toggling associated bit on current RXON\n"); |
372 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; | 372 | active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; |
373 | 373 | ||
374 | /* | 374 | /* |
@@ -391,7 +391,7 @@ static int iwl3945_commit_rxon(struct iwl_priv *priv) | |||
391 | } | 391 | } |
392 | } | 392 | } |
393 | 393 | ||
394 | IWL_DEBUG_INFO("Sending RXON\n" | 394 | IWL_DEBUG_INFO(priv, "Sending RXON\n" |
395 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 395 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
396 | "* channel = %d\n" | 396 | "* channel = %d\n" |
397 | "* bssid = %pM\n", | 397 | "* bssid = %pM\n", |
@@ -489,7 +489,7 @@ static int iwl3945_update_sta_key_info(struct iwl_priv *priv, | |||
489 | 489 | ||
490 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 490 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
491 | 491 | ||
492 | IWL_DEBUG_INFO("hwcrypto: modify ucode station key info\n"); | 492 | IWL_DEBUG_INFO(priv, "hwcrypto: modify ucode station key info\n"); |
493 | iwl_send_add_sta(priv, | 493 | iwl_send_add_sta(priv, |
494 | (struct iwl_addsta_cmd *)&priv->stations_39[sta_id].sta, 0); | 494 | (struct iwl_addsta_cmd *)&priv->stations_39[sta_id].sta, 0); |
495 | return 0; | 495 | return 0; |
@@ -508,7 +508,7 @@ static int iwl3945_clear_sta_key_info(struct iwl_priv *priv, u8 sta_id) | |||
508 | priv->stations_39[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | 508 | priv->stations_39[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; |
509 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 509 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
510 | 510 | ||
511 | IWL_DEBUG_INFO("hwcrypto: clear ucode station key info\n"); | 511 | IWL_DEBUG_INFO(priv, "hwcrypto: clear ucode station key info\n"); |
512 | iwl_send_add_sta(priv, | 512 | iwl_send_add_sta(priv, |
513 | (struct iwl_addsta_cmd *)&priv->stations_39[sta_id].sta, 0); | 513 | (struct iwl_addsta_cmd *)&priv->stations_39[sta_id].sta, 0); |
514 | return 0; | 514 | return 0; |
@@ -518,7 +518,7 @@ static void iwl3945_clear_free_frames(struct iwl_priv *priv) | |||
518 | { | 518 | { |
519 | struct list_head *element; | 519 | struct list_head *element; |
520 | 520 | ||
521 | IWL_DEBUG_INFO("%d frames on pre-allocated heap on clear.\n", | 521 | IWL_DEBUG_INFO(priv, "%d frames on pre-allocated heap on clear.\n", |
522 | priv->frames_count); | 522 | priv->frames_count); |
523 | 523 | ||
524 | while (!list_empty(&priv->free_frames)) { | 524 | while (!list_empty(&priv->free_frames)) { |
@@ -648,7 +648,7 @@ static void iwl3945_activate_qos(struct iwl_priv *priv, u8 force) | |||
648 | spin_unlock_irqrestore(&priv->lock, flags); | 648 | spin_unlock_irqrestore(&priv->lock, flags); |
649 | 649 | ||
650 | if (force || iwl_is_associated(priv)) { | 650 | if (force || iwl_is_associated(priv)) { |
651 | IWL_DEBUG_QOS("send QoS cmd with QoS active %d \n", | 651 | IWL_DEBUG_QOS(priv, "send QoS cmd with QoS active %d \n", |
652 | priv->qos_data.qos_active); | 652 | priv->qos_data.qos_active); |
653 | 653 | ||
654 | iwl3945_send_qos_params_command(priv, | 654 | iwl3945_send_qos_params_command(priv, |
@@ -690,7 +690,7 @@ int iwl3945_power_init_handle(struct iwl_priv *priv) | |||
690 | int size = sizeof(struct iwl_power_vec_entry) * IWL_POWER_MAX; | 690 | int size = sizeof(struct iwl_power_vec_entry) * IWL_POWER_MAX; |
691 | u16 pci_pm; | 691 | u16 pci_pm; |
692 | 692 | ||
693 | IWL_DEBUG_POWER("Initialize power \n"); | 693 | IWL_DEBUG_POWER(priv, "Initialize power \n"); |
694 | 694 | ||
695 | pow_data = &priv->power_data; | 695 | pow_data = &priv->power_data; |
696 | 696 | ||
@@ -707,7 +707,7 @@ int iwl3945_power_init_handle(struct iwl_priv *priv) | |||
707 | else { | 707 | else { |
708 | struct iwl_powertable_cmd *cmd; | 708 | struct iwl_powertable_cmd *cmd; |
709 | 709 | ||
710 | IWL_DEBUG_POWER("adjust power command flags\n"); | 710 | IWL_DEBUG_POWER(priv, "adjust power command flags\n"); |
711 | 711 | ||
712 | for (i = 0; i < IWL_POWER_MAX; i++) { | 712 | for (i = 0; i < IWL_POWER_MAX; i++) { |
713 | cmd = &pow_data->pwr_range_0[i].cmd; | 713 | cmd = &pow_data->pwr_range_0[i].cmd; |
@@ -732,7 +732,7 @@ static int iwl3945_update_power_cmd(struct iwl_priv *priv, | |||
732 | bool skip; | 732 | bool skip; |
733 | 733 | ||
734 | if (mode > IWL_POWER_INDEX_5) { | 734 | if (mode > IWL_POWER_INDEX_5) { |
735 | IWL_DEBUG_POWER("Error invalid power mode \n"); | 735 | IWL_DEBUG_POWER(priv, "Error invalid power mode \n"); |
736 | return -EINVAL; | 736 | return -EINVAL; |
737 | } | 737 | } |
738 | pow_data = &priv->power_data; | 738 | pow_data = &priv->power_data; |
@@ -765,10 +765,10 @@ static int iwl3945_update_power_cmd(struct iwl_priv *priv, | |||
765 | if (le32_to_cpu(cmd->sleep_interval[i]) > max_sleep) | 765 | if (le32_to_cpu(cmd->sleep_interval[i]) > max_sleep) |
766 | cmd->sleep_interval[i] = cpu_to_le32(max_sleep); | 766 | cmd->sleep_interval[i] = cpu_to_le32(max_sleep); |
767 | 767 | ||
768 | IWL_DEBUG_POWER("Flags value = 0x%08X\n", cmd->flags); | 768 | IWL_DEBUG_POWER(priv, "Flags value = 0x%08X\n", cmd->flags); |
769 | IWL_DEBUG_POWER("Tx timeout = %u\n", le32_to_cpu(cmd->tx_data_timeout)); | 769 | IWL_DEBUG_POWER(priv, "Tx timeout = %u\n", le32_to_cpu(cmd->tx_data_timeout)); |
770 | IWL_DEBUG_POWER("Rx timeout = %u\n", le32_to_cpu(cmd->rx_data_timeout)); | 770 | IWL_DEBUG_POWER(priv, "Rx timeout = %u\n", le32_to_cpu(cmd->rx_data_timeout)); |
771 | IWL_DEBUG_POWER("Sleep interval vector = { %d , %d , %d , %d , %d }\n", | 771 | IWL_DEBUG_POWER(priv, "Sleep interval vector = { %d , %d , %d , %d , %d }\n", |
772 | le32_to_cpu(cmd->sleep_interval[0]), | 772 | le32_to_cpu(cmd->sleep_interval[0]), |
773 | le32_to_cpu(cmd->sleep_interval[1]), | 773 | le32_to_cpu(cmd->sleep_interval[1]), |
774 | le32_to_cpu(cmd->sleep_interval[2]), | 774 | le32_to_cpu(cmd->sleep_interval[2]), |
@@ -875,8 +875,8 @@ static void iwl3945_setup_rxon_timing(struct iwl_priv *priv) | |||
875 | priv->rxon_timing.beacon_init_val = | 875 | priv->rxon_timing.beacon_init_val = |
876 | cpu_to_le32((u32) ((u64) interval_tm_unit - result)); | 876 | cpu_to_le32((u32) ((u64) interval_tm_unit - result)); |
877 | 877 | ||
878 | IWL_DEBUG_ASSOC | 878 | IWL_DEBUG_ASSOC(priv, |
879 | ("beacon interval %d beacon timer %d beacon tim %d\n", | 879 | "beacon interval %d beacon timer %d beacon tim %d\n", |
880 | le16_to_cpu(priv->rxon_timing.beacon_interval), | 880 | le16_to_cpu(priv->rxon_timing.beacon_interval), |
881 | le32_to_cpu(priv->rxon_timing.beacon_init_val), | 881 | le32_to_cpu(priv->rxon_timing.beacon_init_val), |
882 | le16_to_cpu(priv->rxon_timing.atim_window)); | 882 | le16_to_cpu(priv->rxon_timing.atim_window)); |
@@ -885,22 +885,22 @@ static void iwl3945_setup_rxon_timing(struct iwl_priv *priv) | |||
885 | static int iwl3945_scan_initiate(struct iwl_priv *priv) | 885 | static int iwl3945_scan_initiate(struct iwl_priv *priv) |
886 | { | 886 | { |
887 | if (!iwl_is_ready_rf(priv)) { | 887 | if (!iwl_is_ready_rf(priv)) { |
888 | IWL_DEBUG_SCAN("Aborting scan due to not ready.\n"); | 888 | IWL_DEBUG_SCAN(priv, "Aborting scan due to not ready.\n"); |
889 | return -EIO; | 889 | return -EIO; |
890 | } | 890 | } |
891 | 891 | ||
892 | if (test_bit(STATUS_SCANNING, &priv->status)) { | 892 | if (test_bit(STATUS_SCANNING, &priv->status)) { |
893 | IWL_DEBUG_SCAN("Scan already in progress.\n"); | 893 | IWL_DEBUG_SCAN(priv, "Scan already in progress.\n"); |
894 | return -EAGAIN; | 894 | return -EAGAIN; |
895 | } | 895 | } |
896 | 896 | ||
897 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | 897 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { |
898 | IWL_DEBUG_SCAN("Scan request while abort pending. " | 898 | IWL_DEBUG_SCAN(priv, "Scan request while abort pending. " |
899 | "Queuing.\n"); | 899 | "Queuing.\n"); |
900 | return -EAGAIN; | 900 | return -EAGAIN; |
901 | } | 901 | } |
902 | 902 | ||
903 | IWL_DEBUG_INFO("Starting scan...\n"); | 903 | IWL_DEBUG_INFO(priv, "Starting scan...\n"); |
904 | if (priv->cfg->sku & IWL_SKU_G) | 904 | if (priv->cfg->sku & IWL_SKU_G) |
905 | priv->scan_bands |= BIT(IEEE80211_BAND_2GHZ); | 905 | priv->scan_bands |= BIT(IEEE80211_BAND_2GHZ); |
906 | if (priv->cfg->sku & IWL_SKU_A) | 906 | if (priv->cfg->sku & IWL_SKU_A) |
@@ -941,7 +941,7 @@ static int iwl3945_set_mode(struct iwl_priv *priv, int mode) | |||
941 | cancel_delayed_work(&priv->scan_check); | 941 | cancel_delayed_work(&priv->scan_check); |
942 | if (iwl_scan_cancel_timeout(priv, 100)) { | 942 | if (iwl_scan_cancel_timeout(priv, 100)) { |
943 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); | 943 | IWL_WARN(priv, "Aborted scan still in progress after 100ms\n"); |
944 | IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); | 944 | IWL_DEBUG_MAC80211(priv, "leaving - scan abort failed.\n"); |
945 | return -EAGAIN; | 945 | return -EAGAIN; |
946 | } | 946 | } |
947 | 947 | ||
@@ -964,7 +964,7 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv, | |||
964 | case ALG_CCMP: | 964 | case ALG_CCMP: |
965 | tx->sec_ctl = TX_CMD_SEC_CCM; | 965 | tx->sec_ctl = TX_CMD_SEC_CCM; |
966 | memcpy(tx->key, keyinfo->key, keyinfo->keylen); | 966 | memcpy(tx->key, keyinfo->key, keyinfo->keylen); |
967 | IWL_DEBUG_TX("tx_cmd with AES hwcrypto\n"); | 967 | IWL_DEBUG_TX(priv, "tx_cmd with AES hwcrypto\n"); |
968 | break; | 968 | break; |
969 | 969 | ||
970 | case ALG_TKIP: | 970 | case ALG_TKIP: |
@@ -988,7 +988,7 @@ static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv, | |||
988 | 988 | ||
989 | memcpy(&tx->key[3], keyinfo->key, keyinfo->keylen); | 989 | memcpy(&tx->key[3], keyinfo->key, keyinfo->keylen); |
990 | 990 | ||
991 | IWL_DEBUG_TX("Configuring packet for WEP encryption " | 991 | IWL_DEBUG_TX(priv, "Configuring packet for WEP encryption " |
992 | "with key %d\n", info->control.hw_key->hw_key_idx); | 992 | "with key %d\n", info->control.hw_key->hw_key_idx); |
993 | break; | 993 | break; |
994 | 994 | ||
@@ -1105,7 +1105,7 @@ static int iwl3945_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
1105 | if (sta_id != IWL_INVALID_STATION) | 1105 | if (sta_id != IWL_INVALID_STATION) |
1106 | return sta_id; | 1106 | return sta_id; |
1107 | 1107 | ||
1108 | IWL_DEBUG_DROP("Station %pM not in station map. " | 1108 | IWL_DEBUG_DROP(priv, "Station %pM not in station map. " |
1109 | "Defaulting to broadcast...\n", | 1109 | "Defaulting to broadcast...\n", |
1110 | hdr->addr1); | 1110 | hdr->addr1); |
1111 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); | 1111 | iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); |
@@ -1151,7 +1151,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1151 | 1151 | ||
1152 | spin_lock_irqsave(&priv->lock, flags); | 1152 | spin_lock_irqsave(&priv->lock, flags); |
1153 | if (iwl_is_rfkill(priv)) { | 1153 | if (iwl_is_rfkill(priv)) { |
1154 | IWL_DEBUG_DROP("Dropping - RF KILL\n"); | 1154 | IWL_DEBUG_DROP(priv, "Dropping - RF KILL\n"); |
1155 | goto drop_unlock; | 1155 | goto drop_unlock; |
1156 | } | 1156 | } |
1157 | 1157 | ||
@@ -1167,11 +1167,11 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1167 | 1167 | ||
1168 | #ifdef CONFIG_IWLWIFI_DEBUG | 1168 | #ifdef CONFIG_IWLWIFI_DEBUG |
1169 | if (ieee80211_is_auth(fc)) | 1169 | if (ieee80211_is_auth(fc)) |
1170 | IWL_DEBUG_TX("Sending AUTH frame\n"); | 1170 | IWL_DEBUG_TX(priv, "Sending AUTH frame\n"); |
1171 | else if (ieee80211_is_assoc_req(fc)) | 1171 | else if (ieee80211_is_assoc_req(fc)) |
1172 | IWL_DEBUG_TX("Sending ASSOC frame\n"); | 1172 | IWL_DEBUG_TX(priv, "Sending ASSOC frame\n"); |
1173 | else if (ieee80211_is_reassoc_req(fc)) | 1173 | else if (ieee80211_is_reassoc_req(fc)) |
1174 | IWL_DEBUG_TX("Sending REASSOC frame\n"); | 1174 | IWL_DEBUG_TX(priv, "Sending REASSOC frame\n"); |
1175 | #endif | 1175 | #endif |
1176 | 1176 | ||
1177 | /* drop all data frame if we are not associated */ | 1177 | /* drop all data frame if we are not associated */ |
@@ -1179,7 +1179,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1179 | (priv->iw_mode != NL80211_IFTYPE_MONITOR) && /* packet injection */ | 1179 | (priv->iw_mode != NL80211_IFTYPE_MONITOR) && /* packet injection */ |
1180 | (!iwl_is_associated(priv) || | 1180 | (!iwl_is_associated(priv) || |
1181 | ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id))) { | 1181 | ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id))) { |
1182 | IWL_DEBUG_DROP("Dropping - !iwl_is_associated\n"); | 1182 | IWL_DEBUG_DROP(priv, "Dropping - !iwl_is_associated\n"); |
1183 | goto drop_unlock; | 1183 | goto drop_unlock; |
1184 | } | 1184 | } |
1185 | 1185 | ||
@@ -1190,12 +1190,12 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb) | |||
1190 | /* Find (or create) index into station table for destination station */ | 1190 | /* Find (or create) index into station table for destination station */ |
1191 | sta_id = iwl3945_get_sta_id(priv, hdr); | 1191 | sta_id = iwl3945_get_sta_id(priv, hdr); |
1192 | if (sta_id == IWL_INVALID_STATION) { | 1192 | if (sta_id == IWL_INVALID_STATION) { |
1193 | IWL_DEBUG_DROP("Dropping - INVALID STATION: %pM\n", | 1193 | IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", |
1194 | hdr->addr1); | 1194 | hdr->addr1); |
1195 | goto drop; | 1195 | goto drop; |
1196 | } | 1196 | } |
1197 | 1197 | ||
1198 | IWL_DEBUG_RATE("station Id %d\n", sta_id); | 1198 | IWL_DEBUG_RATE(priv, "station Id %d\n", sta_id); |
1199 | 1199 | ||
1200 | if (ieee80211_is_data_qos(fc)) { | 1200 | if (ieee80211_is_data_qos(fc)) { |
1201 | qc = ieee80211_get_qos_ctl(hdr); | 1201 | qc = ieee80211_get_qos_ctl(hdr); |
@@ -1351,7 +1351,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) | |||
1351 | if (!!disable_radio == test_bit(STATUS_RF_KILL_SW, &priv->status)) | 1351 | if (!!disable_radio == test_bit(STATUS_RF_KILL_SW, &priv->status)) |
1352 | return; | 1352 | return; |
1353 | 1353 | ||
1354 | IWL_DEBUG_RF_KILL("Manual SW RF KILL set to: RADIO %s\n", | 1354 | IWL_DEBUG_RF_KILL(priv, "Manual SW RF KILL set to: RADIO %s\n", |
1355 | disable_radio ? "OFF" : "ON"); | 1355 | disable_radio ? "OFF" : "ON"); |
1356 | 1356 | ||
1357 | if (disable_radio) { | 1357 | if (disable_radio) { |
@@ -1384,7 +1384,7 @@ static void iwl3945_radio_kill_sw(struct iwl_priv *priv, int disable_radio) | |||
1384 | spin_unlock_irqrestore(&priv->lock, flags); | 1384 | spin_unlock_irqrestore(&priv->lock, flags); |
1385 | 1385 | ||
1386 | if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { | 1386 | if (test_bit(STATUS_RF_KILL_HW, &priv->status)) { |
1387 | IWL_DEBUG_RF_KILL("Can not turn radio back on - " | 1387 | IWL_DEBUG_RF_KILL(priv, "Can not turn radio back on - " |
1388 | "disabled by HW switch\n"); | 1388 | "disabled by HW switch\n"); |
1389 | return; | 1389 | return; |
1390 | } | 1390 | } |
@@ -1507,7 +1507,7 @@ static int iwl3945_get_measurement(struct iwl_priv *priv, | |||
1507 | switch (spectrum_resp_status) { | 1507 | switch (spectrum_resp_status) { |
1508 | case 0: /* Command will be handled */ | 1508 | case 0: /* Command will be handled */ |
1509 | if (res->u.spectrum.id != 0xff) { | 1509 | if (res->u.spectrum.id != 0xff) { |
1510 | IWL_DEBUG_INFO("Replaced existing measurement: %d\n", | 1510 | IWL_DEBUG_INFO(priv, "Replaced existing measurement: %d\n", |
1511 | res->u.spectrum.id); | 1511 | res->u.spectrum.id); |
1512 | priv->measurement_status &= ~MEASUREMENT_READY; | 1512 | priv->measurement_status &= ~MEASUREMENT_READY; |
1513 | } | 1513 | } |
@@ -1535,18 +1535,18 @@ static void iwl3945_rx_reply_alive(struct iwl_priv *priv, | |||
1535 | 1535 | ||
1536 | palive = &pkt->u.alive_frame; | 1536 | palive = &pkt->u.alive_frame; |
1537 | 1537 | ||
1538 | IWL_DEBUG_INFO("Alive ucode status 0x%08X revision " | 1538 | IWL_DEBUG_INFO(priv, "Alive ucode status 0x%08X revision " |
1539 | "0x%01X 0x%01X\n", | 1539 | "0x%01X 0x%01X\n", |
1540 | palive->is_valid, palive->ver_type, | 1540 | palive->is_valid, palive->ver_type, |
1541 | palive->ver_subtype); | 1541 | palive->ver_subtype); |
1542 | 1542 | ||
1543 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { | 1543 | if (palive->ver_subtype == INITIALIZE_SUBTYPE) { |
1544 | IWL_DEBUG_INFO("Initialization Alive received.\n"); | 1544 | IWL_DEBUG_INFO(priv, "Initialization Alive received.\n"); |
1545 | memcpy(&priv->card_alive_init, &pkt->u.alive_frame, | 1545 | memcpy(&priv->card_alive_init, &pkt->u.alive_frame, |
1546 | sizeof(struct iwl_alive_resp)); | 1546 | sizeof(struct iwl_alive_resp)); |
1547 | pwork = &priv->init_alive_start; | 1547 | pwork = &priv->init_alive_start; |
1548 | } else { | 1548 | } else { |
1549 | IWL_DEBUG_INFO("Runtime Alive received.\n"); | 1549 | IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); |
1550 | memcpy(&priv->card_alive, &pkt->u.alive_frame, | 1550 | memcpy(&priv->card_alive, &pkt->u.alive_frame, |
1551 | sizeof(struct iwl_alive_resp)); | 1551 | sizeof(struct iwl_alive_resp)); |
1552 | pwork = &priv->alive_start; | 1552 | pwork = &priv->alive_start; |
@@ -1569,7 +1569,7 @@ static void iwl3945_rx_reply_add_sta(struct iwl_priv *priv, | |||
1569 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 1569 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
1570 | #endif | 1570 | #endif |
1571 | 1571 | ||
1572 | IWL_DEBUG_RX("Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status); | 1572 | IWL_DEBUG_RX(priv, "Received REPLY_ADD_STA: 0x%02X\n", pkt->u.status); |
1573 | return; | 1573 | return; |
1574 | } | 1574 | } |
1575 | 1575 | ||
@@ -1595,7 +1595,7 @@ static void iwl3945_rx_spectrum_measure_notif(struct iwl_priv *priv, | |||
1595 | struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif); | 1595 | struct iwl_spectrum_notification *report = &(pkt->u.spectrum_notif); |
1596 | 1596 | ||
1597 | if (!report->state) { | 1597 | if (!report->state) { |
1598 | IWL_DEBUG(IWL_DL_11H | IWL_DL_INFO, | 1598 | IWL_DEBUG(priv, IWL_DL_11H | IWL_DL_INFO, |
1599 | "Spectrum Measure Notification: Start\n"); | 1599 | "Spectrum Measure Notification: Start\n"); |
1600 | return; | 1600 | return; |
1601 | } | 1601 | } |
@@ -1611,7 +1611,7 @@ static void iwl3945_rx_pm_sleep_notif(struct iwl_priv *priv, | |||
1611 | #ifdef CONFIG_IWLWIFI_DEBUG | 1611 | #ifdef CONFIG_IWLWIFI_DEBUG |
1612 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 1612 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
1613 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); | 1613 | struct iwl_sleep_notification *sleep = &(pkt->u.sleep_notif); |
1614 | IWL_DEBUG_RX("sleep mode: %d, src: %d\n", | 1614 | IWL_DEBUG_RX(priv, "sleep mode: %d, src: %d\n", |
1615 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); | 1615 | sleep->pm_sleep_mode, sleep->pm_wakeup_src); |
1616 | #endif | 1616 | #endif |
1617 | } | 1617 | } |
@@ -1620,7 +1620,7 @@ static void iwl3945_rx_pm_debug_statistics_notif(struct iwl_priv *priv, | |||
1620 | struct iwl_rx_mem_buffer *rxb) | 1620 | struct iwl_rx_mem_buffer *rxb) |
1621 | { | 1621 | { |
1622 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 1622 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
1623 | IWL_DEBUG_RADIO("Dumping %d bytes of unhandled " | 1623 | IWL_DEBUG_RADIO(priv, "Dumping %d bytes of unhandled " |
1624 | "notification for %s:\n", | 1624 | "notification for %s:\n", |
1625 | le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); | 1625 | le32_to_cpu(pkt->len), get_cmd_string(pkt->hdr.cmd)); |
1626 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, | 1626 | iwl_print_hex_dump(priv, IWL_DL_RADIO, pkt->u.raw, |
@@ -1660,7 +1660,7 @@ static void iwl3945_rx_beacon_notif(struct iwl_priv *priv, | |||
1660 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); | 1660 | struct iwl3945_beacon_notif *beacon = &(pkt->u.beacon_status); |
1661 | u8 rate = beacon->beacon_notify_hdr.rate; | 1661 | u8 rate = beacon->beacon_notify_hdr.rate; |
1662 | 1662 | ||
1663 | IWL_DEBUG_RX("beacon status %x retries %d iss %d " | 1663 | IWL_DEBUG_RX(priv, "beacon status %x retries %d iss %d " |
1664 | "tsf %d %d rate %d\n", | 1664 | "tsf %d %d rate %d\n", |
1665 | le32_to_cpu(beacon->beacon_notify_hdr.status) & TX_STATUS_MSK, | 1665 | le32_to_cpu(beacon->beacon_notify_hdr.status) & TX_STATUS_MSK, |
1666 | beacon->beacon_notify_hdr.failure_frame, | 1666 | beacon->beacon_notify_hdr.failure_frame, |
@@ -1683,7 +1683,7 @@ static void iwl3945_rx_reply_scan(struct iwl_priv *priv, | |||
1683 | struct iwl_scanreq_notification *notif = | 1683 | struct iwl_scanreq_notification *notif = |
1684 | (struct iwl_scanreq_notification *)pkt->u.raw; | 1684 | (struct iwl_scanreq_notification *)pkt->u.raw; |
1685 | 1685 | ||
1686 | IWL_DEBUG_RX("Scan request status = 0x%x\n", notif->status); | 1686 | IWL_DEBUG_RX(priv, "Scan request status = 0x%x\n", notif->status); |
1687 | #endif | 1687 | #endif |
1688 | } | 1688 | } |
1689 | 1689 | ||
@@ -1695,7 +1695,7 @@ static void iwl3945_rx_scan_start_notif(struct iwl_priv *priv, | |||
1695 | struct iwl_scanstart_notification *notif = | 1695 | struct iwl_scanstart_notification *notif = |
1696 | (struct iwl_scanstart_notification *)pkt->u.raw; | 1696 | (struct iwl_scanstart_notification *)pkt->u.raw; |
1697 | priv->scan_start_tsf = le32_to_cpu(notif->tsf_low); | 1697 | priv->scan_start_tsf = le32_to_cpu(notif->tsf_low); |
1698 | IWL_DEBUG_SCAN("Scan start: " | 1698 | IWL_DEBUG_SCAN(priv, "Scan start: " |
1699 | "%d [802.11%s] " | 1699 | "%d [802.11%s] " |
1700 | "(TSF: 0x%08X:%08X) - %d (beacon timer %u)\n", | 1700 | "(TSF: 0x%08X:%08X) - %d (beacon timer %u)\n", |
1701 | notif->channel, | 1701 | notif->channel, |
@@ -1714,7 +1714,7 @@ static void iwl3945_rx_scan_results_notif(struct iwl_priv *priv, | |||
1714 | (struct iwl_scanresults_notification *)pkt->u.raw; | 1714 | (struct iwl_scanresults_notification *)pkt->u.raw; |
1715 | #endif | 1715 | #endif |
1716 | 1716 | ||
1717 | IWL_DEBUG_SCAN("Scan ch.res: " | 1717 | IWL_DEBUG_SCAN(priv, "Scan ch.res: " |
1718 | "%d [802.11%s] " | 1718 | "%d [802.11%s] " |
1719 | "(TSF: 0x%08X:%08X) - %d " | 1719 | "(TSF: 0x%08X:%08X) - %d " |
1720 | "elapsed=%lu usec (%dms since last)\n", | 1720 | "elapsed=%lu usec (%dms since last)\n", |
@@ -1740,7 +1740,7 @@ static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv, | |||
1740 | struct iwl_scancomplete_notification *scan_notif = (void *)pkt->u.raw; | 1740 | struct iwl_scancomplete_notification *scan_notif = (void *)pkt->u.raw; |
1741 | #endif | 1741 | #endif |
1742 | 1742 | ||
1743 | IWL_DEBUG_SCAN("Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", | 1743 | IWL_DEBUG_SCAN(priv, "Scan complete: %d channels (TSF 0x%08X:%08X) - %d\n", |
1744 | scan_notif->scanned_channels, | 1744 | scan_notif->scanned_channels, |
1745 | scan_notif->tsf_low, | 1745 | scan_notif->tsf_low, |
1746 | scan_notif->tsf_high, scan_notif->status); | 1746 | scan_notif->tsf_high, scan_notif->status); |
@@ -1751,7 +1751,7 @@ static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv, | |||
1751 | /* The scan completion notification came in, so kill that timer... */ | 1751 | /* The scan completion notification came in, so kill that timer... */ |
1752 | cancel_delayed_work(&priv->scan_check); | 1752 | cancel_delayed_work(&priv->scan_check); |
1753 | 1753 | ||
1754 | IWL_DEBUG_INFO("Scan pass on %sGHz took %dms\n", | 1754 | IWL_DEBUG_INFO(priv, "Scan pass on %sGHz took %dms\n", |
1755 | (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ? | 1755 | (priv->scan_bands & BIT(IEEE80211_BAND_2GHZ)) ? |
1756 | "2.4" : "5.2", | 1756 | "2.4" : "5.2", |
1757 | jiffies_to_msecs(elapsed_jiffies | 1757 | jiffies_to_msecs(elapsed_jiffies |
@@ -1769,7 +1769,7 @@ static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv, | |||
1769 | * then we reset the scan state machine and terminate, | 1769 | * then we reset the scan state machine and terminate, |
1770 | * re-queuing another scan if one has been requested */ | 1770 | * re-queuing another scan if one has been requested */ |
1771 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | 1771 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { |
1772 | IWL_DEBUG_INFO("Aborted scan completed.\n"); | 1772 | IWL_DEBUG_INFO(priv, "Aborted scan completed.\n"); |
1773 | clear_bit(STATUS_SCAN_ABORTING, &priv->status); | 1773 | clear_bit(STATUS_SCAN_ABORTING, &priv->status); |
1774 | } else { | 1774 | } else { |
1775 | /* If there are more bands on this scan pass reschedule */ | 1775 | /* If there are more bands on this scan pass reschedule */ |
@@ -1779,11 +1779,11 @@ static void iwl3945_rx_scan_complete_notif(struct iwl_priv *priv, | |||
1779 | 1779 | ||
1780 | priv->last_scan_jiffies = jiffies; | 1780 | priv->last_scan_jiffies = jiffies; |
1781 | priv->next_scan_jiffies = 0; | 1781 | priv->next_scan_jiffies = 0; |
1782 | IWL_DEBUG_INFO("Setting scan to off\n"); | 1782 | IWL_DEBUG_INFO(priv, "Setting scan to off\n"); |
1783 | 1783 | ||
1784 | clear_bit(STATUS_SCANNING, &priv->status); | 1784 | clear_bit(STATUS_SCANNING, &priv->status); |
1785 | 1785 | ||
1786 | IWL_DEBUG_INFO("Scan took %dms\n", | 1786 | IWL_DEBUG_INFO(priv, "Scan took %dms\n", |
1787 | jiffies_to_msecs(elapsed_jiffies(priv->scan_start, jiffies))); | 1787 | jiffies_to_msecs(elapsed_jiffies(priv->scan_start, jiffies))); |
1788 | 1788 | ||
1789 | queue_work(priv->workqueue, &priv->scan_completed); | 1789 | queue_work(priv->workqueue, &priv->scan_completed); |
@@ -1804,7 +1804,7 @@ static void iwl3945_rx_card_state_notif(struct iwl_priv *priv, | |||
1804 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); | 1804 | u32 flags = le32_to_cpu(pkt->u.card_state_notif.flags); |
1805 | unsigned long status = priv->status; | 1805 | unsigned long status = priv->status; |
1806 | 1806 | ||
1807 | IWL_DEBUG_RF_KILL("Card state received: HW:%s SW:%s\n", | 1807 | IWL_DEBUG_RF_KILL(priv, "Card state received: HW:%s SW:%s\n", |
1808 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", | 1808 | (flags & HW_CARD_DISABLED) ? "Kill" : "On", |
1809 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); | 1809 | (flags & SW_CARD_DISABLED) ? "Kill" : "On"); |
1810 | 1810 | ||
@@ -2265,7 +2265,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
2265 | fill_rx = 1; | 2265 | fill_rx = 1; |
2266 | /* Rx interrupt, but nothing sent from uCode */ | 2266 | /* Rx interrupt, but nothing sent from uCode */ |
2267 | if (i == r) | 2267 | if (i == r) |
2268 | IWL_DEBUG(IWL_DL_RX | IWL_DL_ISR, "r = %d, i = %d\n", r, i); | 2268 | IWL_DEBUG(priv, IWL_DL_RX | IWL_DL_ISR, "r = %d, i = %d\n", r, i); |
2269 | 2269 | ||
2270 | while (i != r) { | 2270 | while (i != r) { |
2271 | rxb = rxq->queue[i]; | 2271 | rxb = rxq->queue[i]; |
@@ -2296,13 +2296,13 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
2296 | * handle those that need handling via function in | 2296 | * handle those that need handling via function in |
2297 | * rx_handlers table. See iwl3945_setup_rx_handlers() */ | 2297 | * rx_handlers table. See iwl3945_setup_rx_handlers() */ |
2298 | if (priv->rx_handlers[pkt->hdr.cmd]) { | 2298 | if (priv->rx_handlers[pkt->hdr.cmd]) { |
2299 | IWL_DEBUG(IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR, | 2299 | IWL_DEBUG(priv, IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR, |
2300 | "r = %d, i = %d, %s, 0x%02x\n", r, i, | 2300 | "r = %d, i = %d, %s, 0x%02x\n", r, i, |
2301 | get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); | 2301 | get_cmd_string(pkt->hdr.cmd), pkt->hdr.cmd); |
2302 | priv->rx_handlers[pkt->hdr.cmd] (priv, rxb); | 2302 | priv->rx_handlers[pkt->hdr.cmd] (priv, rxb); |
2303 | } else { | 2303 | } else { |
2304 | /* No handling needed */ | 2304 | /* No handling needed */ |
2305 | IWL_DEBUG(IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR, | 2305 | IWL_DEBUG(priv, IWL_DL_HCMD | IWL_DL_RX | IWL_DL_ISR, |
2306 | "r %d i %d No handler needed for %s, 0x%02x\n", | 2306 | "r %d i %d No handler needed for %s, 0x%02x\n", |
2307 | r, i, get_cmd_string(pkt->hdr.cmd), | 2307 | r, i, get_cmd_string(pkt->hdr.cmd), |
2308 | pkt->hdr.cmd); | 2308 | pkt->hdr.cmd); |
@@ -2353,7 +2353,7 @@ static void iwl3945_rx_handle(struct iwl_priv *priv) | |||
2353 | 2353 | ||
2354 | static void iwl3945_enable_interrupts(struct iwl_priv *priv) | 2354 | static void iwl3945_enable_interrupts(struct iwl_priv *priv) |
2355 | { | 2355 | { |
2356 | IWL_DEBUG_ISR("Enabling interrupts\n"); | 2356 | IWL_DEBUG_ISR(priv, "Enabling interrupts\n"); |
2357 | set_bit(STATUS_INT_ENABLED, &priv->status); | 2357 | set_bit(STATUS_INT_ENABLED, &priv->status); |
2358 | iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); | 2358 | iwl_write32(priv, CSR_INT_MASK, CSR_INI_SET_MASK); |
2359 | } | 2359 | } |
@@ -2379,7 +2379,7 @@ static inline void iwl3945_disable_interrupts(struct iwl_priv *priv) | |||
2379 | * from uCode or flow handler (Rx/Tx DMA) */ | 2379 | * from uCode or flow handler (Rx/Tx DMA) */ |
2380 | iwl_write32(priv, CSR_INT, 0xffffffff); | 2380 | iwl_write32(priv, CSR_INT, 0xffffffff); |
2381 | iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); | 2381 | iwl_write32(priv, CSR_FH_INT_STATUS, 0xffffffff); |
2382 | IWL_DEBUG_ISR("Disabled interrupts\n"); | 2382 | IWL_DEBUG_ISR(priv, "Disabled interrupts\n"); |
2383 | } | 2383 | } |
2384 | 2384 | ||
2385 | static const char *desc_lookup(int i) | 2385 | static const char *desc_lookup(int i) |
@@ -2604,7 +2604,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
2604 | if (priv->debug_level & IWL_DL_ISR) { | 2604 | if (priv->debug_level & IWL_DL_ISR) { |
2605 | /* just for debug */ | 2605 | /* just for debug */ |
2606 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 2606 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
2607 | IWL_DEBUG_ISR("inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 2607 | IWL_DEBUG_ISR(priv, "inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
2608 | inta, inta_mask, inta_fh); | 2608 | inta, inta_mask, inta_fh); |
2609 | } | 2609 | } |
2610 | #endif | 2610 | #endif |
@@ -2638,12 +2638,12 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
2638 | if (priv->debug_level & (IWL_DL_ISR)) { | 2638 | if (priv->debug_level & (IWL_DL_ISR)) { |
2639 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ | 2639 | /* NIC fires this, but we don't use it, redundant with WAKEUP */ |
2640 | if (inta & CSR_INT_BIT_SCD) | 2640 | if (inta & CSR_INT_BIT_SCD) |
2641 | IWL_DEBUG_ISR("Scheduler finished to transmit " | 2641 | IWL_DEBUG_ISR(priv, "Scheduler finished to transmit " |
2642 | "the frame/frames.\n"); | 2642 | "the frame/frames.\n"); |
2643 | 2643 | ||
2644 | /* Alive notification via Rx interrupt will do the real work */ | 2644 | /* Alive notification via Rx interrupt will do the real work */ |
2645 | if (inta & CSR_INT_BIT_ALIVE) | 2645 | if (inta & CSR_INT_BIT_ALIVE) |
2646 | IWL_DEBUG_ISR("Alive interrupt\n"); | 2646 | IWL_DEBUG_ISR(priv, "Alive interrupt\n"); |
2647 | } | 2647 | } |
2648 | #endif | 2648 | #endif |
2649 | /* Safely ignore these bits for debug checks below */ | 2649 | /* Safely ignore these bits for debug checks below */ |
@@ -2659,7 +2659,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
2659 | 2659 | ||
2660 | /* uCode wakes up after power-down sleep */ | 2660 | /* uCode wakes up after power-down sleep */ |
2661 | if (inta & CSR_INT_BIT_WAKEUP) { | 2661 | if (inta & CSR_INT_BIT_WAKEUP) { |
2662 | IWL_DEBUG_ISR("Wakeup interrupt\n"); | 2662 | IWL_DEBUG_ISR(priv, "Wakeup interrupt\n"); |
2663 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); | 2663 | iwl_rx_queue_update_write_ptr(priv, &priv->rxq); |
2664 | iwl_txq_update_write_ptr(priv, &priv->txq[0]); | 2664 | iwl_txq_update_write_ptr(priv, &priv->txq[0]); |
2665 | iwl_txq_update_write_ptr(priv, &priv->txq[1]); | 2665 | iwl_txq_update_write_ptr(priv, &priv->txq[1]); |
@@ -2680,7 +2680,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
2680 | } | 2680 | } |
2681 | 2681 | ||
2682 | if (inta & CSR_INT_BIT_FH_TX) { | 2682 | if (inta & CSR_INT_BIT_FH_TX) { |
2683 | IWL_DEBUG_ISR("Tx interrupt\n"); | 2683 | IWL_DEBUG_ISR(priv, "Tx interrupt\n"); |
2684 | 2684 | ||
2685 | iwl_write32(priv, CSR_FH_INT_STATUS, (1 << 6)); | 2685 | iwl_write32(priv, CSR_FH_INT_STATUS, (1 << 6)); |
2686 | if (!iwl_grab_nic_access(priv)) { | 2686 | if (!iwl_grab_nic_access(priv)) { |
@@ -2710,7 +2710,7 @@ static void iwl3945_irq_tasklet(struct iwl_priv *priv) | |||
2710 | inta = iwl_read32(priv, CSR_INT); | 2710 | inta = iwl_read32(priv, CSR_INT); |
2711 | inta_mask = iwl_read32(priv, CSR_INT_MASK); | 2711 | inta_mask = iwl_read32(priv, CSR_INT_MASK); |
2712 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); | 2712 | inta_fh = iwl_read32(priv, CSR_FH_INT_STATUS); |
2713 | IWL_DEBUG_ISR("End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " | 2713 | IWL_DEBUG_ISR(priv, "End inta 0x%08x, enabled 0x%08x, fh 0x%08x, " |
2714 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); | 2714 | "flags 0x%08lx\n", inta, inta_mask, inta_fh, flags); |
2715 | } | 2715 | } |
2716 | #endif | 2716 | #endif |
@@ -2742,7 +2742,7 @@ static irqreturn_t iwl3945_isr(int irq, void *data) | |||
2742 | * This may be due to IRQ shared with another device, | 2742 | * This may be due to IRQ shared with another device, |
2743 | * or due to sporadic interrupts thrown from our NIC. */ | 2743 | * or due to sporadic interrupts thrown from our NIC. */ |
2744 | if (!inta && !inta_fh) { | 2744 | if (!inta && !inta_fh) { |
2745 | IWL_DEBUG_ISR("Ignore interrupt, inta == 0, inta_fh == 0\n"); | 2745 | IWL_DEBUG_ISR(priv, "Ignore interrupt, inta == 0, inta_fh == 0\n"); |
2746 | goto none; | 2746 | goto none; |
2747 | } | 2747 | } |
2748 | 2748 | ||
@@ -2752,7 +2752,7 @@ static irqreturn_t iwl3945_isr(int irq, void *data) | |||
2752 | goto unplugged; | 2752 | goto unplugged; |
2753 | } | 2753 | } |
2754 | 2754 | ||
2755 | IWL_DEBUG_ISR("ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", | 2755 | IWL_DEBUG_ISR(priv, "ISR inta 0x%08x, enabled 0x%08x, fh 0x%08x\n", |
2756 | inta, inta_mask, inta_fh); | 2756 | inta, inta_mask, inta_fh); |
2757 | 2757 | ||
2758 | inta &= ~CSR_INT_BIT_SCD; | 2758 | inta &= ~CSR_INT_BIT_SCD; |
@@ -2806,7 +2806,7 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, | |||
2806 | 2806 | ||
2807 | ch_info = iwl_get_channel_info(priv, band, scan_ch->channel); | 2807 | ch_info = iwl_get_channel_info(priv, band, scan_ch->channel); |
2808 | if (!is_channel_valid(ch_info)) { | 2808 | if (!is_channel_valid(ch_info)) { |
2809 | IWL_DEBUG_SCAN("Channel %d is INVALID for this band.\n", | 2809 | IWL_DEBUG_SCAN(priv, "Channel %d is INVALID for this band.\n", |
2810 | scan_ch->channel); | 2810 | scan_ch->channel); |
2811 | continue; | 2811 | continue; |
2812 | } | 2812 | } |
@@ -2854,7 +2854,7 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, | |||
2854 | */ | 2854 | */ |
2855 | } | 2855 | } |
2856 | 2856 | ||
2857 | IWL_DEBUG_SCAN("Scanning %d [%s %d]\n", | 2857 | IWL_DEBUG_SCAN(priv, "Scanning %d [%s %d]\n", |
2858 | scan_ch->channel, | 2858 | scan_ch->channel, |
2859 | (scan_ch->type & 1) ? "ACTIVE" : "PASSIVE", | 2859 | (scan_ch->type & 1) ? "ACTIVE" : "PASSIVE", |
2860 | (scan_ch->type & 1) ? | 2860 | (scan_ch->type & 1) ? |
@@ -2864,7 +2864,7 @@ static int iwl3945_get_channels_for_scan(struct iwl_priv *priv, | |||
2864 | added++; | 2864 | added++; |
2865 | } | 2865 | } |
2866 | 2866 | ||
2867 | IWL_DEBUG_SCAN("total channels to scan %d \n", added); | 2867 | IWL_DEBUG_SCAN(priv, "total channels to scan %d \n", added); |
2868 | return added; | 2868 | return added; |
2869 | } | 2869 | } |
2870 | 2870 | ||
@@ -2915,7 +2915,7 @@ static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 le | |||
2915 | int rc = 0; | 2915 | int rc = 0; |
2916 | u32 errcnt; | 2916 | u32 errcnt; |
2917 | 2917 | ||
2918 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); | 2918 | IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len); |
2919 | 2919 | ||
2920 | rc = iwl_grab_nic_access(priv); | 2920 | rc = iwl_grab_nic_access(priv); |
2921 | if (rc) | 2921 | if (rc) |
@@ -2944,7 +2944,8 @@ static int iwl3945_verify_inst_full(struct iwl_priv *priv, __le32 *image, u32 le | |||
2944 | iwl_release_nic_access(priv); | 2944 | iwl_release_nic_access(priv); |
2945 | 2945 | ||
2946 | if (!errcnt) | 2946 | if (!errcnt) |
2947 | IWL_DEBUG_INFO("ucode image in INSTRUCTION memory is good\n"); | 2947 | IWL_DEBUG_INFO(priv, |
2948 | "ucode image in INSTRUCTION memory is good\n"); | ||
2948 | 2949 | ||
2949 | return rc; | 2950 | return rc; |
2950 | } | 2951 | } |
@@ -2962,7 +2963,7 @@ static int iwl3945_verify_inst_sparse(struct iwl_priv *priv, __le32 *image, u32 | |||
2962 | u32 errcnt = 0; | 2963 | u32 errcnt = 0; |
2963 | u32 i; | 2964 | u32 i; |
2964 | 2965 | ||
2965 | IWL_DEBUG_INFO("ucode inst image size is %u\n", len); | 2966 | IWL_DEBUG_INFO(priv, "ucode inst image size is %u\n", len); |
2966 | 2967 | ||
2967 | rc = iwl_grab_nic_access(priv); | 2968 | rc = iwl_grab_nic_access(priv); |
2968 | if (rc) | 2969 | if (rc) |
@@ -3009,7 +3010,7 @@ static int iwl3945_verify_ucode(struct iwl_priv *priv) | |||
3009 | len = priv->ucode_boot.len; | 3010 | len = priv->ucode_boot.len; |
3010 | rc = iwl3945_verify_inst_sparse(priv, image, len); | 3011 | rc = iwl3945_verify_inst_sparse(priv, image, len); |
3011 | if (rc == 0) { | 3012 | if (rc == 0) { |
3012 | IWL_DEBUG_INFO("Bootstrap uCode is good in inst SRAM\n"); | 3013 | IWL_DEBUG_INFO(priv, "Bootstrap uCode is good in inst SRAM\n"); |
3013 | return 0; | 3014 | return 0; |
3014 | } | 3015 | } |
3015 | 3016 | ||
@@ -3018,7 +3019,7 @@ static int iwl3945_verify_ucode(struct iwl_priv *priv) | |||
3018 | len = priv->ucode_init.len; | 3019 | len = priv->ucode_init.len; |
3019 | rc = iwl3945_verify_inst_sparse(priv, image, len); | 3020 | rc = iwl3945_verify_inst_sparse(priv, image, len); |
3020 | if (rc == 0) { | 3021 | if (rc == 0) { |
3021 | IWL_DEBUG_INFO("Initialize uCode is good in inst SRAM\n"); | 3022 | IWL_DEBUG_INFO(priv, "Initialize uCode is good in inst SRAM\n"); |
3022 | return 0; | 3023 | return 0; |
3023 | } | 3024 | } |
3024 | 3025 | ||
@@ -3027,7 +3028,7 @@ static int iwl3945_verify_ucode(struct iwl_priv *priv) | |||
3027 | len = priv->ucode_code.len; | 3028 | len = priv->ucode_code.len; |
3028 | rc = iwl3945_verify_inst_sparse(priv, image, len); | 3029 | rc = iwl3945_verify_inst_sparse(priv, image, len); |
3029 | if (rc == 0) { | 3030 | if (rc == 0) { |
3030 | IWL_DEBUG_INFO("Runtime uCode is good in inst SRAM\n"); | 3031 | IWL_DEBUG_INFO(priv, "Runtime uCode is good in inst SRAM\n"); |
3031 | return 0; | 3032 | return 0; |
3032 | } | 3033 | } |
3033 | 3034 | ||
@@ -3086,7 +3087,8 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3086 | "which is deprecated. " | 3087 | "which is deprecated. " |
3087 | " Please use API v%u instead.\n", | 3088 | " Please use API v%u instead.\n", |
3088 | buf, api_max); | 3089 | buf, api_max); |
3089 | IWL_DEBUG_INFO("Got firmware '%s' file (%zd bytes) from disk\n", | 3090 | IWL_DEBUG_INFO(priv, "Got firmware '%s' file " |
3091 | "(%zd bytes) from disk\n", | ||
3090 | buf, ucode_raw->size); | 3092 | buf, ucode_raw->size); |
3091 | break; | 3093 | break; |
3092 | } | 3094 | } |
@@ -3137,13 +3139,18 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3137 | IWL_UCODE_API(priv->ucode_ver), | 3139 | IWL_UCODE_API(priv->ucode_ver), |
3138 | IWL_UCODE_SERIAL(priv->ucode_ver)); | 3140 | IWL_UCODE_SERIAL(priv->ucode_ver)); |
3139 | 3141 | ||
3140 | IWL_DEBUG_INFO("f/w package hdr ucode version raw = 0x%x\n", | 3142 | IWL_DEBUG_INFO(priv, "f/w package hdr ucode version raw = 0x%x\n", |
3141 | priv->ucode_ver); | 3143 | priv->ucode_ver); |
3142 | IWL_DEBUG_INFO("f/w package hdr runtime inst size = %u\n", inst_size); | 3144 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime inst size = %u\n", |
3143 | IWL_DEBUG_INFO("f/w package hdr runtime data size = %u\n", data_size); | 3145 | inst_size); |
3144 | IWL_DEBUG_INFO("f/w package hdr init inst size = %u\n", init_size); | 3146 | IWL_DEBUG_INFO(priv, "f/w package hdr runtime data size = %u\n", |
3145 | IWL_DEBUG_INFO("f/w package hdr init data size = %u\n", init_data_size); | 3147 | data_size); |
3146 | IWL_DEBUG_INFO("f/w package hdr boot inst size = %u\n", boot_size); | 3148 | IWL_DEBUG_INFO(priv, "f/w package hdr init inst size = %u\n", |
3149 | init_size); | ||
3150 | IWL_DEBUG_INFO(priv, "f/w package hdr init data size = %u\n", | ||
3151 | init_data_size); | ||
3152 | IWL_DEBUG_INFO(priv, "f/w package hdr boot inst size = %u\n", | ||
3153 | boot_size); | ||
3147 | 3154 | ||
3148 | 3155 | ||
3149 | /* Verify size of file vs. image size info in file's header */ | 3156 | /* Verify size of file vs. image size info in file's header */ |
@@ -3151,40 +3158,43 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3151 | inst_size + data_size + init_size + | 3158 | inst_size + data_size + init_size + |
3152 | init_data_size + boot_size) { | 3159 | init_data_size + boot_size) { |
3153 | 3160 | ||
3154 | IWL_DEBUG_INFO("uCode file size %d too small\n", | 3161 | IWL_DEBUG_INFO(priv, "uCode file size %zd too small\n", |
3155 | (int)ucode_raw->size); | 3162 | ucode_raw->size); |
3156 | ret = -EINVAL; | 3163 | ret = -EINVAL; |
3157 | goto err_release; | 3164 | goto err_release; |
3158 | } | 3165 | } |
3159 | 3166 | ||
3160 | /* Verify that uCode images will fit in card's SRAM */ | 3167 | /* Verify that uCode images will fit in card's SRAM */ |
3161 | if (inst_size > IWL39_MAX_INST_SIZE) { | 3168 | if (inst_size > IWL39_MAX_INST_SIZE) { |
3162 | IWL_DEBUG_INFO("uCode instr len %d too large to fit in\n", | 3169 | IWL_DEBUG_INFO(priv, "uCode instr len %d too large to fit in\n", |
3163 | inst_size); | 3170 | inst_size); |
3164 | ret = -EINVAL; | 3171 | ret = -EINVAL; |
3165 | goto err_release; | 3172 | goto err_release; |
3166 | } | 3173 | } |
3167 | 3174 | ||
3168 | if (data_size > IWL39_MAX_DATA_SIZE) { | 3175 | if (data_size > IWL39_MAX_DATA_SIZE) { |
3169 | IWL_DEBUG_INFO("uCode data len %d too large to fit in\n", | 3176 | IWL_DEBUG_INFO(priv, "uCode data len %d too large to fit in\n", |
3170 | data_size); | 3177 | data_size); |
3171 | ret = -EINVAL; | 3178 | ret = -EINVAL; |
3172 | goto err_release; | 3179 | goto err_release; |
3173 | } | 3180 | } |
3174 | if (init_size > IWL39_MAX_INST_SIZE) { | 3181 | if (init_size > IWL39_MAX_INST_SIZE) { |
3175 | IWL_DEBUG_INFO("uCode init instr len %d too large to fit in\n", | 3182 | IWL_DEBUG_INFO(priv, |
3183 | "uCode init instr len %d too large to fit in\n", | ||
3176 | init_size); | 3184 | init_size); |
3177 | ret = -EINVAL; | 3185 | ret = -EINVAL; |
3178 | goto err_release; | 3186 | goto err_release; |
3179 | } | 3187 | } |
3180 | if (init_data_size > IWL39_MAX_DATA_SIZE) { | 3188 | if (init_data_size > IWL39_MAX_DATA_SIZE) { |
3181 | IWL_DEBUG_INFO("uCode init data len %d too large to fit in\n", | 3189 | IWL_DEBUG_INFO(priv, |
3190 | "uCode init data len %d too large to fit in\n", | ||
3182 | init_data_size); | 3191 | init_data_size); |
3183 | ret = -EINVAL; | 3192 | ret = -EINVAL; |
3184 | goto err_release; | 3193 | goto err_release; |
3185 | } | 3194 | } |
3186 | if (boot_size > IWL39_MAX_BSM_SIZE) { | 3195 | if (boot_size > IWL39_MAX_BSM_SIZE) { |
3187 | IWL_DEBUG_INFO("uCode boot instr len %d too large to fit in\n", | 3196 | IWL_DEBUG_INFO(priv, |
3197 | "uCode boot instr len %d too large to fit in\n", | ||
3188 | boot_size); | 3198 | boot_size); |
3189 | ret = -EINVAL; | 3199 | ret = -EINVAL; |
3190 | goto err_release; | 3200 | goto err_release; |
@@ -3234,16 +3244,18 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3234 | /* Runtime instructions (first block of data in file) */ | 3244 | /* Runtime instructions (first block of data in file) */ |
3235 | src = &ucode->data[0]; | 3245 | src = &ucode->data[0]; |
3236 | len = priv->ucode_code.len; | 3246 | len = priv->ucode_code.len; |
3237 | IWL_DEBUG_INFO("Copying (but not loading) uCode instr len %Zd\n", len); | 3247 | IWL_DEBUG_INFO(priv, |
3248 | "Copying (but not loading) uCode instr len %zd\n", len); | ||
3238 | memcpy(priv->ucode_code.v_addr, src, len); | 3249 | memcpy(priv->ucode_code.v_addr, src, len); |
3239 | IWL_DEBUG_INFO("uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", | 3250 | IWL_DEBUG_INFO(priv, "uCode instr buf vaddr = 0x%p, paddr = 0x%08x\n", |
3240 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); | 3251 | priv->ucode_code.v_addr, (u32)priv->ucode_code.p_addr); |
3241 | 3252 | ||
3242 | /* Runtime data (2nd block) | 3253 | /* Runtime data (2nd block) |
3243 | * NOTE: Copy into backup buffer will be done in iwl3945_up() */ | 3254 | * NOTE: Copy into backup buffer will be done in iwl3945_up() */ |
3244 | src = &ucode->data[inst_size]; | 3255 | src = &ucode->data[inst_size]; |
3245 | len = priv->ucode_data.len; | 3256 | len = priv->ucode_data.len; |
3246 | IWL_DEBUG_INFO("Copying (but not loading) uCode data len %Zd\n", len); | 3257 | IWL_DEBUG_INFO(priv, |
3258 | "Copying (but not loading) uCode data len %zd\n", len); | ||
3247 | memcpy(priv->ucode_data.v_addr, src, len); | 3259 | memcpy(priv->ucode_data.v_addr, src, len); |
3248 | memcpy(priv->ucode_data_backup.v_addr, src, len); | 3260 | memcpy(priv->ucode_data_backup.v_addr, src, len); |
3249 | 3261 | ||
@@ -3251,8 +3263,8 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3251 | if (init_size) { | 3263 | if (init_size) { |
3252 | src = &ucode->data[inst_size + data_size]; | 3264 | src = &ucode->data[inst_size + data_size]; |
3253 | len = priv->ucode_init.len; | 3265 | len = priv->ucode_init.len; |
3254 | IWL_DEBUG_INFO("Copying (but not loading) init instr len %Zd\n", | 3266 | IWL_DEBUG_INFO(priv, |
3255 | len); | 3267 | "Copying (but not loading) init instr len %zd\n", len); |
3256 | memcpy(priv->ucode_init.v_addr, src, len); | 3268 | memcpy(priv->ucode_init.v_addr, src, len); |
3257 | } | 3269 | } |
3258 | 3270 | ||
@@ -3260,16 +3272,16 @@ static int iwl3945_read_ucode(struct iwl_priv *priv) | |||
3260 | if (init_data_size) { | 3272 | if (init_data_size) { |
3261 | src = &ucode->data[inst_size + data_size + init_size]; | 3273 | src = &ucode->data[inst_size + data_size + init_size]; |
3262 | len = priv->ucode_init_data.len; | 3274 | len = priv->ucode_init_data.len; |
3263 | IWL_DEBUG_INFO("Copying (but not loading) init data len %d\n", | 3275 | IWL_DEBUG_INFO(priv, |
3264 | (int)len); | 3276 | "Copying (but not loading) init data len %zd\n", len); |
3265 | memcpy(priv->ucode_init_data.v_addr, src, len); | 3277 | memcpy(priv->ucode_init_data.v_addr, src, len); |
3266 | } | 3278 | } |
3267 | 3279 | ||
3268 | /* Bootstrap instructions (5th block) */ | 3280 | /* Bootstrap instructions (5th block) */ |
3269 | src = &ucode->data[inst_size + data_size + init_size + init_data_size]; | 3281 | src = &ucode->data[inst_size + data_size + init_size + init_data_size]; |
3270 | len = priv->ucode_boot.len; | 3282 | len = priv->ucode_boot.len; |
3271 | IWL_DEBUG_INFO("Copying (but not loading) boot instr len %d\n", | 3283 | IWL_DEBUG_INFO(priv, |
3272 | (int)len); | 3284 | "Copying (but not loading) boot instr len %zd\n", len); |
3273 | memcpy(priv->ucode_boot.v_addr, src, len); | 3285 | memcpy(priv->ucode_boot.v_addr, src, len); |
3274 | 3286 | ||
3275 | /* We have our copies now, allow OS release its copies */ | 3287 | /* We have our copies now, allow OS release its copies */ |
@@ -3331,7 +3343,7 @@ static int iwl3945_set_ucode_ptrs(struct iwl_priv *priv) | |||
3331 | 3343 | ||
3332 | spin_unlock_irqrestore(&priv->lock, flags); | 3344 | spin_unlock_irqrestore(&priv->lock, flags); |
3333 | 3345 | ||
3334 | IWL_DEBUG_INFO("Runtime uCode pointers are set.\n"); | 3346 | IWL_DEBUG_INFO(priv, "Runtime uCode pointers are set.\n"); |
3335 | 3347 | ||
3336 | return rc; | 3348 | return rc; |
3337 | } | 3349 | } |
@@ -3349,7 +3361,7 @@ static void iwl3945_init_alive_start(struct iwl_priv *priv) | |||
3349 | if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { | 3361 | if (priv->card_alive_init.is_valid != UCODE_VALID_OK) { |
3350 | /* We had an error bringing up the hardware, so take it | 3362 | /* We had an error bringing up the hardware, so take it |
3351 | * all the way back down so we can try again */ | 3363 | * all the way back down so we can try again */ |
3352 | IWL_DEBUG_INFO("Initialize Alive failed.\n"); | 3364 | IWL_DEBUG_INFO(priv, "Initialize Alive failed.\n"); |
3353 | goto restart; | 3365 | goto restart; |
3354 | } | 3366 | } |
3355 | 3367 | ||
@@ -3359,18 +3371,18 @@ static void iwl3945_init_alive_start(struct iwl_priv *priv) | |||
3359 | if (iwl3945_verify_ucode(priv)) { | 3371 | if (iwl3945_verify_ucode(priv)) { |
3360 | /* Runtime instruction load was bad; | 3372 | /* Runtime instruction load was bad; |
3361 | * take it all the way back down so we can try again */ | 3373 | * take it all the way back down so we can try again */ |
3362 | IWL_DEBUG_INFO("Bad \"initialize\" uCode load.\n"); | 3374 | IWL_DEBUG_INFO(priv, "Bad \"initialize\" uCode load.\n"); |
3363 | goto restart; | 3375 | goto restart; |
3364 | } | 3376 | } |
3365 | 3377 | ||
3366 | /* Send pointers to protocol/runtime uCode image ... init code will | 3378 | /* Send pointers to protocol/runtime uCode image ... init code will |
3367 | * load and launch runtime uCode, which will send us another "Alive" | 3379 | * load and launch runtime uCode, which will send us another "Alive" |
3368 | * notification. */ | 3380 | * notification. */ |
3369 | IWL_DEBUG_INFO("Initialization Alive received.\n"); | 3381 | IWL_DEBUG_INFO(priv, "Initialization Alive received.\n"); |
3370 | if (iwl3945_set_ucode_ptrs(priv)) { | 3382 | if (iwl3945_set_ucode_ptrs(priv)) { |
3371 | /* Runtime instruction load won't happen; | 3383 | /* Runtime instruction load won't happen; |
3372 | * take it all the way back down so we can try again */ | 3384 | * take it all the way back down so we can try again */ |
3373 | IWL_DEBUG_INFO("Couldn't set up uCode pointers.\n"); | 3385 | IWL_DEBUG_INFO(priv, "Couldn't set up uCode pointers.\n"); |
3374 | goto restart; | 3386 | goto restart; |
3375 | } | 3387 | } |
3376 | return; | 3388 | return; |
@@ -3395,12 +3407,12 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
3395 | int thermal_spin = 0; | 3407 | int thermal_spin = 0; |
3396 | u32 rfkill; | 3408 | u32 rfkill; |
3397 | 3409 | ||
3398 | IWL_DEBUG_INFO("Runtime Alive received.\n"); | 3410 | IWL_DEBUG_INFO(priv, "Runtime Alive received.\n"); |
3399 | 3411 | ||
3400 | if (priv->card_alive.is_valid != UCODE_VALID_OK) { | 3412 | if (priv->card_alive.is_valid != UCODE_VALID_OK) { |
3401 | /* We had an error bringing up the hardware, so take it | 3413 | /* We had an error bringing up the hardware, so take it |
3402 | * all the way back down so we can try again */ | 3414 | * all the way back down so we can try again */ |
3403 | IWL_DEBUG_INFO("Alive failed.\n"); | 3415 | IWL_DEBUG_INFO(priv, "Alive failed.\n"); |
3404 | goto restart; | 3416 | goto restart; |
3405 | } | 3417 | } |
3406 | 3418 | ||
@@ -3410,7 +3422,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
3410 | if (iwl3945_verify_ucode(priv)) { | 3422 | if (iwl3945_verify_ucode(priv)) { |
3411 | /* Runtime instruction load was bad; | 3423 | /* Runtime instruction load was bad; |
3412 | * take it all the way back down so we can try again */ | 3424 | * take it all the way back down so we can try again */ |
3413 | IWL_DEBUG_INFO("Bad runtime uCode load.\n"); | 3425 | IWL_DEBUG_INFO(priv, "Bad runtime uCode load.\n"); |
3414 | goto restart; | 3426 | goto restart; |
3415 | } | 3427 | } |
3416 | 3428 | ||
@@ -3423,7 +3435,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
3423 | } | 3435 | } |
3424 | 3436 | ||
3425 | rfkill = iwl_read_prph(priv, APMG_RFKILL_REG); | 3437 | rfkill = iwl_read_prph(priv, APMG_RFKILL_REG); |
3426 | IWL_DEBUG_INFO("RFKILL status: 0x%x\n", rfkill); | 3438 | IWL_DEBUG_INFO(priv, "RFKILL status: 0x%x\n", rfkill); |
3427 | iwl_release_nic_access(priv); | 3439 | iwl_release_nic_access(priv); |
3428 | 3440 | ||
3429 | if (rfkill & 0x1) { | 3441 | if (rfkill & 0x1) { |
@@ -3436,7 +3448,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
3436 | } | 3448 | } |
3437 | 3449 | ||
3438 | if (thermal_spin) | 3450 | if (thermal_spin) |
3439 | IWL_DEBUG_INFO("Thermal calibration took %dus\n", | 3451 | IWL_DEBUG_INFO(priv, "Thermal calibration took %dus\n", |
3440 | thermal_spin * 10); | 3452 | thermal_spin * 10); |
3441 | } else | 3453 | } else |
3442 | set_bit(STATUS_RF_KILL_HW, &priv->status); | 3454 | set_bit(STATUS_RF_KILL_HW, &priv->status); |
@@ -3479,7 +3491,7 @@ static void iwl3945_alive_start(struct iwl_priv *priv) | |||
3479 | 3491 | ||
3480 | iwl3945_led_register(priv); | 3492 | iwl3945_led_register(priv); |
3481 | 3493 | ||
3482 | IWL_DEBUG_INFO("ALIVE processing complete.\n"); | 3494 | IWL_DEBUG_INFO(priv, "ALIVE processing complete.\n"); |
3483 | set_bit(STATUS_READY, &priv->status); | 3495 | set_bit(STATUS_READY, &priv->status); |
3484 | wake_up_interruptible(&priv->wait_command_queue); | 3496 | wake_up_interruptible(&priv->wait_command_queue); |
3485 | 3497 | ||
@@ -3508,7 +3520,7 @@ static void __iwl3945_down(struct iwl_priv *priv) | |||
3508 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); | 3520 | int exit_pending = test_bit(STATUS_EXIT_PENDING, &priv->status); |
3509 | struct ieee80211_conf *conf = NULL; | 3521 | struct ieee80211_conf *conf = NULL; |
3510 | 3522 | ||
3511 | IWL_DEBUG_INFO(DRV_NAME " is going down\n"); | 3523 | IWL_DEBUG_INFO(priv, DRV_NAME " is going down\n"); |
3512 | 3524 | ||
3513 | conf = ieee80211_get_hw_conf(priv->hw); | 3525 | conf = ieee80211_get_hw_conf(priv->hw); |
3514 | 3526 | ||
@@ -3695,7 +3707,7 @@ static int __iwl3945_up(struct iwl_priv *priv) | |||
3695 | /* start card; "initialize" will load runtime ucode */ | 3707 | /* start card; "initialize" will load runtime ucode */ |
3696 | iwl3945_nic_start(priv); | 3708 | iwl3945_nic_start(priv); |
3697 | 3709 | ||
3698 | IWL_DEBUG_INFO(DRV_NAME " is coming up\n"); | 3710 | IWL_DEBUG_INFO(priv, DRV_NAME " is coming up\n"); |
3699 | 3711 | ||
3700 | return 0; | 3712 | return 0; |
3701 | } | 3713 | } |
@@ -3796,34 +3808,36 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
3796 | /* This should never be called or scheduled if there is currently | 3808 | /* This should never be called or scheduled if there is currently |
3797 | * a scan active in the hardware. */ | 3809 | * a scan active in the hardware. */ |
3798 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { | 3810 | if (test_bit(STATUS_SCAN_HW, &priv->status)) { |
3799 | IWL_DEBUG_INFO("Multiple concurrent scan requests in parallel. " | 3811 | IWL_DEBUG_INFO(priv, "Multiple concurrent scan requests " |
3800 | "Ignoring second request.\n"); | 3812 | "Ignoring second request.\n"); |
3801 | rc = -EIO; | 3813 | rc = -EIO; |
3802 | goto done; | 3814 | goto done; |
3803 | } | 3815 | } |
3804 | 3816 | ||
3805 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { | 3817 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { |
3806 | IWL_DEBUG_SCAN("Aborting scan due to device shutdown\n"); | 3818 | IWL_DEBUG_SCAN(priv, "Aborting scan due to device shutdown\n"); |
3807 | goto done; | 3819 | goto done; |
3808 | } | 3820 | } |
3809 | 3821 | ||
3810 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { | 3822 | if (test_bit(STATUS_SCAN_ABORTING, &priv->status)) { |
3811 | IWL_DEBUG_HC("Scan request while abort pending. Queuing.\n"); | 3823 | IWL_DEBUG_HC(priv, |
3824 | "Scan request while abort pending. Queuing.\n"); | ||
3812 | goto done; | 3825 | goto done; |
3813 | } | 3826 | } |
3814 | 3827 | ||
3815 | if (iwl_is_rfkill(priv)) { | 3828 | if (iwl_is_rfkill(priv)) { |
3816 | IWL_DEBUG_HC("Aborting scan due to RF Kill activation\n"); | 3829 | IWL_DEBUG_HC(priv, "Aborting scan due to RF Kill activation\n"); |
3817 | goto done; | 3830 | goto done; |
3818 | } | 3831 | } |
3819 | 3832 | ||
3820 | if (!test_bit(STATUS_READY, &priv->status)) { | 3833 | if (!test_bit(STATUS_READY, &priv->status)) { |
3821 | IWL_DEBUG_HC("Scan request while uninitialized. Queuing.\n"); | 3834 | IWL_DEBUG_HC(priv, |
3835 | "Scan request while uninitialized. Queuing.\n"); | ||
3822 | goto done; | 3836 | goto done; |
3823 | } | 3837 | } |
3824 | 3838 | ||
3825 | if (!priv->scan_bands) { | 3839 | if (!priv->scan_bands) { |
3826 | IWL_DEBUG_HC("Aborting scan due to no requested bands\n"); | 3840 | IWL_DEBUG_HC(priv, "Aborting scan due to no requested bands\n"); |
3827 | goto done; | 3841 | goto done; |
3828 | } | 3842 | } |
3829 | 3843 | ||
@@ -3848,7 +3862,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
3848 | u32 scan_suspend_time = 100; | 3862 | u32 scan_suspend_time = 100; |
3849 | unsigned long flags; | 3863 | unsigned long flags; |
3850 | 3864 | ||
3851 | IWL_DEBUG_INFO("Scanning while associated...\n"); | 3865 | IWL_DEBUG_INFO(priv, "Scanning while associated...\n"); |
3852 | 3866 | ||
3853 | spin_lock_irqsave(&priv->lock, flags); | 3867 | spin_lock_irqsave(&priv->lock, flags); |
3854 | interval = priv->beacon_int; | 3868 | interval = priv->beacon_int; |
@@ -3870,15 +3884,14 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
3870 | (extra | ((suspend_time % interval) * 1024)); | 3884 | (extra | ((suspend_time % interval) * 1024)); |
3871 | 3885 | ||
3872 | scan->suspend_time = cpu_to_le32(scan_suspend_time); | 3886 | scan->suspend_time = cpu_to_le32(scan_suspend_time); |
3873 | IWL_DEBUG_SCAN("suspend_time 0x%X beacon interval %d\n", | 3887 | IWL_DEBUG_SCAN(priv, "suspend_time 0x%X beacon interval %d\n", |
3874 | scan_suspend_time, interval); | 3888 | scan_suspend_time, interval); |
3875 | } | 3889 | } |
3876 | 3890 | ||
3877 | /* We should add the ability for user to lock to PASSIVE ONLY */ | 3891 | /* We should add the ability for user to lock to PASSIVE ONLY */ |
3878 | if (priv->one_direct_scan) { | 3892 | if (priv->one_direct_scan) { |
3879 | IWL_DEBUG_SCAN | 3893 | IWL_DEBUG_SCAN(priv, "Kicking off one direct scan for '%s'\n", |
3880 | ("Kicking off one direct scan for '%s'\n", | 3894 | print_ssid(ssid, priv->direct_ssid, |
3881 | print_ssid(ssid, priv->direct_ssid, | ||
3882 | priv->direct_ssid_len)); | 3895 | priv->direct_ssid_len)); |
3883 | scan->direct_scan[0].id = WLAN_EID_SSID; | 3896 | scan->direct_scan[0].id = WLAN_EID_SSID; |
3884 | scan->direct_scan[0].len = priv->direct_ssid_len; | 3897 | scan->direct_scan[0].len = priv->direct_ssid_len; |
@@ -3886,7 +3899,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
3886 | priv->direct_ssid, priv->direct_ssid_len); | 3899 | priv->direct_ssid, priv->direct_ssid_len); |
3887 | n_probes++; | 3900 | n_probes++; |
3888 | } else | 3901 | } else |
3889 | IWL_DEBUG_SCAN("Kicking off one indirect scan.\n"); | 3902 | IWL_DEBUG_SCAN(priv, "Kicking off one indirect scan.\n"); |
3890 | 3903 | ||
3891 | /* We don't build a direct scan probe request; the uCode will do | 3904 | /* We don't build a direct scan probe request; the uCode will do |
3892 | * that based on the direct_mask added to each channel entry */ | 3905 | * that based on the direct_mask added to each channel entry */ |
@@ -3927,7 +3940,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data) | |||
3927 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); | 3940 | (void *)&scan->data[le16_to_cpu(scan->tx_cmd.len)]); |
3928 | 3941 | ||
3929 | if (scan->channel_count == 0) { | 3942 | if (scan->channel_count == 0) { |
3930 | IWL_DEBUG_SCAN("channel count %d\n", scan->channel_count); | 3943 | IWL_DEBUG_SCAN(priv, "channel count %d\n", scan->channel_count); |
3931 | goto done; | 3944 | goto done; |
3932 | } | 3945 | } |
3933 | 3946 | ||
@@ -4011,7 +4024,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv) | |||
4011 | } | 4024 | } |
4012 | 4025 | ||
4013 | 4026 | ||
4014 | IWL_DEBUG_ASSOC("Associated as %d to: %pM\n", | 4027 | IWL_DEBUG_ASSOC(priv, "Associated as %d to: %pM\n", |
4015 | priv->assoc_id, priv->active_rxon.bssid_addr); | 4028 | priv->assoc_id, priv->active_rxon.bssid_addr); |
4016 | 4029 | ||
4017 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 4030 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
@@ -4039,7 +4052,7 @@ static void iwl3945_post_associate(struct iwl_priv *priv) | |||
4039 | 4052 | ||
4040 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); | 4053 | priv->staging_rxon.assoc_id = cpu_to_le16(priv->assoc_id); |
4041 | 4054 | ||
4042 | IWL_DEBUG_ASSOC("assoc id %d beacon interval %d\n", | 4055 | IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", |
4043 | priv->assoc_id, priv->beacon_int); | 4056 | priv->assoc_id, priv->beacon_int); |
4044 | 4057 | ||
4045 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) | 4058 | if (priv->assoc_capability & WLAN_CAPABILITY_SHORT_PREAMBLE) |
@@ -4105,7 +4118,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw) | |||
4105 | struct iwl_priv *priv = hw->priv; | 4118 | struct iwl_priv *priv = hw->priv; |
4106 | int ret; | 4119 | int ret; |
4107 | 4120 | ||
4108 | IWL_DEBUG_MAC80211("enter\n"); | 4121 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4109 | 4122 | ||
4110 | /* we should be verifying the device is ready to be opened */ | 4123 | /* we should be verifying the device is ready to be opened */ |
4111 | mutex_lock(&priv->mutex); | 4124 | mutex_lock(&priv->mutex); |
@@ -4132,7 +4145,7 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw) | |||
4132 | if (ret) | 4145 | if (ret) |
4133 | goto out_release_irq; | 4146 | goto out_release_irq; |
4134 | 4147 | ||
4135 | IWL_DEBUG_INFO("Start UP work.\n"); | 4148 | IWL_DEBUG_INFO(priv, "Start UP work.\n"); |
4136 | 4149 | ||
4137 | if (test_bit(STATUS_IN_SUSPEND, &priv->status)) | 4150 | if (test_bit(STATUS_IN_SUSPEND, &priv->status)) |
4138 | return 0; | 4151 | return 0; |
@@ -4157,12 +4170,12 @@ static int iwl3945_mac_start(struct ieee80211_hw *hw) | |||
4157 | cancel_delayed_work(&priv->rfkill_poll); | 4170 | cancel_delayed_work(&priv->rfkill_poll); |
4158 | 4171 | ||
4159 | priv->is_open = 1; | 4172 | priv->is_open = 1; |
4160 | IWL_DEBUG_MAC80211("leave\n"); | 4173 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4161 | return 0; | 4174 | return 0; |
4162 | 4175 | ||
4163 | out_release_irq: | 4176 | out_release_irq: |
4164 | priv->is_open = 0; | 4177 | priv->is_open = 0; |
4165 | IWL_DEBUG_MAC80211("leave - failed\n"); | 4178 | IWL_DEBUG_MAC80211(priv, "leave - failed\n"); |
4166 | return ret; | 4179 | return ret; |
4167 | } | 4180 | } |
4168 | 4181 | ||
@@ -4170,10 +4183,10 @@ static void iwl3945_mac_stop(struct ieee80211_hw *hw) | |||
4170 | { | 4183 | { |
4171 | struct iwl_priv *priv = hw->priv; | 4184 | struct iwl_priv *priv = hw->priv; |
4172 | 4185 | ||
4173 | IWL_DEBUG_MAC80211("enter\n"); | 4186 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4174 | 4187 | ||
4175 | if (!priv->is_open) { | 4188 | if (!priv->is_open) { |
4176 | IWL_DEBUG_MAC80211("leave - skip\n"); | 4189 | IWL_DEBUG_MAC80211(priv, "leave - skip\n"); |
4177 | return; | 4190 | return; |
4178 | } | 4191 | } |
4179 | 4192 | ||
@@ -4196,22 +4209,22 @@ static void iwl3945_mac_stop(struct ieee80211_hw *hw) | |||
4196 | queue_delayed_work(priv->workqueue, &priv->rfkill_poll, | 4209 | queue_delayed_work(priv->workqueue, &priv->rfkill_poll, |
4197 | round_jiffies_relative(2 * HZ)); | 4210 | round_jiffies_relative(2 * HZ)); |
4198 | 4211 | ||
4199 | IWL_DEBUG_MAC80211("leave\n"); | 4212 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4200 | } | 4213 | } |
4201 | 4214 | ||
4202 | static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | 4215 | static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) |
4203 | { | 4216 | { |
4204 | struct iwl_priv *priv = hw->priv; | 4217 | struct iwl_priv *priv = hw->priv; |
4205 | 4218 | ||
4206 | IWL_DEBUG_MAC80211("enter\n"); | 4219 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4207 | 4220 | ||
4208 | IWL_DEBUG_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, | 4221 | IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len, |
4209 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); | 4222 | ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate); |
4210 | 4223 | ||
4211 | if (iwl3945_tx_skb(priv, skb)) | 4224 | if (iwl3945_tx_skb(priv, skb)) |
4212 | dev_kfree_skb_any(skb); | 4225 | dev_kfree_skb_any(skb); |
4213 | 4226 | ||
4214 | IWL_DEBUG_MAC80211("leave\n"); | 4227 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4215 | return NETDEV_TX_OK; | 4228 | return NETDEV_TX_OK; |
4216 | } | 4229 | } |
4217 | 4230 | ||
@@ -4221,10 +4234,10 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
4221 | struct iwl_priv *priv = hw->priv; | 4234 | struct iwl_priv *priv = hw->priv; |
4222 | unsigned long flags; | 4235 | unsigned long flags; |
4223 | 4236 | ||
4224 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); | 4237 | IWL_DEBUG_MAC80211(priv, "enter: type %d\n", conf->type); |
4225 | 4238 | ||
4226 | if (priv->vif) { | 4239 | if (priv->vif) { |
4227 | IWL_DEBUG_MAC80211("leave - vif != NULL\n"); | 4240 | IWL_DEBUG_MAC80211(priv, "leave - vif != NULL\n"); |
4228 | return -EOPNOTSUPP; | 4241 | return -EOPNOTSUPP; |
4229 | } | 4242 | } |
4230 | 4243 | ||
@@ -4237,7 +4250,7 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
4237 | mutex_lock(&priv->mutex); | 4250 | mutex_lock(&priv->mutex); |
4238 | 4251 | ||
4239 | if (conf->mac_addr) { | 4252 | if (conf->mac_addr) { |
4240 | IWL_DEBUG_MAC80211("Set: %pM\n", conf->mac_addr); | 4253 | IWL_DEBUG_MAC80211(priv, "Set: %pM\n", conf->mac_addr); |
4241 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | 4254 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); |
4242 | } | 4255 | } |
4243 | 4256 | ||
@@ -4246,7 +4259,7 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
4246 | 4259 | ||
4247 | mutex_unlock(&priv->mutex); | 4260 | mutex_unlock(&priv->mutex); |
4248 | 4261 | ||
4249 | IWL_DEBUG_MAC80211("leave\n"); | 4262 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4250 | return 0; | 4263 | return 0; |
4251 | } | 4264 | } |
4252 | 4265 | ||
@@ -4266,17 +4279,18 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
4266 | int ret = 0; | 4279 | int ret = 0; |
4267 | 4280 | ||
4268 | mutex_lock(&priv->mutex); | 4281 | mutex_lock(&priv->mutex); |
4269 | IWL_DEBUG_MAC80211("enter to channel %d\n", conf->channel->hw_value); | 4282 | IWL_DEBUG_MAC80211(priv, "enter to channel %d\n", |
4283 | conf->channel->hw_value); | ||
4270 | 4284 | ||
4271 | if (!iwl_is_ready(priv)) { | 4285 | if (!iwl_is_ready(priv)) { |
4272 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 4286 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); |
4273 | ret = -EIO; | 4287 | ret = -EIO; |
4274 | goto out; | 4288 | goto out; |
4275 | } | 4289 | } |
4276 | 4290 | ||
4277 | if (unlikely(!iwl3945_mod_params.disable_hw_scan && | 4291 | if (unlikely(!iwl3945_mod_params.disable_hw_scan && |
4278 | test_bit(STATUS_SCANNING, &priv->status))) { | 4292 | test_bit(STATUS_SCANNING, &priv->status))) { |
4279 | IWL_DEBUG_MAC80211("leave - scanning\n"); | 4293 | IWL_DEBUG_MAC80211(priv, "leave - scanning\n"); |
4280 | set_bit(STATUS_CONF_PENDING, &priv->status); | 4294 | set_bit(STATUS_CONF_PENDING, &priv->status); |
4281 | mutex_unlock(&priv->mutex); | 4295 | mutex_unlock(&priv->mutex); |
4282 | return 0; | 4296 | return 0; |
@@ -4287,9 +4301,10 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
4287 | ch_info = iwl_get_channel_info(priv, conf->channel->band, | 4301 | ch_info = iwl_get_channel_info(priv, conf->channel->band, |
4288 | conf->channel->hw_value); | 4302 | conf->channel->hw_value); |
4289 | if (!is_channel_valid(ch_info)) { | 4303 | if (!is_channel_valid(ch_info)) { |
4290 | IWL_DEBUG_SCAN("Channel %d [%d] is INVALID for this band.\n", | 4304 | IWL_DEBUG_SCAN(priv, |
4291 | conf->channel->hw_value, conf->channel->band); | 4305 | "Channel %d [%d] is INVALID for this band.\n", |
4292 | IWL_DEBUG_MAC80211("leave - invalid channel\n"); | 4306 | conf->channel->hw_value, conf->channel->band); |
4307 | IWL_DEBUG_MAC80211(priv, "leave - invalid channel\n"); | ||
4293 | spin_unlock_irqrestore(&priv->lock, flags); | 4308 | spin_unlock_irqrestore(&priv->lock, flags); |
4294 | ret = -EINVAL; | 4309 | ret = -EINVAL; |
4295 | goto out; | 4310 | goto out; |
@@ -4316,12 +4331,12 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
4316 | iwl3945_radio_kill_sw(priv, !conf->radio_enabled); | 4331 | iwl3945_radio_kill_sw(priv, !conf->radio_enabled); |
4317 | 4332 | ||
4318 | if (!conf->radio_enabled) { | 4333 | if (!conf->radio_enabled) { |
4319 | IWL_DEBUG_MAC80211("leave - radio disabled\n"); | 4334 | IWL_DEBUG_MAC80211(priv, "leave - radio disabled\n"); |
4320 | goto out; | 4335 | goto out; |
4321 | } | 4336 | } |
4322 | 4337 | ||
4323 | if (iwl_is_rfkill(priv)) { | 4338 | if (iwl_is_rfkill(priv)) { |
4324 | IWL_DEBUG_MAC80211("leave - RF kill\n"); | 4339 | IWL_DEBUG_MAC80211(priv, "leave - RF kill\n"); |
4325 | ret = -EIO; | 4340 | ret = -EIO; |
4326 | goto out; | 4341 | goto out; |
4327 | } | 4342 | } |
@@ -4332,9 +4347,9 @@ static int iwl3945_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
4332 | &priv->staging_rxon, sizeof(priv->staging_rxon))) | 4347 | &priv->staging_rxon, sizeof(priv->staging_rxon))) |
4333 | iwl3945_commit_rxon(priv); | 4348 | iwl3945_commit_rxon(priv); |
4334 | else | 4349 | else |
4335 | IWL_DEBUG_INFO("No re-sending same RXON configuration.\n"); | 4350 | IWL_DEBUG_INFO(priv, "Not re-sending same RXON configuration\n"); |
4336 | 4351 | ||
4337 | IWL_DEBUG_MAC80211("leave\n"); | 4352 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4338 | 4353 | ||
4339 | out: | 4354 | out: |
4340 | clear_bit(STATUS_CONF_PENDING, &priv->status); | 4355 | clear_bit(STATUS_CONF_PENDING, &priv->status); |
@@ -4411,7 +4426,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
4411 | return -EIO; | 4426 | return -EIO; |
4412 | 4427 | ||
4413 | if (priv->vif != vif) { | 4428 | if (priv->vif != vif) { |
4414 | IWL_DEBUG_MAC80211("leave - priv->vif != vif\n"); | 4429 | IWL_DEBUG_MAC80211(priv, "leave - priv->vif != vif\n"); |
4415 | return 0; | 4430 | return 0; |
4416 | } | 4431 | } |
4417 | 4432 | ||
@@ -4434,7 +4449,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
4434 | mutex_lock(&priv->mutex); | 4449 | mutex_lock(&priv->mutex); |
4435 | 4450 | ||
4436 | if (conf->bssid) | 4451 | if (conf->bssid) |
4437 | IWL_DEBUG_MAC80211("bssid: %pM\n", conf->bssid); | 4452 | IWL_DEBUG_MAC80211(priv, "bssid: %pM\n", conf->bssid); |
4438 | 4453 | ||
4439 | /* | 4454 | /* |
4440 | * very dubious code was here; the probe filtering flag is never set: | 4455 | * very dubious code was here; the probe filtering flag is never set: |
@@ -4447,7 +4462,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
4447 | if (!conf->bssid) { | 4462 | if (!conf->bssid) { |
4448 | conf->bssid = priv->mac_addr; | 4463 | conf->bssid = priv->mac_addr; |
4449 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); | 4464 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); |
4450 | IWL_DEBUG_MAC80211("bssid was set to: %pM\n", | 4465 | IWL_DEBUG_MAC80211(priv, "bssid was set to: %pM\n", |
4451 | conf->bssid); | 4466 | conf->bssid); |
4452 | } | 4467 | } |
4453 | if (priv->ibss_beacon) | 4468 | if (priv->ibss_beacon) |
@@ -4466,7 +4481,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
4466 | if (iwl_scan_cancel_timeout(priv, 100)) { | 4481 | if (iwl_scan_cancel_timeout(priv, 100)) { |
4467 | IWL_WARN(priv, "Aborted scan still in progress " | 4482 | IWL_WARN(priv, "Aborted scan still in progress " |
4468 | "after 100ms\n"); | 4483 | "after 100ms\n"); |
4469 | IWL_DEBUG_MAC80211("leaving - scan abort failed.\n"); | 4484 | IWL_DEBUG_MAC80211(priv, "leaving:scan abort failed\n"); |
4470 | mutex_unlock(&priv->mutex); | 4485 | mutex_unlock(&priv->mutex); |
4471 | return -EAGAIN; | 4486 | return -EAGAIN; |
4472 | } | 4487 | } |
@@ -4494,7 +4509,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
4494 | } | 4509 | } |
4495 | 4510 | ||
4496 | done: | 4511 | done: |
4497 | IWL_DEBUG_MAC80211("leave\n"); | 4512 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4498 | mutex_unlock(&priv->mutex); | 4513 | mutex_unlock(&priv->mutex); |
4499 | 4514 | ||
4500 | return 0; | 4515 | return 0; |
@@ -4505,7 +4520,7 @@ static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw, | |||
4505 | { | 4520 | { |
4506 | struct iwl_priv *priv = hw->priv; | 4521 | struct iwl_priv *priv = hw->priv; |
4507 | 4522 | ||
4508 | IWL_DEBUG_MAC80211("enter\n"); | 4523 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4509 | 4524 | ||
4510 | mutex_lock(&priv->mutex); | 4525 | mutex_lock(&priv->mutex); |
4511 | 4526 | ||
@@ -4520,7 +4535,7 @@ static void iwl3945_mac_remove_interface(struct ieee80211_hw *hw, | |||
4520 | } | 4535 | } |
4521 | mutex_unlock(&priv->mutex); | 4536 | mutex_unlock(&priv->mutex); |
4522 | 4537 | ||
4523 | IWL_DEBUG_MAC80211("leave\n"); | 4538 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4524 | } | 4539 | } |
4525 | 4540 | ||
4526 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) | 4541 | #define IWL_DELAY_NEXT_SCAN_AFTER_ASSOC (HZ*6) |
@@ -4532,10 +4547,10 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw, | |||
4532 | { | 4547 | { |
4533 | struct iwl_priv *priv = hw->priv; | 4548 | struct iwl_priv *priv = hw->priv; |
4534 | 4549 | ||
4535 | IWL_DEBUG_MAC80211("changes = 0x%X\n", changes); | 4550 | IWL_DEBUG_MAC80211(priv, "changes = 0x%X\n", changes); |
4536 | 4551 | ||
4537 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { | 4552 | if (changes & BSS_CHANGED_ERP_PREAMBLE) { |
4538 | IWL_DEBUG_MAC80211("ERP_PREAMBLE %d\n", | 4553 | IWL_DEBUG_MAC80211(priv, "ERP_PREAMBLE %d\n", |
4539 | bss_conf->use_short_preamble); | 4554 | bss_conf->use_short_preamble); |
4540 | if (bss_conf->use_short_preamble) | 4555 | if (bss_conf->use_short_preamble) |
4541 | priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; | 4556 | priv->staging_rxon.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; |
@@ -4545,7 +4560,8 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw, | |||
4545 | } | 4560 | } |
4546 | 4561 | ||
4547 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { | 4562 | if (changes & BSS_CHANGED_ERP_CTS_PROT) { |
4548 | IWL_DEBUG_MAC80211("ERP_CTS %d\n", bss_conf->use_cts_prot); | 4563 | IWL_DEBUG_MAC80211(priv, "ERP_CTS %d\n", |
4564 | bss_conf->use_cts_prot); | ||
4549 | if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) | 4565 | if (bss_conf->use_cts_prot && (priv->band != IEEE80211_BAND_5GHZ)) |
4550 | priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; | 4566 | priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK; |
4551 | else | 4567 | else |
@@ -4553,7 +4569,7 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw, | |||
4553 | } | 4569 | } |
4554 | 4570 | ||
4555 | if (changes & BSS_CHANGED_ASSOC) { | 4571 | if (changes & BSS_CHANGED_ASSOC) { |
4556 | IWL_DEBUG_MAC80211("ASSOC %d\n", bss_conf->assoc); | 4572 | IWL_DEBUG_MAC80211(priv, "ASSOC %d\n", bss_conf->assoc); |
4557 | /* This should never happen as this function should | 4573 | /* This should never happen as this function should |
4558 | * never be called from interrupt context. */ | 4574 | * never be called from interrupt context. */ |
4559 | if (WARN_ON_ONCE(in_interrupt())) | 4575 | if (WARN_ON_ONCE(in_interrupt())) |
@@ -4571,10 +4587,12 @@ static void iwl3945_bss_info_changed(struct ieee80211_hw *hw, | |||
4571 | mutex_unlock(&priv->mutex); | 4587 | mutex_unlock(&priv->mutex); |
4572 | } else { | 4588 | } else { |
4573 | priv->assoc_id = 0; | 4589 | priv->assoc_id = 0; |
4574 | IWL_DEBUG_MAC80211("DISASSOC %d\n", bss_conf->assoc); | 4590 | IWL_DEBUG_MAC80211(priv, |
4591 | "DISASSOC %d\n", bss_conf->assoc); | ||
4575 | } | 4592 | } |
4576 | } else if (changes && iwl_is_associated(priv) && priv->assoc_id) { | 4593 | } else if (changes && iwl_is_associated(priv) && priv->assoc_id) { |
4577 | IWL_DEBUG_MAC80211("Associated Changes %d\n", changes); | 4594 | IWL_DEBUG_MAC80211(priv, |
4595 | "Associated Changes %d\n", changes); | ||
4578 | iwl3945_send_rxon_assoc(priv); | 4596 | iwl3945_send_rxon_assoc(priv); |
4579 | } | 4597 | } |
4580 | 4598 | ||
@@ -4587,14 +4605,14 @@ static int iwl3945_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
4587 | struct iwl_priv *priv = hw->priv; | 4605 | struct iwl_priv *priv = hw->priv; |
4588 | DECLARE_SSID_BUF(ssid_buf); | 4606 | DECLARE_SSID_BUF(ssid_buf); |
4589 | 4607 | ||
4590 | IWL_DEBUG_MAC80211("enter\n"); | 4608 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4591 | 4609 | ||
4592 | mutex_lock(&priv->mutex); | 4610 | mutex_lock(&priv->mutex); |
4593 | spin_lock_irqsave(&priv->lock, flags); | 4611 | spin_lock_irqsave(&priv->lock, flags); |
4594 | 4612 | ||
4595 | if (!iwl_is_ready_rf(priv)) { | 4613 | if (!iwl_is_ready_rf(priv)) { |
4596 | rc = -EIO; | 4614 | rc = -EIO; |
4597 | IWL_DEBUG_MAC80211("leave - not ready or exit pending\n"); | 4615 | IWL_DEBUG_MAC80211(priv, "leave - not ready or exit pending\n"); |
4598 | goto out_unlock; | 4616 | goto out_unlock; |
4599 | } | 4617 | } |
4600 | 4618 | ||
@@ -4612,8 +4630,8 @@ static int iwl3945_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
4612 | goto out_unlock; | 4630 | goto out_unlock; |
4613 | } | 4631 | } |
4614 | if (len) { | 4632 | if (len) { |
4615 | IWL_DEBUG_SCAN("direct scan for %s [%d]\n ", | 4633 | IWL_DEBUG_SCAN(priv, "direct scan for %s [%zd]\n ", |
4616 | print_ssid(ssid_buf, ssid, len), (int)len); | 4634 | print_ssid(ssid_buf, ssid, len), len); |
4617 | 4635 | ||
4618 | priv->one_direct_scan = 1; | 4636 | priv->one_direct_scan = 1; |
4619 | priv->direct_ssid_len = (u8) | 4637 | priv->direct_ssid_len = (u8) |
@@ -4624,7 +4642,7 @@ static int iwl3945_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len) | |||
4624 | 4642 | ||
4625 | rc = iwl3945_scan_initiate(priv); | 4643 | rc = iwl3945_scan_initiate(priv); |
4626 | 4644 | ||
4627 | IWL_DEBUG_MAC80211("leave\n"); | 4645 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4628 | 4646 | ||
4629 | out_unlock: | 4647 | out_unlock: |
4630 | spin_unlock_irqrestore(&priv->lock, flags); | 4648 | spin_unlock_irqrestore(&priv->lock, flags); |
@@ -4643,17 +4661,17 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
4643 | int ret; | 4661 | int ret; |
4644 | u8 sta_id; | 4662 | u8 sta_id; |
4645 | 4663 | ||
4646 | IWL_DEBUG_MAC80211("enter\n"); | 4664 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4647 | 4665 | ||
4648 | if (iwl3945_mod_params.sw_crypto) { | 4666 | if (iwl3945_mod_params.sw_crypto) { |
4649 | IWL_DEBUG_MAC80211("leave - hwcrypto disabled\n"); | 4667 | IWL_DEBUG_MAC80211(priv, "leave - hwcrypto disabled\n"); |
4650 | return -EOPNOTSUPP; | 4668 | return -EOPNOTSUPP; |
4651 | } | 4669 | } |
4652 | 4670 | ||
4653 | addr = sta ? sta->addr : iwl_bcast_addr; | 4671 | addr = sta ? sta->addr : iwl_bcast_addr; |
4654 | sta_id = iwl3945_hw_find_station(priv, addr); | 4672 | sta_id = iwl3945_hw_find_station(priv, addr); |
4655 | if (sta_id == IWL_INVALID_STATION) { | 4673 | if (sta_id == IWL_INVALID_STATION) { |
4656 | IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", | 4674 | IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n", |
4657 | addr); | 4675 | addr); |
4658 | return -EINVAL; | 4676 | return -EINVAL; |
4659 | } | 4677 | } |
@@ -4669,7 +4687,8 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
4669 | iwl_set_rxon_hwcrypto(priv, 1); | 4687 | iwl_set_rxon_hwcrypto(priv, 1); |
4670 | iwl3945_commit_rxon(priv); | 4688 | iwl3945_commit_rxon(priv); |
4671 | key->hw_key_idx = sta_id; | 4689 | key->hw_key_idx = sta_id; |
4672 | IWL_DEBUG_MAC80211("set_key success, using hwcrypto\n"); | 4690 | IWL_DEBUG_MAC80211(priv, |
4691 | "set_key success, using hwcrypto\n"); | ||
4673 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; | 4692 | key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV; |
4674 | } | 4693 | } |
4675 | break; | 4694 | break; |
@@ -4678,14 +4697,14 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
4678 | if (!ret) { | 4697 | if (!ret) { |
4679 | iwl_set_rxon_hwcrypto(priv, 0); | 4698 | iwl_set_rxon_hwcrypto(priv, 0); |
4680 | iwl3945_commit_rxon(priv); | 4699 | iwl3945_commit_rxon(priv); |
4681 | IWL_DEBUG_MAC80211("disable hwcrypto key\n"); | 4700 | IWL_DEBUG_MAC80211(priv, "disable hwcrypto key\n"); |
4682 | } | 4701 | } |
4683 | break; | 4702 | break; |
4684 | default: | 4703 | default: |
4685 | ret = -EINVAL; | 4704 | ret = -EINVAL; |
4686 | } | 4705 | } |
4687 | 4706 | ||
4688 | IWL_DEBUG_MAC80211("leave\n"); | 4707 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4689 | mutex_unlock(&priv->mutex); | 4708 | mutex_unlock(&priv->mutex); |
4690 | 4709 | ||
4691 | return ret; | 4710 | return ret; |
@@ -4698,15 +4717,15 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
4698 | unsigned long flags; | 4717 | unsigned long flags; |
4699 | int q; | 4718 | int q; |
4700 | 4719 | ||
4701 | IWL_DEBUG_MAC80211("enter\n"); | 4720 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4702 | 4721 | ||
4703 | if (!iwl_is_ready_rf(priv)) { | 4722 | if (!iwl_is_ready_rf(priv)) { |
4704 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 4723 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
4705 | return -EIO; | 4724 | return -EIO; |
4706 | } | 4725 | } |
4707 | 4726 | ||
4708 | if (queue >= AC_NUM) { | 4727 | if (queue >= AC_NUM) { |
4709 | IWL_DEBUG_MAC80211("leave - queue >= AC_NUM %d\n", queue); | 4728 | IWL_DEBUG_MAC80211(priv, "leave - queue >= AC_NUM %d\n", queue); |
4710 | return 0; | 4729 | return 0; |
4711 | } | 4730 | } |
4712 | 4731 | ||
@@ -4733,7 +4752,7 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, | |||
4733 | 4752 | ||
4734 | mutex_unlock(&priv->mutex); | 4753 | mutex_unlock(&priv->mutex); |
4735 | 4754 | ||
4736 | IWL_DEBUG_MAC80211("leave\n"); | 4755 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4737 | return 0; | 4756 | return 0; |
4738 | } | 4757 | } |
4739 | 4758 | ||
@@ -4746,10 +4765,10 @@ static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
4746 | struct iwl_queue *q; | 4765 | struct iwl_queue *q; |
4747 | unsigned long flags; | 4766 | unsigned long flags; |
4748 | 4767 | ||
4749 | IWL_DEBUG_MAC80211("enter\n"); | 4768 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4750 | 4769 | ||
4751 | if (!iwl_is_ready_rf(priv)) { | 4770 | if (!iwl_is_ready_rf(priv)) { |
4752 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 4771 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
4753 | return -EIO; | 4772 | return -EIO; |
4754 | } | 4773 | } |
4755 | 4774 | ||
@@ -4767,7 +4786,7 @@ static int iwl3945_mac_get_tx_stats(struct ieee80211_hw *hw, | |||
4767 | } | 4786 | } |
4768 | spin_unlock_irqrestore(&priv->lock, flags); | 4787 | spin_unlock_irqrestore(&priv->lock, flags); |
4769 | 4788 | ||
4770 | IWL_DEBUG_MAC80211("leave\n"); | 4789 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4771 | 4790 | ||
4772 | return 0; | 4791 | return 0; |
4773 | } | 4792 | } |
@@ -4778,7 +4797,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
4778 | unsigned long flags; | 4797 | unsigned long flags; |
4779 | 4798 | ||
4780 | mutex_lock(&priv->mutex); | 4799 | mutex_lock(&priv->mutex); |
4781 | IWL_DEBUG_MAC80211("enter\n"); | 4800 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4782 | 4801 | ||
4783 | iwl_reset_qos(priv); | 4802 | iwl_reset_qos(priv); |
4784 | 4803 | ||
@@ -4800,7 +4819,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
4800 | spin_unlock_irqrestore(&priv->lock, flags); | 4819 | spin_unlock_irqrestore(&priv->lock, flags); |
4801 | 4820 | ||
4802 | if (!iwl_is_ready_rf(priv)) { | 4821 | if (!iwl_is_ready_rf(priv)) { |
4803 | IWL_DEBUG_MAC80211("leave - not ready\n"); | 4822 | IWL_DEBUG_MAC80211(priv, "leave - not ready\n"); |
4804 | mutex_unlock(&priv->mutex); | 4823 | mutex_unlock(&priv->mutex); |
4805 | return; | 4824 | return; |
4806 | } | 4825 | } |
@@ -4817,7 +4836,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
4817 | /* Per mac80211.h: This is only used in IBSS mode... */ | 4836 | /* Per mac80211.h: This is only used in IBSS mode... */ |
4818 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { | 4837 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { |
4819 | 4838 | ||
4820 | IWL_DEBUG_MAC80211("leave - not in IBSS\n"); | 4839 | IWL_DEBUG_MAC80211(priv, "leave - not in IBSS\n"); |
4821 | mutex_unlock(&priv->mutex); | 4840 | mutex_unlock(&priv->mutex); |
4822 | return; | 4841 | return; |
4823 | } | 4842 | } |
@@ -4826,7 +4845,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw) | |||
4826 | 4845 | ||
4827 | mutex_unlock(&priv->mutex); | 4846 | mutex_unlock(&priv->mutex); |
4828 | 4847 | ||
4829 | IWL_DEBUG_MAC80211("leave\n"); | 4848 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4830 | 4849 | ||
4831 | } | 4850 | } |
4832 | 4851 | ||
@@ -4835,15 +4854,15 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
4835 | struct iwl_priv *priv = hw->priv; | 4854 | struct iwl_priv *priv = hw->priv; |
4836 | unsigned long flags; | 4855 | unsigned long flags; |
4837 | 4856 | ||
4838 | IWL_DEBUG_MAC80211("enter\n"); | 4857 | IWL_DEBUG_MAC80211(priv, "enter\n"); |
4839 | 4858 | ||
4840 | if (!iwl_is_ready_rf(priv)) { | 4859 | if (!iwl_is_ready_rf(priv)) { |
4841 | IWL_DEBUG_MAC80211("leave - RF not ready\n"); | 4860 | IWL_DEBUG_MAC80211(priv, "leave - RF not ready\n"); |
4842 | return -EIO; | 4861 | return -EIO; |
4843 | } | 4862 | } |
4844 | 4863 | ||
4845 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { | 4864 | if (priv->iw_mode != NL80211_IFTYPE_ADHOC) { |
4846 | IWL_DEBUG_MAC80211("leave - not IBSS\n"); | 4865 | IWL_DEBUG_MAC80211(priv, "leave - not IBSS\n"); |
4847 | return -EIO; | 4866 | return -EIO; |
4848 | } | 4867 | } |
4849 | 4868 | ||
@@ -4856,7 +4875,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
4856 | 4875 | ||
4857 | priv->assoc_id = 0; | 4876 | priv->assoc_id = 0; |
4858 | 4877 | ||
4859 | IWL_DEBUG_MAC80211("leave\n"); | 4878 | IWL_DEBUG_MAC80211(priv, "leave\n"); |
4860 | spin_unlock_irqrestore(&priv->lock, flags); | 4879 | spin_unlock_irqrestore(&priv->lock, flags); |
4861 | 4880 | ||
4862 | iwl_reset_qos(priv); | 4881 | iwl_reset_qos(priv); |
@@ -4971,7 +4990,7 @@ static ssize_t store_flags(struct device *d, | |||
4971 | if (iwl_scan_cancel_timeout(priv, 100)) | 4990 | if (iwl_scan_cancel_timeout(priv, 100)) |
4972 | IWL_WARN(priv, "Could not cancel scan.\n"); | 4991 | IWL_WARN(priv, "Could not cancel scan.\n"); |
4973 | else { | 4992 | else { |
4974 | IWL_DEBUG_INFO("Committing rxon.flags = 0x%04X\n", | 4993 | IWL_DEBUG_INFO(priv, "Committing rxon.flags = 0x%04X\n", |
4975 | flags); | 4994 | flags); |
4976 | priv->staging_rxon.flags = cpu_to_le32(flags); | 4995 | priv->staging_rxon.flags = cpu_to_le32(flags); |
4977 | iwl3945_commit_rxon(priv); | 4996 | iwl3945_commit_rxon(priv); |
@@ -5006,7 +5025,7 @@ static ssize_t store_filter_flags(struct device *d, | |||
5006 | if (iwl_scan_cancel_timeout(priv, 100)) | 5025 | if (iwl_scan_cancel_timeout(priv, 100)) |
5007 | IWL_WARN(priv, "Could not cancel scan.\n"); | 5026 | IWL_WARN(priv, "Could not cancel scan.\n"); |
5008 | else { | 5027 | else { |
5009 | IWL_DEBUG_INFO("Committing rxon.filter_flags = " | 5028 | IWL_DEBUG_INFO(priv, "Committing rxon.filter_flags = " |
5010 | "0x%04X\n", filter_flags); | 5029 | "0x%04X\n", filter_flags); |
5011 | priv->staging_rxon.filter_flags = | 5030 | priv->staging_rxon.filter_flags = |
5012 | cpu_to_le32(filter_flags); | 5031 | cpu_to_le32(filter_flags); |
@@ -5083,7 +5102,7 @@ static ssize_t store_measurement(struct device *d, | |||
5083 | type = simple_strtoul(p + 1, NULL, 0); | 5102 | type = simple_strtoul(p + 1, NULL, 0); |
5084 | } | 5103 | } |
5085 | 5104 | ||
5086 | IWL_DEBUG_INFO("Invoking measurement of type %d on " | 5105 | IWL_DEBUG_INFO(priv, "Invoking measurement of type %d on " |
5087 | "channel %d (for '%s')\n", type, params.channel, buf); | 5106 | "channel %d (for '%s')\n", type, params.channel, buf); |
5088 | iwl3945_get_measurement(priv, ¶ms, type); | 5107 | iwl3945_get_measurement(priv, ¶ms, type); |
5089 | 5108 | ||
@@ -5142,7 +5161,7 @@ static ssize_t store_power_level(struct device *d, | |||
5142 | if (mode != priv->power_mode) { | 5161 | if (mode != priv->power_mode) { |
5143 | rc = iwl3945_send_power_mode(priv, IWL_POWER_LEVEL(mode)); | 5162 | rc = iwl3945_send_power_mode(priv, IWL_POWER_LEVEL(mode)); |
5144 | if (rc) { | 5163 | if (rc) { |
5145 | IWL_DEBUG_MAC80211("failed setting power mode.\n"); | 5164 | IWL_DEBUG_MAC80211(priv, "failed setting power mode\n"); |
5146 | goto out; | 5165 | goto out; |
5147 | } | 5166 | } |
5148 | priv->power_mode = mode; | 5167 | priv->power_mode = mode; |
@@ -5277,15 +5296,15 @@ static ssize_t store_antenna(struct device *d, | |||
5277 | return 0; | 5296 | return 0; |
5278 | 5297 | ||
5279 | if (sscanf(buf, "%1i", &ant) != 1) { | 5298 | if (sscanf(buf, "%1i", &ant) != 1) { |
5280 | IWL_DEBUG_INFO("not in hex or decimal form.\n"); | 5299 | IWL_DEBUG_INFO(priv, "not in hex or decimal form.\n"); |
5281 | return count; | 5300 | return count; |
5282 | } | 5301 | } |
5283 | 5302 | ||
5284 | if ((ant >= 0) && (ant <= 2)) { | 5303 | if ((ant >= 0) && (ant <= 2)) { |
5285 | IWL_DEBUG_INFO("Setting antenna select to %d.\n", ant); | 5304 | IWL_DEBUG_INFO(priv, "Setting antenna select to %d.\n", ant); |
5286 | iwl3945_mod_params.antenna = (enum iwl3945_antenna)ant; | 5305 | iwl3945_mod_params.antenna = (enum iwl3945_antenna)ant; |
5287 | } else | 5306 | } else |
5288 | IWL_DEBUG_INFO("Bad antenna select value %d.\n", ant); | 5307 | IWL_DEBUG_INFO(priv, "Bad antenna select value %d.\n", ant); |
5289 | 5308 | ||
5290 | 5309 | ||
5291 | return count; | 5310 | return count; |
@@ -5532,12 +5551,12 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5532 | * "the hard way", rather than using device's scan. | 5551 | * "the hard way", rather than using device's scan. |
5533 | */ | 5552 | */ |
5534 | if (iwl3945_mod_params.disable_hw_scan) { | 5553 | if (iwl3945_mod_params.disable_hw_scan) { |
5535 | IWL_DEBUG_INFO("Disabling hw_scan\n"); | 5554 | IWL_DEBUG_INFO(priv, "Disabling hw_scan\n"); |
5536 | iwl3945_hw_ops.hw_scan = NULL; | 5555 | iwl3945_hw_ops.hw_scan = NULL; |
5537 | } | 5556 | } |
5538 | 5557 | ||
5539 | 5558 | ||
5540 | IWL_DEBUG_INFO("*** LOAD DRIVER ***\n"); | 5559 | IWL_DEBUG_INFO(priv, "*** LOAD DRIVER ***\n"); |
5541 | priv->cfg = cfg; | 5560 | priv->cfg = cfg; |
5542 | priv->pci_dev = pdev; | 5561 | priv->pci_dev = pdev; |
5543 | 5562 | ||
@@ -5593,9 +5612,9 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5593 | goto out_pci_release_regions; | 5612 | goto out_pci_release_regions; |
5594 | } | 5613 | } |
5595 | 5614 | ||
5596 | IWL_DEBUG_INFO("pci_resource_len = 0x%08llx\n", | 5615 | IWL_DEBUG_INFO(priv, "pci_resource_len = 0x%08llx\n", |
5597 | (unsigned long long) pci_resource_len(pdev, 0)); | 5616 | (unsigned long long) pci_resource_len(pdev, 0)); |
5598 | IWL_DEBUG_INFO("pci_resource_base = %p\n", priv->hw_base); | 5617 | IWL_DEBUG_INFO(priv, "pci_resource_base = %p\n", priv->hw_base); |
5599 | 5618 | ||
5600 | /* We disable the RETRY_TIMEOUT register (0x41) to keep | 5619 | /* We disable the RETRY_TIMEOUT register (0x41) to keep |
5601 | * PCI Tx retries from interfering with C3 CPU state */ | 5620 | * PCI Tx retries from interfering with C3 CPU state */ |
@@ -5604,7 +5623,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5604 | /* amp init */ | 5623 | /* amp init */ |
5605 | err = priv->cfg->ops->lib->apm_ops.init(priv); | 5624 | err = priv->cfg->ops->lib->apm_ops.init(priv); |
5606 | if (err < 0) { | 5625 | if (err < 0) { |
5607 | IWL_DEBUG_INFO("Failed to init APMG\n"); | 5626 | IWL_DEBUG_INFO(priv, "Failed to init APMG\n"); |
5608 | goto out_iounmap; | 5627 | goto out_iounmap; |
5609 | } | 5628 | } |
5610 | 5629 | ||
@@ -5621,7 +5640,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5621 | /* MAC Address location in EEPROM same for 3945/4965 */ | 5640 | /* MAC Address location in EEPROM same for 3945/4965 */ |
5622 | eeprom = (struct iwl3945_eeprom *)priv->eeprom; | 5641 | eeprom = (struct iwl3945_eeprom *)priv->eeprom; |
5623 | memcpy(priv->mac_addr, eeprom->mac_address, ETH_ALEN); | 5642 | memcpy(priv->mac_addr, eeprom->mac_address, ETH_ALEN); |
5624 | IWL_DEBUG_INFO("MAC address: %pM\n", priv->mac_addr); | 5643 | IWL_DEBUG_INFO(priv, "MAC address: %pM\n", priv->mac_addr); |
5625 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); | 5644 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); |
5626 | 5645 | ||
5627 | /*********************** | 5646 | /*********************** |
@@ -5654,7 +5673,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
5654 | /* Disable radio (SW RF KILL) via parameter when loading driver */ | 5673 | /* Disable radio (SW RF KILL) via parameter when loading driver */ |
5655 | if (iwl3945_mod_params.disable) { | 5674 | if (iwl3945_mod_params.disable) { |
5656 | set_bit(STATUS_RF_KILL_SW, &priv->status); | 5675 | set_bit(STATUS_RF_KILL_SW, &priv->status); |
5657 | IWL_DEBUG_INFO("Radio disabled.\n"); | 5676 | IWL_DEBUG_INFO(priv, "Radio disabled.\n"); |
5658 | } | 5677 | } |
5659 | 5678 | ||
5660 | 5679 | ||
@@ -5743,7 +5762,7 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev) | |||
5743 | if (!priv) | 5762 | if (!priv) |
5744 | return; | 5763 | return; |
5745 | 5764 | ||
5746 | IWL_DEBUG_INFO("*** UNLOAD DRIVER ***\n"); | 5765 | IWL_DEBUG_INFO(priv, "*** UNLOAD DRIVER ***\n"); |
5747 | 5766 | ||
5748 | set_bit(STATUS_EXIT_PENDING, &priv->status); | 5767 | set_bit(STATUS_EXIT_PENDING, &priv->status); |
5749 | 5768 | ||