diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2009-01-27 17:27:56 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-02-09 15:03:34 -0500 |
commit | e1623446bb1de1834ff1c57b3e8ed341d5d4a927 (patch) | |
tree | ece3595deda6d6bad747961be257d5f2cbb507b1 /drivers/net/wireless/iwlwifi/iwl-3945.c | |
parent | 450154e4f471248e188d18e45c2409b37a133765 (diff) |
iwlwifi: don't use implicit priv in IWL_DEBUG
Call IWL_DEBUG macro with explicit priv argument.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Samuel Ortiz <samuel.ortiz@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-3945.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 109 |
1 files changed, 54 insertions, 55 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index b4b186db0fd9..8ff5798ad641 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -170,7 +170,7 @@ void iwl3945_disable_events(struct iwl_priv *priv) | |||
170 | iwl_release_nic_access(priv); | 170 | iwl_release_nic_access(priv); |
171 | 171 | ||
172 | if (IWL_EVT_DISABLE && (array_size == IWL_EVT_DISABLE_SIZE)) { | 172 | if (IWL_EVT_DISABLE && (array_size == IWL_EVT_DISABLE_SIZE)) { |
173 | IWL_DEBUG_INFO("Disabling selected uCode log events at 0x%x\n", | 173 | IWL_DEBUG_INFO(priv, "Disabling selected uCode log events at 0x%x\n", |
174 | disable_ptr); | 174 | disable_ptr); |
175 | ret = iwl_grab_nic_access(priv); | 175 | ret = iwl_grab_nic_access(priv); |
176 | for (i = 0; i < IWL_EVT_DISABLE_SIZE; i++) | 176 | for (i = 0; i < IWL_EVT_DISABLE_SIZE; i++) |
@@ -180,9 +180,9 @@ void iwl3945_disable_events(struct iwl_priv *priv) | |||
180 | 180 | ||
181 | iwl_release_nic_access(priv); | 181 | iwl_release_nic_access(priv); |
182 | } else { | 182 | } else { |
183 | IWL_DEBUG_INFO("Selected uCode log events may be disabled\n"); | 183 | IWL_DEBUG_INFO(priv, "Selected uCode log events may be disabled\n"); |
184 | IWL_DEBUG_INFO(" by writing \"1\"s into disable bitmap\n"); | 184 | IWL_DEBUG_INFO(priv, " by writing \"1\"s into disable bitmap\n"); |
185 | IWL_DEBUG_INFO(" in SRAM at 0x%x, size %d u32s\n", | 185 | IWL_DEBUG_INFO(priv, " in SRAM at 0x%x, size %d u32s\n", |
186 | disable_ptr, array_size); | 186 | disable_ptr, array_size); |
187 | } | 187 | } |
188 | 188 | ||
@@ -338,11 +338,11 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv, | |||
338 | info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ? | 338 | info->flags |= ((status & TX_STATUS_MSK) == TX_STATUS_SUCCESS) ? |
339 | IEEE80211_TX_STAT_ACK : 0; | 339 | IEEE80211_TX_STAT_ACK : 0; |
340 | 340 | ||
341 | IWL_DEBUG_TX("Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n", | 341 | IWL_DEBUG_TX(priv, "Tx queue %d Status %s (0x%08x) plcp rate %d retries %d\n", |
342 | txq_id, iwl3945_get_tx_fail_reason(status), status, | 342 | txq_id, iwl3945_get_tx_fail_reason(status), status, |
343 | tx_resp->rate, tx_resp->failure_frame); | 343 | tx_resp->rate, tx_resp->failure_frame); |
344 | 344 | ||
345 | IWL_DEBUG_TX_REPLY("Tx queue reclaim %d\n", index); | 345 | IWL_DEBUG_TX_REPLY(priv, "Tx queue reclaim %d\n", index); |
346 | iwl3945_tx_queue_reclaim(priv, txq_id, index); | 346 | iwl3945_tx_queue_reclaim(priv, txq_id, index); |
347 | 347 | ||
348 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) | 348 | if (iwl_check_bits(status, TX_ABORT_REQUIRED_MSK)) |
@@ -362,7 +362,7 @@ static void iwl3945_rx_reply_tx(struct iwl_priv *priv, | |||
362 | void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) | 362 | void iwl3945_hw_rx_statistics(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb) |
363 | { | 363 | { |
364 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; | 364 | struct iwl_rx_packet *pkt = (void *)rxb->skb->data; |
365 | IWL_DEBUG_RX("Statistics notification received (%d vs %d).\n", | 365 | IWL_DEBUG_RX(priv, "Statistics notification received (%d vs %d).\n", |
366 | (int)sizeof(struct iwl3945_notif_statistics), | 366 | (int)sizeof(struct iwl3945_notif_statistics), |
367 | le32_to_cpu(pkt->len)); | 367 | le32_to_cpu(pkt->len)); |
368 | 368 | ||
@@ -496,13 +496,13 @@ static void _iwl3945_dbg_report_frame(struct iwl_priv *priv, | |||
496 | * MAC addresses show just the last byte (for brevity), | 496 | * MAC addresses show just the last byte (for brevity), |
497 | * but you can hack it to show more, if you'd like to. */ | 497 | * but you can hack it to show more, if you'd like to. */ |
498 | if (dataframe) | 498 | if (dataframe) |
499 | IWL_DEBUG_RX("%s: mhd=0x%04x, dst=0x%02x, " | 499 | IWL_DEBUG_RX(priv, "%s: mhd=0x%04x, dst=0x%02x, " |
500 | "len=%u, rssi=%d, chnl=%d, rate=%d, \n", | 500 | "len=%u, rssi=%d, chnl=%d, rate=%d, \n", |
501 | title, le16_to_cpu(fc), header->addr1[5], | 501 | title, le16_to_cpu(fc), header->addr1[5], |
502 | length, rssi, channel, rate); | 502 | length, rssi, channel, rate); |
503 | else { | 503 | else { |
504 | /* src/dst addresses assume managed mode */ | 504 | /* src/dst addresses assume managed mode */ |
505 | IWL_DEBUG_RX("%s: 0x%04x, dst=0x%02x, " | 505 | IWL_DEBUG_RX(priv, "%s: 0x%04x, dst=0x%02x, " |
506 | "src=0x%02x, rssi=%u, tim=%lu usec, " | 506 | "src=0x%02x, rssi=%u, tim=%lu usec, " |
507 | "phy=0x%02x, chnl=%d\n", | 507 | "phy=0x%02x, chnl=%d\n", |
508 | title, le16_to_cpu(fc), header->addr1[5], | 508 | title, le16_to_cpu(fc), header->addr1[5], |
@@ -563,14 +563,14 @@ static void iwl3945_pass_packet_to_mac80211(struct iwl_priv *priv, | |||
563 | 563 | ||
564 | /* We received data from the HW, so stop the watchdog */ | 564 | /* We received data from the HW, so stop the watchdog */ |
565 | if (unlikely((len + IWL39_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) { | 565 | if (unlikely((len + IWL39_RX_FRAME_SIZE) > skb_tailroom(rxb->skb))) { |
566 | IWL_DEBUG_DROP("Corruption detected!\n"); | 566 | IWL_DEBUG_DROP(priv, "Corruption detected!\n"); |
567 | return; | 567 | return; |
568 | } | 568 | } |
569 | 569 | ||
570 | /* We only process data packets if the interface is open */ | 570 | /* We only process data packets if the interface is open */ |
571 | if (unlikely(!priv->is_open)) { | 571 | if (unlikely(!priv->is_open)) { |
572 | IWL_DEBUG_DROP_LIMIT | 572 | IWL_DEBUG_DROP_LIMIT(priv, |
573 | ("Dropping packet while interface is not open.\n"); | 573 | "Dropping packet while interface is not open.\n"); |
574 | return; | 574 | return; |
575 | } | 575 | } |
576 | 576 | ||
@@ -626,15 +626,14 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, | |||
626 | rx_status.flag |= RX_FLAG_SHORTPRE; | 626 | rx_status.flag |= RX_FLAG_SHORTPRE; |
627 | 627 | ||
628 | if ((unlikely(rx_stats->phy_count > 20))) { | 628 | if ((unlikely(rx_stats->phy_count > 20))) { |
629 | IWL_DEBUG_DROP | 629 | IWL_DEBUG_DROP(priv, "dsp size out of range [0,20]: %d/n", |
630 | ("dsp size out of range [0,20]: " | 630 | rx_stats->phy_count); |
631 | "%d/n", rx_stats->phy_count); | ||
632 | return; | 631 | return; |
633 | } | 632 | } |
634 | 633 | ||
635 | if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) | 634 | if (!(rx_end->status & RX_RES_STATUS_NO_CRC32_ERROR) |
636 | || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { | 635 | || !(rx_end->status & RX_RES_STATUS_NO_RXE_OVERFLOW)) { |
637 | IWL_DEBUG_RX("Bad CRC or FIFO: 0x%08X.\n", rx_end->status); | 636 | IWL_DEBUG_RX(priv, "Bad CRC or FIFO: 0x%08X.\n", rx_end->status); |
638 | return; | 637 | return; |
639 | } | 638 | } |
640 | 639 | ||
@@ -673,7 +672,7 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, | |||
673 | } | 672 | } |
674 | 673 | ||
675 | 674 | ||
676 | IWL_DEBUG_STATS("Rssi %d noise %d qual %d sig_avg %d noise_diff %d\n", | 675 | IWL_DEBUG_STATS(priv, "Rssi %d noise %d qual %d sig_avg %d noise_diff %d\n", |
677 | rx_status.signal, rx_status.noise, rx_status.qual, | 676 | rx_status.signal, rx_status.noise, rx_status.qual, |
678 | rx_stats_sig_avg, rx_stats_noise_diff); | 677 | rx_stats_sig_avg, rx_stats_noise_diff); |
679 | 678 | ||
@@ -681,7 +680,7 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv, | |||
681 | 680 | ||
682 | network_packet = iwl3945_is_network_packet(priv, header); | 681 | network_packet = iwl3945_is_network_packet(priv, header); |
683 | 682 | ||
684 | IWL_DEBUG_STATS_LIMIT("[%c] %d RSSI:%d Signal:%u, Noise:%u, Rate:%u\n", | 683 | IWL_DEBUG_STATS_LIMIT(priv, "[%c] %d RSSI:%d Signal:%u, Noise:%u, Rate:%u\n", |
685 | network_packet ? '*' : ' ', | 684 | network_packet ? '*' : ' ', |
686 | le16_to_cpu(rx_hdr->channel), | 685 | le16_to_cpu(rx_hdr->channel), |
687 | rx_status.signal, rx_status.signal, | 686 | rx_status.signal, rx_status.signal, |
@@ -799,7 +798,7 @@ u8 iwl3945_hw_find_station(struct iwl_priv *priv, const u8 *addr) | |||
799 | goto out; | 798 | goto out; |
800 | } | 799 | } |
801 | 800 | ||
802 | IWL_DEBUG_INFO("can not find STA %pM (total %d)\n", | 801 | IWL_DEBUG_INFO(priv, "can not find STA %pM (total %d)\n", |
803 | addr, priv->num_stations); | 802 | addr, priv->num_stations); |
804 | out: | 803 | out: |
805 | spin_unlock_irqrestore(&priv->sta_lock, flags); | 804 | spin_unlock_irqrestore(&priv->sta_lock, flags); |
@@ -874,7 +873,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl_priv *priv, struct iwl_cmd *cmd, | |||
874 | /* CCK */ | 873 | /* CCK */ |
875 | tx->supp_rates[1] = (rate_mask & 0xF); | 874 | tx->supp_rates[1] = (rate_mask & 0xF); |
876 | 875 | ||
877 | IWL_DEBUG_RATE("Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " | 876 | IWL_DEBUG_RATE(priv, "Tx sta id: %d, rate: %d (plcp), flags: 0x%4X " |
878 | "cck/ofdm mask: 0x%x/0x%x\n", sta_id, | 877 | "cck/ofdm mask: 0x%x/0x%x\n", sta_id, |
879 | tx->rate, le32_to_cpu(tx->tx_flags), | 878 | tx->rate, le32_to_cpu(tx->tx_flags), |
880 | tx->supp_rates[1], tx->supp_rates[0]); | 879 | tx->supp_rates[1], tx->supp_rates[0]); |
@@ -899,7 +898,7 @@ u8 iwl3945_sync_sta(struct iwl_priv *priv, int sta_id, u16 tx_rate, u8 flags) | |||
899 | 898 | ||
900 | iwl_send_add_sta(priv, | 899 | iwl_send_add_sta(priv, |
901 | (struct iwl_addsta_cmd *)&station->sta, flags); | 900 | (struct iwl_addsta_cmd *)&station->sta, flags); |
902 | IWL_DEBUG_RATE("SCALE sync station %d to rate %d\n", | 901 | IWL_DEBUG_RATE(priv, "SCALE sync station %d to rate %d\n", |
903 | sta_id, tx_rate); | 902 | sta_id, tx_rate); |
904 | return sta_id; | 903 | return sta_id; |
905 | } | 904 | } |
@@ -1080,7 +1079,7 @@ static int iwl3945_apm_init(struct iwl_priv *priv) | |||
1080 | iwl_poll_direct_bit(priv, CSR_GP_CNTRL, | 1079 | iwl_poll_direct_bit(priv, CSR_GP_CNTRL, |
1081 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); | 1080 | CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000); |
1082 | if (ret < 0) { | 1081 | if (ret < 0) { |
1083 | IWL_DEBUG_INFO("Failed to init the card\n"); | 1082 | IWL_DEBUG_INFO(priv, "Failed to init the card\n"); |
1084 | goto out; | 1083 | goto out; |
1085 | } | 1084 | } |
1086 | 1085 | ||
@@ -1112,31 +1111,31 @@ static void iwl3945_nic_config(struct iwl_priv *priv) | |||
1112 | spin_lock_irqsave(&priv->lock, flags); | 1111 | spin_lock_irqsave(&priv->lock, flags); |
1113 | 1112 | ||
1114 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) | 1113 | if (rev_id & PCI_CFG_REV_ID_BIT_RTP) |
1115 | IWL_DEBUG_INFO("RTP type \n"); | 1114 | IWL_DEBUG_INFO(priv, "RTP type \n"); |
1116 | else if (rev_id & PCI_CFG_REV_ID_BIT_BASIC_SKU) { | 1115 | else if (rev_id & PCI_CFG_REV_ID_BIT_BASIC_SKU) { |
1117 | IWL_DEBUG_INFO("3945 RADIO-MB type\n"); | 1116 | IWL_DEBUG_INFO(priv, "3945 RADIO-MB type\n"); |
1118 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1117 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1119 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MB); | 1118 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MB); |
1120 | } else { | 1119 | } else { |
1121 | IWL_DEBUG_INFO("3945 RADIO-MM type\n"); | 1120 | IWL_DEBUG_INFO(priv, "3945 RADIO-MM type\n"); |
1122 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1121 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1123 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MM); | 1122 | CSR39_HW_IF_CONFIG_REG_BIT_3945_MM); |
1124 | } | 1123 | } |
1125 | 1124 | ||
1126 | if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) { | 1125 | if (EEPROM_SKU_CAP_OP_MODE_MRC == eeprom->sku_cap) { |
1127 | IWL_DEBUG_INFO("SKU OP mode is mrc\n"); | 1126 | IWL_DEBUG_INFO(priv, "SKU OP mode is mrc\n"); |
1128 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1127 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1129 | CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC); | 1128 | CSR39_HW_IF_CONFIG_REG_BIT_SKU_MRC); |
1130 | } else | 1129 | } else |
1131 | IWL_DEBUG_INFO("SKU OP mode is basic\n"); | 1130 | IWL_DEBUG_INFO(priv, "SKU OP mode is basic\n"); |
1132 | 1131 | ||
1133 | if ((eeprom->board_revision & 0xF0) == 0xD0) { | 1132 | if ((eeprom->board_revision & 0xF0) == 0xD0) { |
1134 | IWL_DEBUG_INFO("3945ABG revision is 0x%X\n", | 1133 | IWL_DEBUG_INFO(priv, "3945ABG revision is 0x%X\n", |
1135 | eeprom->board_revision); | 1134 | eeprom->board_revision); |
1136 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1135 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1137 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); | 1136 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); |
1138 | } else { | 1137 | } else { |
1139 | IWL_DEBUG_INFO("3945ABG revision is 0x%X\n", | 1138 | IWL_DEBUG_INFO(priv, "3945ABG revision is 0x%X\n", |
1140 | eeprom->board_revision); | 1139 | eeprom->board_revision); |
1141 | iwl_clear_bit(priv, CSR_HW_IF_CONFIG_REG, | 1140 | iwl_clear_bit(priv, CSR_HW_IF_CONFIG_REG, |
1142 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); | 1141 | CSR39_HW_IF_CONFIG_REG_BIT_BOARD_TYPE); |
@@ -1145,10 +1144,10 @@ static void iwl3945_nic_config(struct iwl_priv *priv) | |||
1145 | if (eeprom->almgor_m_version <= 1) { | 1144 | if (eeprom->almgor_m_version <= 1) { |
1146 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1145 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1147 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A); | 1146 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_A); |
1148 | IWL_DEBUG_INFO("Card M type A version is 0x%X\n", | 1147 | IWL_DEBUG_INFO(priv, "Card M type A version is 0x%X\n", |
1149 | eeprom->almgor_m_version); | 1148 | eeprom->almgor_m_version); |
1150 | } else { | 1149 | } else { |
1151 | IWL_DEBUG_INFO("Card M type B version is 0x%X\n", | 1150 | IWL_DEBUG_INFO(priv, "Card M type B version is 0x%X\n", |
1152 | eeprom->almgor_m_version); | 1151 | eeprom->almgor_m_version); |
1153 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, | 1152 | iwl_set_bit(priv, CSR_HW_IF_CONFIG_REG, |
1154 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B); | 1153 | CSR39_HW_IF_CONFIG_REG_BITS_SILICON_TYPE_B); |
@@ -1156,10 +1155,10 @@ static void iwl3945_nic_config(struct iwl_priv *priv) | |||
1156 | spin_unlock_irqrestore(&priv->lock, flags); | 1155 | spin_unlock_irqrestore(&priv->lock, flags); |
1157 | 1156 | ||
1158 | if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) | 1157 | if (eeprom->sku_cap & EEPROM_SKU_CAP_SW_RF_KILL_ENABLE) |
1159 | IWL_DEBUG_RF_KILL("SW RF KILL supported in EEPROM.\n"); | 1158 | IWL_DEBUG_RF_KILL(priv, "SW RF KILL supported in EEPROM.\n"); |
1160 | 1159 | ||
1161 | if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) | 1160 | if (eeprom->sku_cap & EEPROM_SKU_CAP_HW_RF_KILL_ENABLE) |
1162 | IWL_DEBUG_RF_KILL("HW RF KILL supported in EEPROM.\n"); | 1161 | IWL_DEBUG_RF_KILL(priv, "HW RF KILL supported in EEPROM.\n"); |
1163 | } | 1162 | } |
1164 | 1163 | ||
1165 | int iwl3945_hw_nic_init(struct iwl_priv *priv) | 1164 | int iwl3945_hw_nic_init(struct iwl_priv *priv) |
@@ -1177,7 +1176,7 @@ int iwl3945_hw_nic_init(struct iwl_priv *priv) | |||
1177 | rc = pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id); | 1176 | rc = pci_read_config_byte(priv->pci_dev, PCI_REVISION_ID, &rev_id); |
1178 | if (rc) | 1177 | if (rc) |
1179 | return rc; | 1178 | return rc; |
1180 | IWL_DEBUG_INFO("HW Revision ID = 0x%X\n", rev_id); | 1179 | IWL_DEBUG_INFO(priv, "HW Revision ID = 0x%X\n", rev_id); |
1181 | 1180 | ||
1182 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); | 1181 | rc = priv->cfg->ops->lib->apm_ops.set_pwr_src(priv, IWL_PWR_SRC_VMAIN); |
1183 | if(rc) | 1182 | if(rc) |
@@ -1286,7 +1285,7 @@ static int iwl3945_apm_stop_master(struct iwl_priv *priv) | |||
1286 | 1285 | ||
1287 | out: | 1286 | out: |
1288 | spin_unlock_irqrestore(&priv->lock, flags); | 1287 | spin_unlock_irqrestore(&priv->lock, flags); |
1289 | IWL_DEBUG_INFO("stop master\n"); | 1288 | IWL_DEBUG_INFO(priv, "stop master\n"); |
1290 | 1289 | ||
1291 | return ret; | 1290 | return ret; |
1292 | } | 1291 | } |
@@ -1391,7 +1390,7 @@ static int iwl3945_hw_reg_txpower_get_temperature(struct iwl_priv *priv) | |||
1391 | 1390 | ||
1392 | /* driver's okay range is -260 to +25. | 1391 | /* driver's okay range is -260 to +25. |
1393 | * human readable okay range is 0 to +285 */ | 1392 | * human readable okay range is 0 to +285 */ |
1394 | IWL_DEBUG_INFO("Temperature: %d\n", temperature + IWL_TEMP_CONVERT); | 1393 | IWL_DEBUG_INFO(priv, "Temperature: %d\n", temperature + IWL_TEMP_CONVERT); |
1395 | 1394 | ||
1396 | /* handle insane temp reading */ | 1395 | /* handle insane temp reading */ |
1397 | if (iwl3945_hw_reg_temp_out_of_range(temperature)) { | 1396 | if (iwl3945_hw_reg_temp_out_of_range(temperature)) { |
@@ -1428,20 +1427,20 @@ static int is_temp_calib_needed(struct iwl_priv *priv) | |||
1428 | 1427 | ||
1429 | /* get absolute value */ | 1428 | /* get absolute value */ |
1430 | if (temp_diff < 0) { | 1429 | if (temp_diff < 0) { |
1431 | IWL_DEBUG_POWER("Getting cooler, delta %d,\n", temp_diff); | 1430 | IWL_DEBUG_POWER(priv, "Getting cooler, delta %d,\n", temp_diff); |
1432 | temp_diff = -temp_diff; | 1431 | temp_diff = -temp_diff; |
1433 | } else if (temp_diff == 0) | 1432 | } else if (temp_diff == 0) |
1434 | IWL_DEBUG_POWER("Same temp,\n"); | 1433 | IWL_DEBUG_POWER(priv, "Same temp,\n"); |
1435 | else | 1434 | else |
1436 | IWL_DEBUG_POWER("Getting warmer, delta %d,\n", temp_diff); | 1435 | IWL_DEBUG_POWER(priv, "Getting warmer, delta %d,\n", temp_diff); |
1437 | 1436 | ||
1438 | /* if we don't need calibration, *don't* update last_temperature */ | 1437 | /* if we don't need calibration, *don't* update last_temperature */ |
1439 | if (temp_diff < IWL_TEMPERATURE_LIMIT_TIMER) { | 1438 | if (temp_diff < IWL_TEMPERATURE_LIMIT_TIMER) { |
1440 | IWL_DEBUG_POWER("Timed thermal calib not needed\n"); | 1439 | IWL_DEBUG_POWER(priv, "Timed thermal calib not needed\n"); |
1441 | return 0; | 1440 | return 0; |
1442 | } | 1441 | } |
1443 | 1442 | ||
1444 | IWL_DEBUG_POWER("Timed thermal calib needed\n"); | 1443 | IWL_DEBUG_POWER(priv, "Timed thermal calib needed\n"); |
1445 | 1444 | ||
1446 | /* assume that caller will actually do calib ... | 1445 | /* assume that caller will actually do calib ... |
1447 | * update the "last temperature" value */ | 1446 | * update the "last temperature" value */ |
@@ -1710,7 +1709,7 @@ static int iwl3945_send_tx_power(struct iwl_priv *priv) | |||
1710 | } | 1709 | } |
1711 | 1710 | ||
1712 | if (!is_channel_valid(ch_info)) { | 1711 | if (!is_channel_valid(ch_info)) { |
1713 | IWL_DEBUG_POWER("Not calling TX_PWR_TABLE_CMD on " | 1712 | IWL_DEBUG_POWER(priv, "Not calling TX_PWR_TABLE_CMD on " |
1714 | "non-Tx channel.\n"); | 1713 | "non-Tx channel.\n"); |
1715 | return 0; | 1714 | return 0; |
1716 | } | 1715 | } |
@@ -1723,7 +1722,7 @@ static int iwl3945_send_tx_power(struct iwl_priv *priv) | |||
1723 | txpower.power[i].tpc = ch_info->power_info[i].tpc; | 1722 | txpower.power[i].tpc = ch_info->power_info[i].tpc; |
1724 | txpower.power[i].rate = iwl3945_rates[rate_idx].plcp; | 1723 | txpower.power[i].rate = iwl3945_rates[rate_idx].plcp; |
1725 | 1724 | ||
1726 | IWL_DEBUG_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", | 1725 | IWL_DEBUG_POWER(priv, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n", |
1727 | le16_to_cpu(txpower.channel), | 1726 | le16_to_cpu(txpower.channel), |
1728 | txpower.band, | 1727 | txpower.band, |
1729 | txpower.power[i].tpc.tx_gain, | 1728 | txpower.power[i].tpc.tx_gain, |
@@ -1736,7 +1735,7 @@ static int iwl3945_send_tx_power(struct iwl_priv *priv) | |||
1736 | txpower.power[i].tpc = ch_info->power_info[i].tpc; | 1735 | txpower.power[i].tpc = ch_info->power_info[i].tpc; |
1737 | txpower.power[i].rate = iwl3945_rates[rate_idx].plcp; | 1736 | txpower.power[i].rate = iwl3945_rates[rate_idx].plcp; |
1738 | 1737 | ||
1739 | IWL_DEBUG_POWER("ch %d:%d rf %d dsp %3d rate code 0x%02x\n", | 1738 | IWL_DEBUG_POWER(priv, "ch %d:%d rf %d dsp %3d rate code 0x%02x\n", |
1740 | le16_to_cpu(txpower.channel), | 1739 | le16_to_cpu(txpower.channel), |
1741 | txpower.band, | 1740 | txpower.band, |
1742 | txpower.power[i].tpc.tx_gain, | 1741 | txpower.power[i].tpc.tx_gain, |
@@ -1927,12 +1926,12 @@ int iwl3945_hw_reg_set_txpower(struct iwl_priv *priv, s8 power) | |||
1927 | u8 i; | 1926 | u8 i; |
1928 | 1927 | ||
1929 | if (priv->tx_power_user_lmt == power) { | 1928 | if (priv->tx_power_user_lmt == power) { |
1930 | IWL_DEBUG_POWER("Requested Tx power same as current " | 1929 | IWL_DEBUG_POWER(priv, "Requested Tx power same as current " |
1931 | "limit: %ddBm.\n", power); | 1930 | "limit: %ddBm.\n", power); |
1932 | return 0; | 1931 | return 0; |
1933 | } | 1932 | } |
1934 | 1933 | ||
1935 | IWL_DEBUG_POWER("Setting upper limit clamp to %ddBm.\n", power); | 1934 | IWL_DEBUG_POWER(priv, "Setting upper limit clamp to %ddBm.\n", power); |
1936 | priv->tx_power_user_lmt = power; | 1935 | priv->tx_power_user_lmt = power; |
1937 | 1936 | ||
1938 | /* set up new Tx powers for each and every channel, 2.4 and 5.x */ | 1937 | /* set up new Tx powers for each and every channel, 2.4 and 5.x */ |
@@ -2042,7 +2041,7 @@ static u16 iwl3945_hw_reg_get_ch_grp_index(struct iwl_priv *priv, | |||
2042 | } else | 2041 | } else |
2043 | group_index = 0; /* 2.4 GHz, group 0 */ | 2042 | group_index = 0; /* 2.4 GHz, group 0 */ |
2044 | 2043 | ||
2045 | IWL_DEBUG_POWER("Chnl %d mapped to grp %d\n", ch_info->channel, | 2044 | IWL_DEBUG_POWER(priv, "Chnl %d mapped to grp %d\n", ch_info->channel, |
2046 | group_index); | 2045 | group_index); |
2047 | return group_index; | 2046 | return group_index; |
2048 | } | 2047 | } |
@@ -2109,7 +2108,7 @@ static void iwl3945_hw_reg_init_channel_groups(struct iwl_priv *priv) | |||
2109 | struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; | 2108 | struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; |
2110 | const struct iwl3945_eeprom_txpower_group *group; | 2109 | const struct iwl3945_eeprom_txpower_group *group; |
2111 | 2110 | ||
2112 | IWL_DEBUG_POWER("Initializing factory calib info from EEPROM\n"); | 2111 | IWL_DEBUG_POWER(priv, "Initializing factory calib info from EEPROM\n"); |
2113 | 2112 | ||
2114 | for (i = 0; i < IWL_NUM_TX_CALIB_GROUPS; i++) { | 2113 | for (i = 0; i < IWL_NUM_TX_CALIB_GROUPS; i++) { |
2115 | s8 *clip_pwrs; /* table of power levels for each rate */ | 2114 | s8 *clip_pwrs; /* table of power levels for each rate */ |
@@ -2225,7 +2224,7 @@ int iwl3945_txpower_set_from_eeprom(struct iwl_priv *priv) | |||
2225 | eeprom->groups[ch_info->group_index]. | 2224 | eeprom->groups[ch_info->group_index]. |
2226 | temperature); | 2225 | temperature); |
2227 | 2226 | ||
2228 | IWL_DEBUG_POWER("Delta index for channel %d: %d [%d]\n", | 2227 | IWL_DEBUG_POWER(priv, "Delta index for channel %d: %d [%d]\n", |
2229 | ch_info->channel, delta_index, temperature + | 2228 | ch_info->channel, delta_index, temperature + |
2230 | IWL_TEMP_CONVERT); | 2229 | IWL_TEMP_CONVERT); |
2231 | 2230 | ||
@@ -2410,7 +2409,7 @@ int iwl3945_init_hw_rate_table(struct iwl_priv *priv) | |||
2410 | 2409 | ||
2411 | switch (priv->band) { | 2410 | switch (priv->band) { |
2412 | case IEEE80211_BAND_5GHZ: | 2411 | case IEEE80211_BAND_5GHZ: |
2413 | IWL_DEBUG_RATE("Select A mode rate scale\n"); | 2412 | IWL_DEBUG_RATE(priv, "Select A mode rate scale\n"); |
2414 | /* If one of the following CCK rates is used, | 2413 | /* If one of the following CCK rates is used, |
2415 | * have it fall back to the 6M OFDM rate */ | 2414 | * have it fall back to the 6M OFDM rate */ |
2416 | for (i = IWL_RATE_1M_INDEX_TABLE; | 2415 | for (i = IWL_RATE_1M_INDEX_TABLE; |
@@ -2428,7 +2427,7 @@ int iwl3945_init_hw_rate_table(struct iwl_priv *priv) | |||
2428 | break; | 2427 | break; |
2429 | 2428 | ||
2430 | case IEEE80211_BAND_2GHZ: | 2429 | case IEEE80211_BAND_2GHZ: |
2431 | IWL_DEBUG_RATE("Select B/G mode rate scale\n"); | 2430 | IWL_DEBUG_RATE(priv, "Select B/G mode rate scale\n"); |
2432 | /* If an OFDM rate is used, have it fall back to the | 2431 | /* If an OFDM rate is used, have it fall back to the |
2433 | * 1M CCK rates */ | 2432 | * 1M CCK rates */ |
2434 | 2433 | ||
@@ -2553,7 +2552,7 @@ static int iwl3945_verify_bsm(struct iwl_priv *priv) | |||
2553 | u32 reg; | 2552 | u32 reg; |
2554 | u32 val; | 2553 | u32 val; |
2555 | 2554 | ||
2556 | IWL_DEBUG_INFO("Begin verify bsm\n"); | 2555 | IWL_DEBUG_INFO(priv, "Begin verify bsm\n"); |
2557 | 2556 | ||
2558 | /* verify BSM SRAM contents */ | 2557 | /* verify BSM SRAM contents */ |
2559 | val = iwl_read_prph(priv, BSM_WR_DWCOUNT_REG); | 2558 | val = iwl_read_prph(priv, BSM_WR_DWCOUNT_REG); |
@@ -2571,7 +2570,7 @@ static int iwl3945_verify_bsm(struct iwl_priv *priv) | |||
2571 | } | 2570 | } |
2572 | } | 2571 | } |
2573 | 2572 | ||
2574 | IWL_DEBUG_INFO("BSM bootstrap uCode image OK\n"); | 2573 | IWL_DEBUG_INFO(priv, "BSM bootstrap uCode image OK\n"); |
2575 | 2574 | ||
2576 | return 0; | 2575 | return 0; |
2577 | } | 2576 | } |
@@ -2648,7 +2647,7 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
2648 | u32 done; | 2647 | u32 done; |
2649 | u32 reg_offset; | 2648 | u32 reg_offset; |
2650 | 2649 | ||
2651 | IWL_DEBUG_INFO("Begin load bsm\n"); | 2650 | IWL_DEBUG_INFO(priv, "Begin load bsm\n"); |
2652 | 2651 | ||
2653 | /* make sure bootstrap program is no larger than BSM's SRAM size */ | 2652 | /* make sure bootstrap program is no larger than BSM's SRAM size */ |
2654 | if (len > IWL39_MAX_BSM_SIZE) | 2653 | if (len > IWL39_MAX_BSM_SIZE) |
@@ -2705,7 +2704,7 @@ static int iwl3945_load_bsm(struct iwl_priv *priv) | |||
2705 | udelay(10); | 2704 | udelay(10); |
2706 | } | 2705 | } |
2707 | if (i < 100) | 2706 | if (i < 100) |
2708 | IWL_DEBUG_INFO("BSM write complete, poll %d iterations\n", i); | 2707 | IWL_DEBUG_INFO(priv, "BSM write complete, poll %d iterations\n", i); |
2709 | else { | 2708 | else { |
2710 | IWL_ERR(priv, "BSM write did not complete!\n"); | 2709 | IWL_ERR(priv, "BSM write did not complete!\n"); |
2711 | return -EIO; | 2710 | return -EIO; |