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-agn.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-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 88 |
1 files changed, 47 insertions, 41 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ce290f6867f3..1ef9f58fec85 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -181,7 +181,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
181 | 181 | ||
182 | ret = iwl_agn_check_rxon_cmd(priv); | 182 | ret = iwl_agn_check_rxon_cmd(priv); |
183 | if (ret) { | 183 | if (ret) { |
184 | IWL_ERROR("Invalid RXON configuration. Not committing.\n"); | 184 | IWL_ERR(priv, "Invalid RXON configuration. Not committing.\n"); |
185 | return -EINVAL; | 185 | return -EINVAL; |
186 | } | 186 | } |
187 | 187 | ||
@@ -191,7 +191,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
191 | if (!iwl_full_rxon_required(priv)) { | 191 | if (!iwl_full_rxon_required(priv)) { |
192 | ret = iwl_send_rxon_assoc(priv); | 192 | ret = iwl_send_rxon_assoc(priv); |
193 | if (ret) { | 193 | if (ret) { |
194 | IWL_ERROR("Error setting RXON_ASSOC (%d)\n", ret); | 194 | IWL_ERR(priv, "Error setting RXON_ASSOC (%d)\n", ret); |
195 | return ret; | 195 | return ret; |
196 | } | 196 | } |
197 | 197 | ||
@@ -218,7 +218,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
218 | * active_rxon back to what it was previously */ | 218 | * active_rxon back to what it was previously */ |
219 | if (ret) { | 219 | if (ret) { |
220 | active_rxon->filter_flags |= RXON_FILTER_ASSOC_MSK; | 220 | active_rxon->filter_flags |= RXON_FILTER_ASSOC_MSK; |
221 | IWL_ERROR("Error clearing ASSOC_MSK (%d)\n", ret); | 221 | IWL_ERR(priv, "Error clearing ASSOC_MSK (%d)\n", ret); |
222 | return ret; | 222 | return ret; |
223 | } | 223 | } |
224 | } | 224 | } |
@@ -242,7 +242,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
242 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, | 242 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, |
243 | sizeof(struct iwl_rxon_cmd), &priv->staging_rxon); | 243 | sizeof(struct iwl_rxon_cmd), &priv->staging_rxon); |
244 | if (ret) { | 244 | if (ret) { |
245 | IWL_ERROR("Error setting new RXON (%d)\n", ret); | 245 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); |
246 | return ret; | 246 | return ret; |
247 | } | 247 | } |
248 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); | 248 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); |
@@ -256,7 +256,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
256 | /* Add the broadcast address so we can send broadcast frames */ | 256 | /* Add the broadcast address so we can send broadcast frames */ |
257 | if (iwl_rxon_add_station(priv, iwl_bcast_addr, 0) == | 257 | if (iwl_rxon_add_station(priv, iwl_bcast_addr, 0) == |
258 | IWL_INVALID_STATION) { | 258 | IWL_INVALID_STATION) { |
259 | IWL_ERROR("Error adding BROADCAST address for transmit.\n"); | 259 | IWL_ERR(priv, "Error adding BROADCAST address for transmit.\n"); |
260 | return -EIO; | 260 | return -EIO; |
261 | } | 261 | } |
262 | 262 | ||
@@ -267,13 +267,15 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
267 | ret = iwl_rxon_add_station(priv, | 267 | ret = iwl_rxon_add_station(priv, |
268 | priv->active_rxon.bssid_addr, 1); | 268 | priv->active_rxon.bssid_addr, 1); |
269 | if (ret == IWL_INVALID_STATION) { | 269 | if (ret == IWL_INVALID_STATION) { |
270 | IWL_ERROR("Error adding AP address for TX.\n"); | 270 | IWL_ERR(priv, |
271 | "Error adding AP address for TX.\n"); | ||
271 | return -EIO; | 272 | return -EIO; |
272 | } | 273 | } |
273 | priv->assoc_station_added = 1; | 274 | priv->assoc_station_added = 1; |
274 | if (priv->default_wep_key && | 275 | if (priv->default_wep_key && |
275 | iwl_send_static_wepkey_cmd(priv, 0)) | 276 | iwl_send_static_wepkey_cmd(priv, 0)) |
276 | IWL_ERROR("Could not send WEP static key.\n"); | 277 | IWL_ERR(priv, |
278 | "Could not send WEP static key.\n"); | ||
277 | } | 279 | } |
278 | 280 | ||
279 | /* Apply the new configuration | 281 | /* Apply the new configuration |
@@ -282,7 +284,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
282 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, | 284 | ret = iwl_send_cmd_pdu(priv, REPLY_RXON, |
283 | sizeof(struct iwl_rxon_cmd), &priv->staging_rxon); | 285 | sizeof(struct iwl_rxon_cmd), &priv->staging_rxon); |
284 | if (ret) { | 286 | if (ret) { |
285 | IWL_ERROR("Error setting new RXON (%d)\n", ret); | 287 | IWL_ERR(priv, "Error setting new RXON (%d)\n", ret); |
286 | return ret; | 288 | return ret; |
287 | } | 289 | } |
288 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); | 290 | memcpy(active_rxon, &priv->staging_rxon, sizeof(*active_rxon)); |
@@ -294,7 +296,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv) | |||
294 | * send a new TXPOWER command or we won't be able to Tx any frames */ | 296 | * send a new TXPOWER command or we won't be able to Tx any frames */ |
295 | ret = iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); | 297 | ret = iwl_set_tx_power(priv, priv->tx_power_user_lmt, true); |
296 | if (ret) { | 298 | if (ret) { |
297 | IWL_ERROR("Error sending TX power (%d)\n", ret); | 299 | IWL_ERR(priv, "Error sending TX power (%d)\n", ret); |
298 | return ret; | 300 | return ret; |
299 | } | 301 | } |
300 | 302 | ||
@@ -350,7 +352,7 @@ static struct iwl_frame *iwl_get_free_frame(struct iwl_priv *priv) | |||
350 | if (list_empty(&priv->free_frames)) { | 352 | if (list_empty(&priv->free_frames)) { |
351 | frame = kzalloc(sizeof(*frame), GFP_KERNEL); | 353 | frame = kzalloc(sizeof(*frame), GFP_KERNEL); |
352 | if (!frame) { | 354 | if (!frame) { |
353 | IWL_ERROR("Could not allocate frame!\n"); | 355 | IWL_ERR(priv, "Could not allocate frame!\n"); |
354 | return NULL; | 356 | return NULL; |
355 | } | 357 | } |
356 | 358 | ||
@@ -452,7 +454,7 @@ static int iwl_send_beacon_cmd(struct iwl_priv *priv) | |||
452 | frame = iwl_get_free_frame(priv); | 454 | frame = iwl_get_free_frame(priv); |
453 | 455 | ||
454 | if (!frame) { | 456 | if (!frame) { |
455 | IWL_ERROR("Could not obtain free frame buffer for beacon " | 457 | IWL_ERR(priv, "Could not obtain free frame buffer for beacon " |
456 | "command.\n"); | 458 | "command.\n"); |
457 | return -ENOMEM; | 459 | return -ENOMEM; |
458 | } | 460 | } |
@@ -686,7 +688,7 @@ static void iwl_connection_init_rx_config(struct iwl_priv *priv, int mode) | |||
686 | RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; | 688 | RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; |
687 | break; | 689 | break; |
688 | default: | 690 | default: |
689 | IWL_ERROR("Unsupported interface type %d\n", mode); | 691 | IWL_ERR(priv, "Unsupported interface type %d\n", mode); |
690 | break; | 692 | break; |
691 | } | 693 | } |
692 | 694 | ||
@@ -763,7 +765,7 @@ static void iwl_set_rate(struct iwl_priv *priv) | |||
763 | 765 | ||
764 | hw = iwl_get_hw_mode(priv, priv->band); | 766 | hw = iwl_get_hw_mode(priv, priv->band); |
765 | if (!hw) { | 767 | if (!hw) { |
766 | IWL_ERROR("Failed to set rate: unable to get hw mode\n"); | 768 | IWL_ERR(priv, "Failed to set rate: unable to get hw mode\n"); |
767 | return; | 769 | return; |
768 | } | 770 | } |
769 | 771 | ||
@@ -849,7 +851,7 @@ static void iwl_rx_reply_error(struct iwl_priv *priv, | |||
849 | { | 851 | { |
850 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; | 852 | struct iwl_rx_packet *pkt = (struct iwl_rx_packet *)rxb->skb->data; |
851 | 853 | ||
852 | IWL_ERROR("Error Reply type 0x%08X cmd %s (0x%02X) " | 854 | IWL_ERR(priv, "Error Reply type 0x%08X cmd %s (0x%02X) " |
853 | "seq 0x%04X ser 0x%08X\n", | 855 | "seq 0x%04X ser 0x%08X\n", |
854 | le32_to_cpu(pkt->u.err_resp.error_type), | 856 | le32_to_cpu(pkt->u.err_resp.error_type), |
855 | get_cmd_string(pkt->u.err_resp.cmd_id), | 857 | get_cmd_string(pkt->u.err_resp.cmd_id), |
@@ -902,7 +904,7 @@ static void iwl_bg_beacon_update(struct work_struct *work) | |||
902 | beacon = ieee80211_beacon_get(priv->hw, priv->vif); | 904 | beacon = ieee80211_beacon_get(priv->hw, priv->vif); |
903 | 905 | ||
904 | if (!beacon) { | 906 | if (!beacon) { |
905 | IWL_ERROR("update beacon failed\n"); | 907 | IWL_ERR(priv, "update beacon failed\n"); |
906 | return; | 908 | return; |
907 | } | 909 | } |
908 | 910 | ||
@@ -1357,7 +1359,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1357 | 1359 | ||
1358 | /* Now service all interrupt bits discovered above. */ | 1360 | /* Now service all interrupt bits discovered above. */ |
1359 | if (inta & CSR_INT_BIT_HW_ERR) { | 1361 | if (inta & CSR_INT_BIT_HW_ERR) { |
1360 | IWL_ERROR("Microcode HW error detected. Restarting.\n"); | 1362 | IWL_ERR(priv, "Microcode HW error detected. Restarting.\n"); |
1361 | 1363 | ||
1362 | /* Tell the device to stop sending interrupts */ | 1364 | /* Tell the device to stop sending interrupts */ |
1363 | iwl_disable_interrupts(priv); | 1365 | iwl_disable_interrupts(priv); |
@@ -1411,14 +1413,14 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1411 | 1413 | ||
1412 | /* Chip got too hot and stopped itself */ | 1414 | /* Chip got too hot and stopped itself */ |
1413 | if (inta & CSR_INT_BIT_CT_KILL) { | 1415 | if (inta & CSR_INT_BIT_CT_KILL) { |
1414 | IWL_ERROR("Microcode CT kill error detected.\n"); | 1416 | IWL_ERR(priv, "Microcode CT kill error detected.\n"); |
1415 | handled |= CSR_INT_BIT_CT_KILL; | 1417 | handled |= CSR_INT_BIT_CT_KILL; |
1416 | } | 1418 | } |
1417 | 1419 | ||
1418 | /* Error detected by uCode */ | 1420 | /* Error detected by uCode */ |
1419 | if (inta & CSR_INT_BIT_SW_ERR) { | 1421 | if (inta & CSR_INT_BIT_SW_ERR) { |
1420 | IWL_ERROR("Microcode SW error detected. Restarting 0x%X.\n", | 1422 | IWL_ERR(priv, "Microcode SW error detected. " |
1421 | inta); | 1423 | " Restarting 0x%X.\n", inta); |
1422 | iwl_irq_handle_error(priv); | 1424 | iwl_irq_handle_error(priv); |
1423 | handled |= CSR_INT_BIT_SW_ERR; | 1425 | handled |= CSR_INT_BIT_SW_ERR; |
1424 | } | 1426 | } |
@@ -1454,7 +1456,7 @@ static void iwl_irq_tasklet(struct iwl_priv *priv) | |||
1454 | } | 1456 | } |
1455 | 1457 | ||
1456 | if (inta & ~handled) | 1458 | if (inta & ~handled) |
1457 | IWL_ERROR("Unhandled INTA bits 0x%08x\n", inta & ~handled); | 1459 | IWL_ERR(priv, "Unhandled INTA bits 0x%08x\n", inta & ~handled); |
1458 | 1460 | ||
1459 | if (inta & ~CSR_INI_SET_MASK) { | 1461 | if (inta & ~CSR_INI_SET_MASK) { |
1460 | IWL_WARN(priv, "Disabled INTA bits 0x%08x were pending\n", | 1462 | IWL_WARN(priv, "Disabled INTA bits 0x%08x were pending\n", |
@@ -1584,7 +1586,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1584 | sprintf(buf, "%s%d%s", name_pre, index, ".ucode"); | 1586 | sprintf(buf, "%s%d%s", name_pre, index, ".ucode"); |
1585 | ret = request_firmware(&ucode_raw, buf, &priv->pci_dev->dev); | 1587 | ret = request_firmware(&ucode_raw, buf, &priv->pci_dev->dev); |
1586 | if (ret < 0) { | 1588 | if (ret < 0) { |
1587 | IWL_ERROR("%s firmware file req failed: Reason %d\n", | 1589 | IWL_ERR(priv, "%s firmware file req failed: %d\n", |
1588 | buf, ret); | 1590 | buf, ret); |
1589 | if (ret == -ENOENT) | 1591 | if (ret == -ENOENT) |
1590 | continue; | 1592 | continue; |
@@ -1592,8 +1594,11 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1592 | goto error; | 1594 | goto error; |
1593 | } else { | 1595 | } else { |
1594 | if (index < api_max) | 1596 | if (index < api_max) |
1595 | IWL_ERROR("Loaded firmware %s, which is deprecated. Please use API v%u instead.\n", | 1597 | IWL_ERR(priv, "Loaded firmware %s, " |
1598 | "which is deprecated. " | ||
1599 | "Please use API v%u instead.\n", | ||
1596 | buf, api_max); | 1600 | buf, api_max); |
1601 | |||
1597 | IWL_DEBUG_INFO("Got firmware '%s' file (%zd bytes) from disk\n", | 1602 | IWL_DEBUG_INFO("Got firmware '%s' file (%zd bytes) from disk\n", |
1598 | buf, ucode_raw->size); | 1603 | buf, ucode_raw->size); |
1599 | break; | 1604 | break; |
@@ -1605,7 +1610,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1605 | 1610 | ||
1606 | /* Make sure that we got at least our header! */ | 1611 | /* Make sure that we got at least our header! */ |
1607 | if (ucode_raw->size < sizeof(*ucode)) { | 1612 | if (ucode_raw->size < sizeof(*ucode)) { |
1608 | IWL_ERROR("File size way too small!\n"); | 1613 | IWL_ERR(priv, "File size way too small!\n"); |
1609 | ret = -EINVAL; | 1614 | ret = -EINVAL; |
1610 | goto err_release; | 1615 | goto err_release; |
1611 | } | 1616 | } |
@@ -1626,7 +1631,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1626 | * on the API version read from firware header from here on forward */ | 1631 | * on the API version read from firware header from here on forward */ |
1627 | 1632 | ||
1628 | if (api_ver < api_min || api_ver > api_max) { | 1633 | if (api_ver < api_min || api_ver > api_max) { |
1629 | IWL_ERROR("Driver unable to support your firmware API. " | 1634 | IWL_ERR(priv, "Driver unable to support your firmware API. " |
1630 | "Driver supports v%u, firmware is v%u.\n", | 1635 | "Driver supports v%u, firmware is v%u.\n", |
1631 | api_max, api_ver); | 1636 | api_max, api_ver); |
1632 | priv->ucode_ver = 0; | 1637 | priv->ucode_ver = 0; |
@@ -1787,7 +1792,7 @@ static int iwl_read_ucode(struct iwl_priv *priv) | |||
1787 | return 0; | 1792 | return 0; |
1788 | 1793 | ||
1789 | err_pci_alloc: | 1794 | err_pci_alloc: |
1790 | IWL_ERROR("failed to allocate pci memory\n"); | 1795 | IWL_ERR(priv, "failed to allocate pci memory\n"); |
1791 | ret = -ENOMEM; | 1796 | ret = -ENOMEM; |
1792 | iwl_dealloc_ucode_pci(priv); | 1797 | iwl_dealloc_ucode_pci(priv); |
1793 | 1798 | ||
@@ -2025,7 +2030,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2025 | } | 2030 | } |
2026 | 2031 | ||
2027 | if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { | 2032 | if (!priv->ucode_data_backup.v_addr || !priv->ucode_data.v_addr) { |
2028 | IWL_ERROR("ucode not available for device bringup\n"); | 2033 | IWL_ERR(priv, "ucode not available for device bringup\n"); |
2029 | return -EIO; | 2034 | return -EIO; |
2030 | } | 2035 | } |
2031 | 2036 | ||
@@ -2046,7 +2051,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2046 | 2051 | ||
2047 | ret = iwl_hw_nic_init(priv); | 2052 | ret = iwl_hw_nic_init(priv); |
2048 | if (ret) { | 2053 | if (ret) { |
2049 | IWL_ERROR("Unable to init nic\n"); | 2054 | IWL_ERR(priv, "Unable to init nic\n"); |
2050 | return ret; | 2055 | return ret; |
2051 | } | 2056 | } |
2052 | 2057 | ||
@@ -2079,7 +2084,8 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2079 | ret = priv->cfg->ops->lib->load_ucode(priv); | 2084 | ret = priv->cfg->ops->lib->load_ucode(priv); |
2080 | 2085 | ||
2081 | if (ret) { | 2086 | if (ret) { |
2082 | IWL_ERROR("Unable to set up bootstrap uCode: %d\n", ret); | 2087 | IWL_ERR(priv, "Unable to set up bootstrap uCode: %d\n", |
2088 | ret); | ||
2083 | continue; | 2089 | continue; |
2084 | } | 2090 | } |
2085 | 2091 | ||
@@ -2100,7 +2106,7 @@ static int __iwl_up(struct iwl_priv *priv) | |||
2100 | 2106 | ||
2101 | /* tried to restart and config the device for as long as our | 2107 | /* tried to restart and config the device for as long as our |
2102 | * patience could withstand */ | 2108 | * patience could withstand */ |
2103 | IWL_ERROR("Unable to initialize device after %d attempts.\n", i); | 2109 | IWL_ERR(priv, "Unable to initialize device after %d attempts.\n", i); |
2104 | return -EIO; | 2110 | return -EIO; |
2105 | } | 2111 | } |
2106 | 2112 | ||
@@ -2240,7 +2246,7 @@ static void iwl_post_associate(struct iwl_priv *priv) | |||
2240 | unsigned long flags; | 2246 | unsigned long flags; |
2241 | 2247 | ||
2242 | if (priv->iw_mode == NL80211_IFTYPE_AP) { | 2248 | if (priv->iw_mode == NL80211_IFTYPE_AP) { |
2243 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); | 2249 | IWL_ERR(priv, "%s Should not be called in AP mode\n", __func__); |
2244 | return; | 2250 | return; |
2245 | } | 2251 | } |
2246 | 2252 | ||
@@ -2313,7 +2319,7 @@ static void iwl_post_associate(struct iwl_priv *priv) | |||
2313 | break; | 2319 | break; |
2314 | 2320 | ||
2315 | default: | 2321 | default: |
2316 | IWL_ERROR("%s Should not be called in %d mode\n", | 2322 | IWL_ERR(priv, "%s Should not be called in %d mode\n", |
2317 | __func__, priv->iw_mode); | 2323 | __func__, priv->iw_mode); |
2318 | break; | 2324 | break; |
2319 | } | 2325 | } |
@@ -2354,7 +2360,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2354 | IWL_DEBUG_MAC80211("enter\n"); | 2360 | IWL_DEBUG_MAC80211("enter\n"); |
2355 | 2361 | ||
2356 | if (pci_enable_device(priv->pci_dev)) { | 2362 | if (pci_enable_device(priv->pci_dev)) { |
2357 | IWL_ERROR("Fail to pci_enable_device\n"); | 2363 | IWL_ERR(priv, "Fail to pci_enable_device\n"); |
2358 | return -ENODEV; | 2364 | return -ENODEV; |
2359 | } | 2365 | } |
2360 | pci_restore_state(priv->pci_dev); | 2366 | pci_restore_state(priv->pci_dev); |
@@ -2370,7 +2376,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2370 | ret = request_irq(priv->pci_dev->irq, iwl_isr, IRQF_SHARED, | 2376 | ret = request_irq(priv->pci_dev->irq, iwl_isr, IRQF_SHARED, |
2371 | DRV_NAME, priv); | 2377 | DRV_NAME, priv); |
2372 | if (ret) { | 2378 | if (ret) { |
2373 | IWL_ERROR("Error allocating IRQ %d\n", priv->pci_dev->irq); | 2379 | IWL_ERR(priv, "Error allocating IRQ %d\n", priv->pci_dev->irq); |
2374 | goto out_disable_msi; | 2380 | goto out_disable_msi; |
2375 | } | 2381 | } |
2376 | 2382 | ||
@@ -2384,7 +2390,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2384 | if (!priv->ucode_code.len) { | 2390 | if (!priv->ucode_code.len) { |
2385 | ret = iwl_read_ucode(priv); | 2391 | ret = iwl_read_ucode(priv); |
2386 | if (ret) { | 2392 | if (ret) { |
2387 | IWL_ERROR("Could not read microcode: %d\n", ret); | 2393 | IWL_ERR(priv, "Could not read microcode: %d\n", ret); |
2388 | mutex_unlock(&priv->mutex); | 2394 | mutex_unlock(&priv->mutex); |
2389 | goto out_release_irq; | 2395 | goto out_release_irq; |
2390 | } | 2396 | } |
@@ -2414,7 +2420,7 @@ static int iwl_mac_start(struct ieee80211_hw *hw) | |||
2414 | UCODE_READY_TIMEOUT); | 2420 | UCODE_READY_TIMEOUT); |
2415 | if (!ret) { | 2421 | if (!ret) { |
2416 | if (!test_bit(STATUS_READY, &priv->status)) { | 2422 | if (!test_bit(STATUS_READY, &priv->status)) { |
2417 | IWL_ERROR("START_ALIVE timeout after %dms.\n", | 2423 | IWL_ERR(priv, "START_ALIVE timeout after %dms.\n", |
2418 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); | 2424 | jiffies_to_msecs(UCODE_READY_TIMEOUT)); |
2419 | ret = -ETIMEDOUT; | 2425 | ret = -ETIMEDOUT; |
2420 | goto out_release_irq; | 2426 | goto out_release_irq; |
@@ -2573,7 +2579,7 @@ static int iwl_mac_config(struct ieee80211_hw *hw, u32 changed) | |||
2573 | 2579 | ||
2574 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && | 2580 | if (priv->iw_mode == NL80211_IFTYPE_ADHOC && |
2575 | !is_channel_ibss(ch_info)) { | 2581 | !is_channel_ibss(ch_info)) { |
2576 | IWL_ERROR("channel %d in band %d not IBSS channel\n", | 2582 | IWL_ERR(priv, "channel %d in band %d not IBSS channel\n", |
2577 | conf->channel->hw_value, conf->channel->band); | 2583 | conf->channel->hw_value, conf->channel->band); |
2578 | ret = -EINVAL; | 2584 | ret = -EINVAL; |
2579 | goto out; | 2585 | goto out; |
@@ -3818,7 +3824,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3818 | /* Read the EEPROM */ | 3824 | /* Read the EEPROM */ |
3819 | err = iwl_eeprom_init(priv); | 3825 | err = iwl_eeprom_init(priv); |
3820 | if (err) { | 3826 | if (err) { |
3821 | IWL_ERROR("Unable to init EEPROM\n"); | 3827 | IWL_ERR(priv, "Unable to init EEPROM\n"); |
3822 | goto out_iounmap; | 3828 | goto out_iounmap; |
3823 | } | 3829 | } |
3824 | err = iwl_eeprom_check_version(priv); | 3830 | err = iwl_eeprom_check_version(priv); |
@@ -3834,7 +3840,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3834 | * 5. Setup HW constants | 3840 | * 5. Setup HW constants |
3835 | ************************/ | 3841 | ************************/ |
3836 | if (iwl_set_hw_params(priv)) { | 3842 | if (iwl_set_hw_params(priv)) { |
3837 | IWL_ERROR("failed to set hw parameters\n"); | 3843 | IWL_ERR(priv, "failed to set hw parameters\n"); |
3838 | goto out_free_eeprom; | 3844 | goto out_free_eeprom; |
3839 | } | 3845 | } |
3840 | 3846 | ||
@@ -3866,7 +3872,7 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3866 | 3872 | ||
3867 | err = sysfs_create_group(&pdev->dev.kobj, &iwl_attribute_group); | 3873 | err = sysfs_create_group(&pdev->dev.kobj, &iwl_attribute_group); |
3868 | if (err) { | 3874 | if (err) { |
3869 | IWL_ERROR("failed to create sysfs device attributes\n"); | 3875 | IWL_ERR(priv, "failed to create sysfs device attributes\n"); |
3870 | goto out_uninit_drv; | 3876 | goto out_uninit_drv; |
3871 | } | 3877 | } |
3872 | 3878 | ||
@@ -3890,11 +3896,11 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
3890 | 3896 | ||
3891 | err = iwl_dbgfs_register(priv, DRV_NAME); | 3897 | err = iwl_dbgfs_register(priv, DRV_NAME); |
3892 | if (err) | 3898 | if (err) |
3893 | IWL_ERROR("failed to create debugfs files\n"); | 3899 | IWL_ERR(priv, "failed to create debugfs files\n"); |
3894 | 3900 | ||
3895 | err = iwl_rfkill_init(priv); | 3901 | err = iwl_rfkill_init(priv); |
3896 | if (err) | 3902 | if (err) |
3897 | IWL_ERROR("Unable to initialize RFKILL system. " | 3903 | IWL_ERR(priv, "Unable to initialize RFKILL system. " |
3898 | "Ignoring error: %d\n", err); | 3904 | "Ignoring error: %d\n", err); |
3899 | iwl_power_initialize(priv); | 3905 | iwl_power_initialize(priv); |
3900 | return 0; | 3906 | return 0; |