]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/net/wireless/iwlwifi/iwl-sta.c
iwlwifi: update copyright year to 2009
[mv-sheeva.git] / drivers / net / wireless / iwlwifi / iwl-sta.c
index 412f66bac1afc0f4024169b719f179405345a86e..5a214d7690a83cb08265e0073c236aaf2297a1d4 100644 (file)
@@ -1,6 +1,6 @@
 /******************************************************************************
  *
- * Copyright(c) 2003 - 2008 Intel Corporation. All rights reserved.
+ * Copyright(c) 2003 - 2009 Intel Corporation. All rights reserved.
  *
  * Portions of this file are derived from the ipw3945 project, as well
  * as portions of the ieee80211 subsystem header files.
@@ -87,7 +87,8 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
        spin_lock_irqsave(&priv->sta_lock, flags);
 
        if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE))
-               IWL_ERROR("ACTIVATE a non DRIVER active station %d\n", sta_id);
+               IWL_ERR(priv, "ACTIVATE a non DRIVER active station %d\n",
+                       sta_id);
 
        priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE;
        IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n",
@@ -105,13 +106,13 @@ static int iwl_add_sta_callback(struct iwl_priv *priv,
        u8 sta_id = addsta->sta.sta_id;
 
        if (!skb) {
-               IWL_ERROR("Error: Response NULL in REPLY_ADD_STA.\n");
+               IWL_ERR(priv, "Error: Response NULL in REPLY_ADD_STA.\n");
                return 1;
        }
 
        res = (struct iwl_rx_packet *)skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
-               IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n",
+               IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
                          res->hdr.flags);
                return 1;
        }
@@ -155,7 +156,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv,
 
        res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
-               IWL_ERROR("Bad return from REPLY_ADD_STA (0x%08X)\n",
+               IWL_ERR(priv, "Bad return from REPLY_ADD_STA (0x%08X)\n",
                          res->hdr.flags);
                ret = -EIO;
        }
@@ -168,7 +169,7 @@ static int iwl_send_add_sta(struct iwl_priv *priv,
                        break;
                default:
                        ret = -EIO;
-                       IWL_WARNING("REPLY_ADD_STA failed\n");
+                       IWL_WARN(priv, "REPLY_ADD_STA failed\n");
                        break;
                }
        }
@@ -204,7 +205,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index,
        case WLAN_HT_CAP_SM_PS_DISABLED:
                break;
        default:
-               IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode);
+               IWL_WARN(priv, "Invalid MIMO PS mode %d\n", mimo_ps_mode);
                break;
        }
 
@@ -307,7 +308,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
 
        /* Ucode must be active and driver must be non active */
        if (priv->stations[sta_id].used != IWL_STA_UCODE_ACTIVE)
-               IWL_ERROR("removed non active STA %d\n", sta_id);
+               IWL_ERR(priv, "removed non active STA %d\n", sta_id);
 
        priv->stations[sta_id].used &= ~IWL_STA_UCODE_ACTIVE;
 
@@ -324,13 +325,13 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv,
        const char *addr = rm_sta->addr;
 
        if (!skb) {
-               IWL_ERROR("Error: Response NULL in REPLY_REMOVE_STA.\n");
+               IWL_ERR(priv, "Error: Response NULL in REPLY_REMOVE_STA.\n");
                return 1;
        }
 
        res = (struct iwl_rx_packet *)skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
-               IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
+               IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n",
                res->hdr.flags);
                return 1;
        }
@@ -340,7 +341,7 @@ static int iwl_remove_sta_callback(struct iwl_priv *priv,
                iwl_sta_ucode_deactivate(priv, addr);
                break;
        default:
-               IWL_ERROR("REPLY_REMOVE_STA failed\n");
+               IWL_ERR(priv, "REPLY_REMOVE_STA failed\n");
                break;
        }
 
@@ -378,7 +379,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
 
        res = (struct iwl_rx_packet *)cmd.meta.u.skb->data;
        if (res->hdr.flags & IWL_CMD_FAILED_MSK) {
-               IWL_ERROR("Bad return from REPLY_REMOVE_STA (0x%08X)\n",
+               IWL_ERR(priv, "Bad return from REPLY_REMOVE_STA (0x%08X)\n",
                          res->hdr.flags);
                ret = -EIO;
        }
@@ -391,7 +392,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
                        break;
                default:
                        ret = -EIO;
-                       IWL_ERROR("REPLY_REMOVE_STA failed\n");
+                       IWL_ERR(priv, "REPLY_REMOVE_STA failed\n");
                        break;
                }
        }
@@ -433,13 +434,13 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
                sta_id, addr);
 
        if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
-               IWL_ERROR("Removing %pM but non DRIVER active\n",
+               IWL_ERR(priv, "Removing %pM but non DRIVER active\n",
                                addr);
                goto out;
        }
 
        if (!(priv->stations[sta_id].used & IWL_STA_UCODE_ACTIVE)) {
-               IWL_ERROR("Removing %pM but non UCODE active\n",
+               IWL_ERR(priv, "Removing %pM but non UCODE active\n",
                                addr);
                goto out;
        }
@@ -475,7 +476,7 @@ void iwl_clear_stations_table(struct iwl_priv *priv)
        if (iwl_is_alive(priv) &&
           !test_bit(STATUS_EXIT_PENDING, &priv->status) &&
           iwl_send_cmd_pdu_async(priv, REPLY_REMOVE_ALL_STA, 0, NULL, NULL))
-               IWL_ERROR("Couldn't clear the station table\n");
+               IWL_ERR(priv, "Couldn't clear the station table\n");
 
        priv->num_stations = 0;
        memset(priv->stations, 0, sizeof(priv->stations));
@@ -548,7 +549,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
        spin_lock_irqsave(&priv->sta_lock, flags);
 
        if (!test_and_clear_bit(keyconf->keyidx, &priv->ucode_key_table))
-               IWL_ERROR("index %d not used in uCode key table.\n",
+               IWL_ERR(priv, "index %d not used in uCode key table.\n",
                          keyconf->keyidx);
 
        priv->default_wep_key--;
@@ -582,7 +583,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
        priv->default_wep_key++;
 
        if (test_and_set_bit(keyconf->keyidx, &priv->ucode_key_table))
-               IWL_ERROR("index %d already used in uCode key table.\n",
+               IWL_ERR(priv, "index %d already used in uCode key table.\n",
                        keyconf->keyidx);
 
        priv->wep_keys[keyconf->keyidx].key_size = keyconf->keylen;
@@ -812,7 +813,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
        }
 
        if (priv->stations[sta_id].sta.key.key_offset == WEP_INVALID_OFFSET) {
-               IWL_WARNING("Removing wrong key %d 0x%x\n",
+               IWL_WARN(priv, "Removing wrong key %d 0x%x\n",
                            keyconf->keyidx, key_flags);
                spin_unlock_irqrestore(&priv->sta_lock, flags);
                return 0;
@@ -820,7 +821,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
 
        if (!test_and_clear_bit(priv->stations[sta_id].sta.key.key_offset,
                &priv->ucode_key_table))
-               IWL_ERROR("index %d not used in uCode key table.\n",
+               IWL_ERR(priv, "index %d not used in uCode key table.\n",
                        priv->stations[sta_id].sta.key.key_offset);
        memset(&priv->stations[sta_id].keyinfo, 0,
                                        sizeof(struct iwl_hw_key));
@@ -857,7 +858,8 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
                ret = iwl_set_wep_dynamic_key_info(priv, keyconf, sta_id);
                break;
        default:
-               IWL_ERROR("Unknown alg: %s alg = %d\n", __func__, keyconf->alg);
+               IWL_ERR(priv,
+                       "Unknown alg: %s alg = %d\n", __func__, keyconf->alg);
                ret = -EINVAL;
        }
 
@@ -1069,7 +1071,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
                return priv->hw_params.bcast_sta_id;
 
        default:
-               IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode);
+               IWL_WARN(priv, "Unknown mode of operation: %d\n",
+                       priv->iw_mode);
                return priv->hw_params.bcast_sta_id;
        }
 }