diff options
author | Winkler, Tomas <tomas.winkler@intel.com> | 2008-12-18 21:37:33 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-01-29 15:59:17 -0500 |
commit | 15b1687cb4f45b87ddbe4dfc7759ff5bb69497d2 (patch) | |
tree | c4e3e70b0d9b7ba877e52cd0a5116c4411bbf8e1 /drivers/net/wireless/iwlwifi/iwl-core.c | |
parent | 39aadf8c29ad959e823efca15381bea9d0770b1e (diff) |
iwlwifi: replace IWL_ERROR with IWL_ERR
IWL_ERR doesn't use hidden priv pointer.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 2bc461a610ad..cde233d1574e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -211,7 +211,7 @@ int iwl_hw_nic_init(struct iwl_priv *priv) | |||
211 | if (!rxq->bd) { | 211 | if (!rxq->bd) { |
212 | ret = iwl_rx_queue_alloc(priv); | 212 | ret = iwl_rx_queue_alloc(priv); |
213 | if (ret) { | 213 | if (ret) { |
214 | IWL_ERROR("Unable to initialize Rx queue\n"); | 214 | IWL_ERR(priv, "Unable to initialize Rx queue\n"); |
215 | return -ENOMEM; | 215 | return -ENOMEM; |
216 | } | 216 | } |
217 | } else | 217 | } else |
@@ -678,7 +678,7 @@ static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | |||
678 | break; | 678 | break; |
679 | case WLAN_HT_CAP_SM_PS_INVALID: | 679 | case WLAN_HT_CAP_SM_PS_INVALID: |
680 | default: | 680 | default: |
681 | IWL_ERROR("invalid mimo ps mode %d\n", | 681 | IWL_ERR(priv, "invalid mimo ps mode %d\n", |
682 | priv->current_ht_config.sm_ps); | 682 | priv->current_ht_config.sm_ps); |
683 | WARN_ON(1); | 683 | WARN_ON(1); |
684 | idle_cnt = -1; | 684 | idle_cnt = -1; |
@@ -830,7 +830,7 @@ int iwl_setup_mac(struct iwl_priv *priv) | |||
830 | 830 | ||
831 | ret = ieee80211_register_hw(priv->hw); | 831 | ret = ieee80211_register_hw(priv->hw); |
832 | if (ret) { | 832 | if (ret) { |
833 | IWL_ERROR("Failed to register hw (error %d)\n", ret); | 833 | IWL_ERR(priv, "Failed to register hw (error %d)\n", ret); |
834 | return ret; | 834 | return ret; |
835 | } | 835 | } |
836 | priv->mac80211_registered = 1; | 836 | priv->mac80211_registered = 1; |
@@ -901,13 +901,13 @@ int iwl_init_drv(struct iwl_priv *priv) | |||
901 | 901 | ||
902 | ret = iwl_init_channel_map(priv); | 902 | ret = iwl_init_channel_map(priv); |
903 | if (ret) { | 903 | if (ret) { |
904 | IWL_ERROR("initializing regulatory failed: %d\n", ret); | 904 | IWL_ERR(priv, "initializing regulatory failed: %d\n", ret); |
905 | goto err; | 905 | goto err; |
906 | } | 906 | } |
907 | 907 | ||
908 | ret = iwlcore_init_geos(priv); | 908 | ret = iwlcore_init_geos(priv); |
909 | if (ret) { | 909 | if (ret) { |
910 | IWL_ERROR("initializing geos failed: %d\n", ret); | 910 | IWL_ERR(priv, "initializing geos failed: %d\n", ret); |
911 | goto err_free_channel_map; | 911 | goto err_free_channel_map; |
912 | } | 912 | } |
913 | 913 | ||
@@ -1059,7 +1059,7 @@ static int iwl_verify_inst_full(struct iwl_priv *priv, __le32 *image, | |||
1059 | * if IWL_DL_IO is set */ | 1059 | * if IWL_DL_IO is set */ |
1060 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); | 1060 | val = _iwl_read_direct32(priv, HBUS_TARG_MEM_RDAT); |
1061 | if (val != le32_to_cpu(*image)) { | 1061 | if (val != le32_to_cpu(*image)) { |
1062 | IWL_ERROR("uCode INST section is invalid at " | 1062 | IWL_ERR(priv, "uCode INST section is invalid at " |
1063 | "offset 0x%x, is 0x%x, s/b 0x%x\n", | 1063 | "offset 0x%x, is 0x%x, s/b 0x%x\n", |
1064 | save_len - len, val, le32_to_cpu(*image)); | 1064 | save_len - len, val, le32_to_cpu(*image)); |
1065 | ret = -EIO; | 1065 | ret = -EIO; |
@@ -1115,7 +1115,7 @@ int iwl_verify_ucode(struct iwl_priv *priv) | |||
1115 | return 0; | 1115 | return 0; |
1116 | } | 1116 | } |
1117 | 1117 | ||
1118 | IWL_ERROR("NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n"); | 1118 | IWL_ERR(priv, "NO VALID UCODE IMAGE IN INSTRUCTION SRAM!!\n"); |
1119 | 1119 | ||
1120 | /* Since nothing seems to match, show first several data entries in | 1120 | /* Since nothing seems to match, show first several data entries in |
1121 | * instruction SRAM, so maybe visual inspection will give a clue. | 1121 | * instruction SRAM, so maybe visual inspection will give a clue. |
@@ -1187,7 +1187,7 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1187 | base = le32_to_cpu(priv->card_alive.error_event_table_ptr); | 1187 | base = le32_to_cpu(priv->card_alive.error_event_table_ptr); |
1188 | 1188 | ||
1189 | if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) { | 1189 | if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) { |
1190 | IWL_ERROR("Not valid error log pointer 0x%08X\n", base); | 1190 | IWL_ERR(priv, "Not valid error log pointer 0x%08X\n", base); |
1191 | return; | 1191 | return; |
1192 | } | 1192 | } |
1193 | 1193 | ||
@@ -1200,8 +1200,9 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1200 | count = iwl_read_targ_mem(priv, base); | 1200 | count = iwl_read_targ_mem(priv, base); |
1201 | 1201 | ||
1202 | if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { | 1202 | if (ERROR_START_OFFSET <= count * ERROR_ELEM_SIZE) { |
1203 | IWL_ERROR("Start IWL Error Log Dump:\n"); | 1203 | IWL_ERR(priv, "Start IWL Error Log Dump:\n"); |
1204 | IWL_ERROR("Status: 0x%08lX, count: %d\n", priv->status, count); | 1204 | IWL_ERR(priv, "Status: 0x%08lX, count: %d\n", |
1205 | priv->status, count); | ||
1205 | } | 1206 | } |
1206 | 1207 | ||
1207 | desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32)); | 1208 | desc = iwl_read_targ_mem(priv, base + 1 * sizeof(u32)); |
@@ -1214,12 +1215,12 @@ void iwl_dump_nic_error_log(struct iwl_priv *priv) | |||
1214 | line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32)); | 1215 | line = iwl_read_targ_mem(priv, base + 9 * sizeof(u32)); |
1215 | time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32)); | 1216 | time = iwl_read_targ_mem(priv, base + 11 * sizeof(u32)); |
1216 | 1217 | ||
1217 | IWL_ERROR("Desc Time " | 1218 | IWL_ERR(priv, "Desc Time " |
1218 | "data1 data2 line\n"); | 1219 | "data1 data2 line\n"); |
1219 | IWL_ERROR("%-28s (#%02d) %010u 0x%08X 0x%08X %u\n", | 1220 | IWL_ERR(priv, "%-28s (#%02d) %010u 0x%08X 0x%08X %u\n", |
1220 | desc_lookup(desc), desc, time, data1, data2, line); | 1221 | desc_lookup(desc), desc, time, data1, data2, line); |
1221 | IWL_ERROR("blink1 blink2 ilink1 ilink2\n"); | 1222 | IWL_ERR(priv, "blink1 blink2 ilink1 ilink2\n"); |
1222 | IWL_ERROR("0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2, | 1223 | IWL_ERR(priv, "0x%05X 0x%05X 0x%05X 0x%05X\n", blink1, blink2, |
1223 | ilink1, ilink2); | 1224 | ilink1, ilink2); |
1224 | 1225 | ||
1225 | iwl_release_nic_access(priv); | 1226 | iwl_release_nic_access(priv); |
@@ -1265,11 +1266,11 @@ static void iwl_print_event_log(struct iwl_priv *priv, u32 start_idx, | |||
1265 | ptr += sizeof(u32); | 1266 | ptr += sizeof(u32); |
1266 | if (mode == 0) { | 1267 | if (mode == 0) { |
1267 | /* data, ev */ | 1268 | /* data, ev */ |
1268 | IWL_ERROR("EVT_LOG:0x%08x:%04u\n", time, ev); | 1269 | IWL_ERR(priv, "EVT_LOG:0x%08x:%04u\n", time, ev); |
1269 | } else { | 1270 | } else { |
1270 | data = iwl_read_targ_mem(priv, ptr); | 1271 | data = iwl_read_targ_mem(priv, ptr); |
1271 | ptr += sizeof(u32); | 1272 | ptr += sizeof(u32); |
1272 | IWL_ERROR("EVT_LOGT:%010u:0x%08x:%04u\n", | 1273 | IWL_ERR(priv, "EVT_LOGT:%010u:0x%08x:%04u\n", |
1273 | time, data, ev); | 1274 | time, data, ev); |
1274 | } | 1275 | } |
1275 | } | 1276 | } |
@@ -1291,7 +1292,7 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv) | |||
1291 | base = le32_to_cpu(priv->card_alive.log_event_table_ptr); | 1292 | base = le32_to_cpu(priv->card_alive.log_event_table_ptr); |
1292 | 1293 | ||
1293 | if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) { | 1294 | if (!priv->cfg->ops->lib->is_valid_rtc_data_addr(base)) { |
1294 | IWL_ERROR("Invalid event log pointer 0x%08X\n", base); | 1295 | IWL_ERR(priv, "Invalid event log pointer 0x%08X\n", base); |
1295 | return; | 1296 | return; |
1296 | } | 1297 | } |
1297 | 1298 | ||
@@ -1311,12 +1312,12 @@ void iwl_dump_nic_event_log(struct iwl_priv *priv) | |||
1311 | 1312 | ||
1312 | /* bail out if nothing in log */ | 1313 | /* bail out if nothing in log */ |
1313 | if (size == 0) { | 1314 | if (size == 0) { |
1314 | IWL_ERROR("Start IWL Event Log Dump: nothing in log\n"); | 1315 | IWL_ERR(priv, "Start IWL Event Log Dump: nothing in log\n"); |
1315 | iwl_release_nic_access(priv); | 1316 | iwl_release_nic_access(priv); |
1316 | return; | 1317 | return; |
1317 | } | 1318 | } |
1318 | 1319 | ||
1319 | IWL_ERROR("Start IWL Event Log Dump: display count %d, wraps %d\n", | 1320 | IWL_ERR(priv, "Start IWL Event Log Dump: display count %d, wraps %d\n", |
1320 | size, num_wraps); | 1321 | size, num_wraps); |
1321 | 1322 | ||
1322 | /* if uCode has wrapped back to top of log, start at the oldest entry, | 1323 | /* if uCode has wrapped back to top of log, start at the oldest entry, |
@@ -1348,7 +1349,7 @@ void iwl_rf_kill_ct_config(struct iwl_priv *priv) | |||
1348 | ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD, | 1349 | ret = iwl_send_cmd_pdu(priv, REPLY_CT_KILL_CONFIG_CMD, |
1349 | sizeof(cmd), &cmd); | 1350 | sizeof(cmd), &cmd); |
1350 | if (ret) | 1351 | if (ret) |
1351 | IWL_ERROR("REPLY_CT_KILL_CONFIG_CMD failed\n"); | 1352 | IWL_ERR(priv, "REPLY_CT_KILL_CONFIG_CMD failed\n"); |
1352 | else | 1353 | else |
1353 | IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, " | 1354 | IWL_DEBUG_INFO("REPLY_CT_KILL_CONFIG_CMD succeeded, " |
1354 | "critical temperature is %d\n", | 1355 | "critical temperature is %d\n", |