aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-sta.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-sta.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index 20dc84152d4f..1fae3a6bd8d5 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -60,7 +60,7 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr)
60 goto out; 60 goto out;
61 } 61 }
62 62
63 IWL_DEBUG_ASSOC_LIMIT("can not find STA %pM total %d\n", 63 IWL_DEBUG_ASSOC_LIMIT(priv, "can not find STA %pM total %d\n",
64 addr, priv->num_stations); 64 addr, priv->num_stations);
65 65
66 out: 66 out:
@@ -92,7 +92,7 @@ static void iwl_sta_ucode_activate(struct iwl_priv *priv, u8 sta_id)
92 sta_id); 92 sta_id);
93 93
94 priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE; 94 priv->stations[sta_id].used |= IWL_STA_UCODE_ACTIVE;
95 IWL_DEBUG_ASSOC("Added STA to Ucode: %pM\n", 95 IWL_DEBUG_ASSOC(priv, "Added STA to Ucode: %pM\n",
96 priv->stations[sta_id].sta.sta.addr); 96 priv->stations[sta_id].sta.sta.addr);
97 97
98 spin_unlock_irqrestore(&priv->sta_lock, flags); 98 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -123,7 +123,7 @@ static int iwl_add_sta_callback(struct iwl_priv *priv,
123 iwl_sta_ucode_activate(priv, sta_id); 123 iwl_sta_ucode_activate(priv, sta_id);
124 /* fall through */ 124 /* fall through */
125 default: 125 default:
126 IWL_DEBUG_HC("Received REPLY_ADD_STA:(0x%08X)\n", 126 IWL_DEBUG_HC(priv, "Received REPLY_ADD_STA:(0x%08X)\n",
127 res->u.add_sta.status); 127 res->u.add_sta.status);
128 break; 128 break;
129 } 129 }
@@ -166,7 +166,7 @@ int iwl_send_add_sta(struct iwl_priv *priv,
166 switch (res->u.add_sta.status) { 166 switch (res->u.add_sta.status) {
167 case ADD_STA_SUCCESS_MSK: 167 case ADD_STA_SUCCESS_MSK:
168 iwl_sta_ucode_activate(priv, sta->sta.sta_id); 168 iwl_sta_ucode_activate(priv, sta->sta.sta_id);
169 IWL_DEBUG_INFO("REPLY_ADD_STA PASSED\n"); 169 IWL_DEBUG_INFO(priv, "REPLY_ADD_STA PASSED\n");
170 break; 170 break;
171 default: 171 default:
172 ret = -EIO; 172 ret = -EIO;
@@ -272,7 +272,7 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap,
272 272
273 station = &priv->stations[sta_id]; 273 station = &priv->stations[sta_id];
274 station->used = IWL_STA_DRIVER_ACTIVE; 274 station->used = IWL_STA_DRIVER_ACTIVE;
275 IWL_DEBUG_ASSOC("Add STA to driver ID %d: %pM\n", 275 IWL_DEBUG_ASSOC(priv, "Add STA to driver ID %d: %pM\n",
276 sta_id, addr); 276 sta_id, addr);
277 priv->num_stations++; 277 priv->num_stations++;
278 278
@@ -304,7 +304,7 @@ static void iwl_sta_ucode_deactivate(struct iwl_priv *priv, const char *addr)
304 304
305 BUG_ON(sta_id == IWL_INVALID_STATION); 305 BUG_ON(sta_id == IWL_INVALID_STATION);
306 306
307 IWL_DEBUG_ASSOC("Removed STA from Ucode: %pM\n", addr); 307 IWL_DEBUG_ASSOC(priv, "Removed STA from Ucode: %pM\n", addr);
308 308
309 spin_lock_irqsave(&priv->sta_lock, flags); 309 spin_lock_irqsave(&priv->sta_lock, flags);
310 310
@@ -390,7 +390,7 @@ static int iwl_send_remove_station(struct iwl_priv *priv, const u8 *addr,
390 switch (res->u.rem_sta.status) { 390 switch (res->u.rem_sta.status) {
391 case REM_STA_SUCCESS_MSK: 391 case REM_STA_SUCCESS_MSK:
392 iwl_sta_ucode_deactivate(priv, addr); 392 iwl_sta_ucode_deactivate(priv, addr);
393 IWL_DEBUG_ASSOC("REPLY_REMOVE_STA PASSED\n"); 393 IWL_DEBUG_ASSOC(priv, "REPLY_REMOVE_STA PASSED\n");
394 break; 394 break;
395 default: 395 default:
396 ret = -EIO; 396 ret = -EIO;
@@ -432,7 +432,7 @@ int iwl_remove_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
432 if (unlikely(sta_id == IWL_INVALID_STATION)) 432 if (unlikely(sta_id == IWL_INVALID_STATION))
433 goto out; 433 goto out;
434 434
435 IWL_DEBUG_ASSOC("Removing STA from driver:%d %pM\n", 435 IWL_DEBUG_ASSOC(priv, "Removing STA from driver:%d %pM\n",
436 sta_id, addr); 436 sta_id, addr);
437 437
438 if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) { 438 if (!(priv->stations[sta_id].used & IWL_STA_DRIVER_ACTIVE)) {
@@ -560,7 +560,7 @@ int iwl_remove_default_wep_key(struct iwl_priv *priv,
560 priv->default_wep_key--; 560 priv->default_wep_key--;
561 memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0])); 561 memset(&priv->wep_keys[keyconf->keyidx], 0, sizeof(priv->wep_keys[0]));
562 ret = iwl_send_static_wepkey_cmd(priv, 1); 562 ret = iwl_send_static_wepkey_cmd(priv, 1);
563 IWL_DEBUG_WEP("Remove default WEP key: idx=%d ret=%d\n", 563 IWL_DEBUG_WEP(priv, "Remove default WEP key: idx=%d ret=%d\n",
564 keyconf->keyidx, ret); 564 keyconf->keyidx, ret);
565 spin_unlock_irqrestore(&priv->sta_lock, flags); 565 spin_unlock_irqrestore(&priv->sta_lock, flags);
566 566
@@ -576,7 +576,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
576 576
577 if (keyconf->keylen != WEP_KEY_LEN_128 && 577 if (keyconf->keylen != WEP_KEY_LEN_128 &&
578 keyconf->keylen != WEP_KEY_LEN_64) { 578 keyconf->keylen != WEP_KEY_LEN_64) {
579 IWL_DEBUG_WEP("Bad WEP key length %d\n", keyconf->keylen); 579 IWL_DEBUG_WEP(priv, "Bad WEP key length %d\n", keyconf->keylen);
580 return -EINVAL; 580 return -EINVAL;
581 } 581 }
582 582
@@ -596,7 +596,7 @@ int iwl_set_default_wep_key(struct iwl_priv *priv,
596 keyconf->keylen); 596 keyconf->keylen);
597 597
598 ret = iwl_send_static_wepkey_cmd(priv, 0); 598 ret = iwl_send_static_wepkey_cmd(priv, 0);
599 IWL_DEBUG_WEP("Set default WEP key: len=%d idx=%d ret=%d\n", 599 IWL_DEBUG_WEP(priv, "Set default WEP key: len=%d idx=%d ret=%d\n",
600 keyconf->keylen, keyconf->keyidx, ret); 600 keyconf->keylen, keyconf->keyidx, ret);
601 spin_unlock_irqrestore(&priv->sta_lock, flags); 601 spin_unlock_irqrestore(&priv->sta_lock, flags);
602 602
@@ -752,7 +752,7 @@ void iwl_update_tkip_key(struct iwl_priv *priv,
752 752
753 sta_id = iwl_find_station(priv, addr); 753 sta_id = iwl_find_station(priv, addr);
754 if (sta_id == IWL_INVALID_STATION) { 754 if (sta_id == IWL_INVALID_STATION) {
755 IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", 755 IWL_DEBUG_MAC80211(priv, "leave - %pM not in station map.\n",
756 addr); 756 addr);
757 return; 757 return;
758 } 758 }
@@ -804,7 +804,7 @@ int iwl_remove_dynamic_key(struct iwl_priv *priv,
804 key_flags = le16_to_cpu(priv->stations[sta_id].sta.key.key_flags); 804 key_flags = le16_to_cpu(priv->stations[sta_id].sta.key.key_flags);
805 keyidx = (key_flags >> STA_KEY_FLG_KEYID_POS) & 0x3; 805 keyidx = (key_flags >> STA_KEY_FLG_KEYID_POS) & 0x3;
806 806
807 IWL_DEBUG_WEP("Remove dynamic key: idx=%d sta=%d\n", 807 IWL_DEBUG_WEP(priv, "Remove dynamic key: idx=%d sta=%d\n",
808 keyconf->keyidx, sta_id); 808 keyconf->keyidx, sta_id);
809 809
810 if (keyconf->keyidx != keyidx) { 810 if (keyconf->keyidx != keyidx) {
@@ -868,7 +868,7 @@ int iwl_set_dynamic_key(struct iwl_priv *priv,
868 ret = -EINVAL; 868 ret = -EINVAL;
869 } 869 }
870 870
871 IWL_DEBUG_WEP("Set dynamic key: alg= %d len=%d idx=%d sta=%d ret=%d\n", 871 IWL_DEBUG_WEP(priv, "Set dynamic key: alg= %d len=%d idx=%d sta=%d ret=%d\n",
872 keyconf->alg, keyconf->keylen, keyconf->keyidx, 872 keyconf->alg, keyconf->keylen, keyconf->keyidx,
873 sta_id, ret); 873 sta_id, ret);
874 874
@@ -881,13 +881,13 @@ static void iwl_dump_lq_cmd(struct iwl_priv *priv,
881 struct iwl_link_quality_cmd *lq) 881 struct iwl_link_quality_cmd *lq)
882{ 882{
883 int i; 883 int i;
884 IWL_DEBUG_RATE("lq station id 0x%x\n", lq->sta_id); 884 IWL_DEBUG_RATE(priv, "lq station id 0x%x\n", lq->sta_id);
885 IWL_DEBUG_RATE("lq ant 0x%X 0x%X\n", 885 IWL_DEBUG_RATE(priv, "lq ant 0x%X 0x%X\n",
886 lq->general_params.single_stream_ant_msk, 886 lq->general_params.single_stream_ant_msk,
887 lq->general_params.dual_stream_ant_msk); 887 lq->general_params.dual_stream_ant_msk);
888 888
889 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++) 889 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)
890 IWL_DEBUG_RATE("lq index %d 0x%X\n", 890 IWL_DEBUG_RATE(priv, "lq index %d 0x%X\n",
891 i, lq->rs_table[i].rate_n_flags); 891 i, lq->rs_table[i].rate_n_flags);
892} 892}
893#else 893#else
@@ -1064,7 +1064,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
1064 if (sta_id != IWL_INVALID_STATION) 1064 if (sta_id != IWL_INVALID_STATION)
1065 return sta_id; 1065 return sta_id;
1066 1066
1067 IWL_DEBUG_DROP("Station %pM not in station map. " 1067 IWL_DEBUG_DROP(priv, "Station %pM not in station map. "
1068 "Defaulting to broadcast...\n", 1068 "Defaulting to broadcast...\n",
1069 hdr->addr1); 1069 hdr->addr1);
1070 iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 1070 iwl_print_hex_dump(priv, IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));