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-sta.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-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-sta.c | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 41e9013c7427..672574fb5262 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -87,7 +87,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id) | |||
87 | spin_lock_irqsave(&priv->sta_lock, flags); | 87 | spin_lock_irqsave(&priv->sta_lock, flags); |
88 | 88 | ||
89 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) | 89 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) |
90 | IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id); | 90 | IWL_ERR(priv, "ACTIVATE a non DRIVER active station %d\n", |
91 | sta_id); | ||
91 | 92 | ||
92 | priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; | 93 | priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; |
93 | IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", | 94 | IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", |
@@ -105,13 +106,13 @@ static int iwl_add_sta_callback(struct iwl_priv *priv, | |||
105 | u8 sta_id = addsta->sta.sta_id; | 106 | u8 sta_id = addsta->sta.sta_id; |
106 | 107 | ||
107 | if (!skb) { | 108 | if (!skb) { |
108 | IWL_ERROR("Error: Response NULL in REPLY_ADD_STA.\n"); | 109 | IWL_ERR(priv, "Error: Response NULL in REPLY_ADD_STA.\n"); |
109 | return 1; | 110 | return 1; |
110 | } | 111 | } |
111 | 112 | ||
112 | res = (struct iwl_rx_packet *)skb->data; | 113 | res = (struct iwl_rx_packet *)skb->data; |
113 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { | 114 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { |
114 | IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n", | 115 | IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n", |
115 | res->hdr.flags); | 116 | res->hdr.flags); |
116 | return 1; | 117 | return 1; |
117 | } | 118 | } |
@@ -155,7 +156,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv, | |||
155 | 156 | ||
156 | res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; | 157 | res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; |
157 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { | 158 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { |
158 | IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n", | 159 | IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n", |
159 | res->hdr.flags); | 160 | res->hdr.flags); |
160 | ret = -EIO; | 161 | ret = -EIO; |
161 | } | 162 | } |
@@ -307,7 +308,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr) | |||
307 | 308 | ||
308 | /* Ucode must be active and driver must be non active */ | 309 | /* Ucode must be active and driver must be non active */ |
309 | if (priv->stations[sta_id].used != IWL_STA_UCODE_ACTIVE) | 310 | if (priv->stations[sta_id].used != IWL_STA_UCODE_ACTIVE) |
310 | IWL_ERROR("removed non active STA %d\n", sta_id); | 311 | IWL_ERR(priv, "removed non active STA %d\n", sta_id); |
311 | 312 | ||
312 | priv->stations[sta_id].used &= ~IWL_STA_UCODE_ACTIVE; | 313 | priv->stations[sta_id].used &= ~IWL_STA_UCODE_ACTIVE; |
313 | 314 | ||
@@ -324,13 +325,13 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv, | |||
324 | const char *addr = rm_sta->addr; | 325 | const char *addr = rm_sta->addr; |
325 | 326 | ||
326 | if (!skb) { | 327 | if (!skb) { |
327 | IWL_ERROR("Error: Response NULL in REPLY_REMOVE_STA.\n"); | 328 | IWL_ERR(priv, "Error: Response NULL in REPLY_REMOVE_STA.\n"); |
328 | return 1; | 329 | return 1; |
329 | } | 330 | } |
330 | 331 | ||
331 | res = (struct iwl_rx_packet *)skb->data; | 332 | res = (struct iwl_rx_packet *)skb->data; |
332 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { | 333 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { |
333 | IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n", | 334 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", |
334 | res->hdr.flags); | 335 | res->hdr.flags); |
335 | return 1; | 336 | return 1; |
336 | } | 337 | } |
@@ -340,7 +341,7 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv, | |||
340 | iwl_sta_ucode_deactivate(priv, addr); | 341 | iwl_sta_ucode_deactivate(priv, addr); |
341 | break; | 342 | break; |
342 | default: | 343 | default: |
343 | IWL_ERROR("REPLY_REMOVE_STA failed\n"); | 344 | IWL_ERR(priv, "REPLY_REMOVE_STA failed\n"); |
344 | break; | 345 | break; |
345 | } | 346 | } |
346 | 347 | ||
@@ -378,7 +379,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr, | |||
378 | 379 | ||
379 | res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; | 380 | res = (struct iwl_rx_packet *)cmd.meta.u.skb->data; |
380 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { | 381 | if (res->hdr.flags & IWL_CMD_FAILED_MSK) { |
381 | IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n", | 382 | IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n", |
382 | res->hdr.flags); | 383 | res->hdr.flags); |
383 | ret = -EIO; | 384 | ret = -EIO; |
384 | } | 385 | } |
@@ -391,7 +392,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr, | |||
391 | break; | 392 | break; |
392 | default: | 393 | default: |
393 | ret = -EIO; | 394 | ret = -EIO; |
394 | IWL_ERROR("REPLY_REMOVE_STA failed\n"); | 395 | IWL_ERR(priv, "REPLY_REMOVE_STA failed\n"); |
395 | break; | 396 | break; |
396 | } | 397 | } |
397 | } | 398 | } |
@@ -433,13 +434,13 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap) | |||
433 | sta_id, addr); | 434 | sta_id, addr); |
434 | 435 | ||
435 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { | 436 | if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { |
436 | IWL_ERROR("Removing %pM but non DRIVER active\n", | 437 | IWL_ERR(priv, "Removing %pM but non DRIVER active\n", |
437 | addr); | 438 | addr); |
438 | goto out; | 439 | goto out; |
439 | } | 440 | } |
440 | 441 | ||
441 | if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { | 442 | if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) { |
442 | IWL_ERROR("Removing %pM but non UCODE active\n", | 443 | IWL_ERR(priv, "Removing %pM but non UCODE active\n", |
443 | addr); | 444 | addr); |
444 | goto out; | 445 | goto out; |
445 | } | 446 | } |
@@ -475,7 +476,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv) | |||
475 | if (iwl_is_alive(priv) && | 476 | if (iwl_is_alive(priv) && |
476 | !test_bit(STATUS_EXIT_PENDING, &priv->status) && | 477 | !test_bit(STATUS_EXIT_PENDING, &priv->status) && |
477 | iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) | 478 | iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL)) |
478 | IWL_ERROR("Couldn't clear the station table\n"); | 479 | IWL_ERR(priv, "Couldn't clear the station table\n"); |
479 | 480 | ||
480 | priv->num_stations = 0; | 481 | priv->num_stations = 0; |
481 | memset(priv->stations, 0, sizeof(priv->stations)); | 482 | memset(priv->stations, 0, sizeof(priv->stations)); |
@@ -548,7 +549,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv, | |||
548 | spin_lock_irqsave(&priv->sta_lock, flags); | 549 | spin_lock_irqsave(&priv->sta_lock, flags); |
549 | 550 | ||
550 | if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) | 551 | if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table)) |
551 | IWL_ERROR("index %d not used in uCode key table.\n", | 552 | IWL_ERR(priv, "index %d not used in uCode key table.\n", |
552 | keyconf->keyidx); | 553 | keyconf->keyidx); |
553 | 554 | ||
554 | priv->default_wep_key--; | 555 | priv->default_wep_key--; |
@@ -582,7 +583,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv, | |||
582 | priv->default_wep_key++; | 583 | priv->default_wep_key++; |
583 | 584 | ||
584 | if (test_and_set_bit(keyconf->keyidx, &priv->ucode_key_table)) | 585 | if (test_and_set_bit(keyconf->keyidx, &priv->ucode_key_table)) |
585 | IWL_ERROR("index %d already used in uCode key table.\n", | 586 | IWL_ERR(priv, "index %d already used in uCode key table.\n", |
586 | keyconf->keyidx); | 587 | keyconf->keyidx); |
587 | 588 | ||
588 | priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; | 589 | priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen; |
@@ -820,7 +821,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv, | |||
820 | 821 | ||
821 | if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset, | 822 | if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset, |
822 | &priv->ucode_key_table)) | 823 | &priv->ucode_key_table)) |
823 | IWL_ERROR("index %d not used in uCode key table.\n", | 824 | IWL_ERR(priv, "index %d not used in uCode key table.\n", |
824 | priv->stations[sta_id].sta.key.key_offset); | 825 | priv->stations[sta_id].sta.key.key_offset); |
825 | memset(&priv->stations[sta_id].keyinfo, 0, | 826 | memset(&priv->stations[sta_id].keyinfo, 0, |
826 | sizeof(struct iwl_hw_key)); | 827 | sizeof(struct iwl_hw_key)); |
@@ -857,7 +858,8 @@ int iwl_set_dynamic_key(struct iwl_priv *priv, | |||
857 | ret = iwl_set_wep_dynamic_key_info(priv, keyconf, sta_id); | 858 | ret = iwl_set_wep_dynamic_key_info(priv, keyconf, sta_id); |
858 | break; | 859 | break; |
859 | default: | 860 | default: |
860 | IWL_ERROR("Unknown alg: %s alg = %d\n", __func__, keyconf->alg); | 861 | IWL_ERR(priv, |
862 | "Unknown alg: %s alg = %d\n", __func__, keyconf->alg); | ||
861 | ret = -EINVAL; | 863 | ret = -EINVAL; |
862 | } | 864 | } |
863 | 865 | ||