aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2007-10-03 20:59:30 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:51:42 -0400
commit0795af5729b18218767fab27c44b1384f72dc9ad (patch)
tree67c16df84aa6ec219340b8ea1b5cfb0e8150a216 /drivers/net/wireless/iwlwifi
parent95ea36275f3c9a1d3d04c217b4b576c657c4e70e (diff)
[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
This is nicer than the MAC_FMT stuff. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c34
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965-rs.c17
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c73
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c65
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c59
6 files changed, 154 insertions, 99 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index a4f4c8798a83..b0d28ae0b324 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -646,6 +646,7 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
646 struct sta_info *sta; 646 struct sta_info *sta;
647 u16 fc, rate_mask; 647 u16 fc, rate_mask;
648 struct iwl_priv *priv = (struct iwl_priv *)priv_rate; 648 struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
649 DECLARE_MAC_BUF(mac);
649 650
650 IWL_DEBUG_RATE("enter\n"); 651 IWL_DEBUG_RATE("enter\n");
651 652
@@ -681,8 +682,8 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
681 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1); 682 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1);
682 683
683 if (sta_id == IWL_INVALID_STATION) { 684 if (sta_id == IWL_INVALID_STATION) {
684 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 685 IWL_DEBUG_RATE("LQ: ADD station %s\n",
685 MAC_ARG(hdr->addr1)); 686 print_mac(mac, hdr->addr1));
686 sta_id = iwl_add_station(priv, 687 sta_id = iwl_add_station(priv,
687 hdr->addr1, 0, CMD_ASYNC); 688 hdr->addr1, 0, CMD_ASYNC);
688 } 689 }
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 26f03a0b878d..55f7d89aad8d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -457,13 +457,16 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
457 } 457 }
458 458
459 case IEEE80211_STYPE_PROBE_REQ:{ 459 case IEEE80211_STYPE_PROBE_REQ:{
460 DECLARE_MAC_BUF(mac1);
461 DECLARE_MAC_BUF(mac2);
462 DECLARE_MAC_BUF(mac3);
460 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 463 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)
461 IWL_DEBUG_DROP 464 IWL_DEBUG_DROP
462 ("Dropping (non network): " MAC_FMT 465 ("Dropping (non network): %s"
463 ", " MAC_FMT ", " MAC_FMT "\n", 466 ", %s, %s\n",
464 MAC_ARG(header->addr1), 467 print_mac(mac1, header->addr1),
465 MAC_ARG(header->addr2), 468 print_mac(mac2, header->addr2),
466 MAC_ARG(header->addr3)); 469 print_mac(mac3, header->addr3));
467 return; 470 return;
468 } 471 }
469 } 472 }
@@ -474,18 +477,22 @@ static void iwl3945_rx_reply_rx(struct iwl_priv *priv,
474 case IEEE80211_FTYPE_CTL: 477 case IEEE80211_FTYPE_CTL:
475 break; 478 break;
476 479
477 case IEEE80211_FTYPE_DATA: 480 case IEEE80211_FTYPE_DATA: {
481 DECLARE_MAC_BUF(mac1);
482 DECLARE_MAC_BUF(mac2);
483 DECLARE_MAC_BUF(mac3);
484
478 if (unlikely(is_duplicate_packet(priv, header))) 485 if (unlikely(is_duplicate_packet(priv, header)))
479 IWL_DEBUG_DROP("Dropping (dup): " MAC_FMT ", " 486 IWL_DEBUG_DROP("Dropping (dup): %s, %s, %s\n",
480 MAC_FMT ", " MAC_FMT "\n", 487 print_mac(mac1, header->addr1),
481 MAC_ARG(header->addr1), 488 print_mac(mac2, header->addr2),
482 MAC_ARG(header->addr2), 489 print_mac(mac3, header->addr3));
483 MAC_ARG(header->addr3));
484 else 490 else
485 iwl3945_handle_data_packet(priv, 1, rxb, &stats, 491 iwl3945_handle_data_packet(priv, 1, rxb, &stats,
486 phy_flags); 492 phy_flags);
487 break; 493 break;
488 } 494 }
495 }
489} 496}
490 497
491int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr, 498int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
@@ -563,6 +570,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
563 int i; 570 int i;
564 int ret = IWL_INVALID_STATION; 571 int ret = IWL_INVALID_STATION;
565 unsigned long flags; 572 unsigned long flags;
573 DECLARE_MAC_BUF(mac);
566 574
567 spin_lock_irqsave(&priv->sta_lock, flags); 575 spin_lock_irqsave(&priv->sta_lock, flags);
568 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++) 576 for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++)
@@ -573,8 +581,8 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
573 goto out; 581 goto out;
574 } 582 }
575 583
576 IWL_DEBUG_INFO("can not find STA " MAC_FMT " (total %d)\n", 584 IWL_DEBUG_INFO("can not find STA %s (total %d)\n",
577 MAC_ARG(addr), priv->num_stations); 585 print_mac(mac, addr), priv->num_stations);
578 out: 586 out:
579 spin_unlock_irqrestore(&priv->sta_lock, flags); 587 spin_unlock_irqrestore(&priv->sta_lock, flags);
580 return ret; 588 return ret;
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
index f3638607d641..7b74481f5282 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965-rs.c
@@ -1737,10 +1737,11 @@ static struct ieee80211_rate *rs_get_rate(void *priv_rate,
1737 1737
1738 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && !lq->ibss_sta_added) { 1738 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && !lq->ibss_sta_added) {
1739 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1); 1739 u8 sta_id = iwl_hw_find_station(priv, hdr->addr1);
1740 DECLARE_MAC_BUF(mac);
1740 1741
1741 if (sta_id == IWL_INVALID_STATION) { 1742 if (sta_id == IWL_INVALID_STATION) {
1742 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 1743 IWL_DEBUG_RATE("LQ: ADD station %s\n",
1743 MAC_ARG(hdr->addr1)); 1744 print_mac(mac, hdr->addr1));
1744 sta_id = iwl_add_station(priv, 1745 sta_id = iwl_add_station(priv,
1745 hdr->addr1, 0, CMD_ASYNC); 1746 hdr->addr1, 0, CMD_ASYNC);
1746 } 1747 }
@@ -1811,14 +1812,16 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
1811 crl->ibss_sta_added = 0; 1812 crl->ibss_sta_added = 0;
1812 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 1813 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
1813 u8 sta_id = iwl_hw_find_station(priv, sta->addr); 1814 u8 sta_id = iwl_hw_find_station(priv, sta->addr);
1815 DECLARE_MAC_BUF(mac);
1816
1814 /* for IBSS the call are from tasklet */ 1817 /* for IBSS the call are from tasklet */
1815 IWL_DEBUG_HT("LQ: ADD station " MAC_FMT " \n", 1818 IWL_DEBUG_HT("LQ: ADD station %s\n",
1816 MAC_ARG(sta->addr)); 1819 print_mac(mac, sta->addr));
1817 1820
1818 if (sta_id == IWL_INVALID_STATION) { 1821 if (sta_id == IWL_INVALID_STATION) {
1819 IWL_DEBUG_RATE("LQ: ADD station " MAC_FMT "\n", 1822 IWL_DEBUG_RATE("LQ: ADD station %s\n",
1820 MAC_ARG(sta->addr)); 1823 print_mac(mac, sta->addr));
1821 sta_id = iwl_add_station(priv, 1824 sta_id = iwl_add_station(priv,
1822 sta->addr, 0, CMD_ASYNC); 1825 sta->addr, 0, CMD_ASYNC);
1823 } 1826 }
1824 if ((sta_id != IWL_INVALID_STATION)) { 1827 if ((sta_id != IWL_INVALID_STATION)) {
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index ba35b3ac7c7e..e624f2a41e0e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -164,6 +164,7 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
164 int start = 0; 164 int start = 0;
165 int ret = IWL_INVALID_STATION; 165 int ret = IWL_INVALID_STATION;
166 unsigned long flags; 166 unsigned long flags;
167 DECLARE_MAC_BUF(mac);
167 168
168 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || 169 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) ||
169 (priv->iw_mode == IEEE80211_IF_TYPE_AP)) 170 (priv->iw_mode == IEEE80211_IF_TYPE_AP))
@@ -181,8 +182,8 @@ u8 iwl_hw_find_station(struct iwl_priv *priv, const u8 *addr)
181 goto out; 182 goto out;
182 } 183 }
183 184
184 IWL_DEBUG_ASSOC("can not find STA " MAC_FMT " total %d\n", 185 IWL_DEBUG_ASSOC("can not find STA %s total %d\n",
185 MAC_ARG(addr), priv->num_stations); 186 print_mac(mac, addr), priv->num_stations);
186 187
187 out: 188 out:
188 spin_unlock_irqrestore(&priv->sta_lock, flags); 189 spin_unlock_irqrestore(&priv->sta_lock, flags);
@@ -3909,12 +3910,15 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3909 case IEEE80211_STYPE_PROBE_REQ: 3910 case IEEE80211_STYPE_PROBE_REQ:
3910 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 3911 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) &&
3911 !iwl_is_associated(priv)) { 3912 !iwl_is_associated(priv)) {
3913 DECLARE_MAC_BUF(mac1);
3914 DECLARE_MAC_BUF(mac2);
3915 DECLARE_MAC_BUF(mac3);
3916
3912 IWL_DEBUG_DROP("Dropping (non network): " 3917 IWL_DEBUG_DROP("Dropping (non network): "
3913 MAC_FMT ", " MAC_FMT ", " 3918 "%s, %s, %s\n",
3914 MAC_FMT "\n", 3919 print_mac(mac1, header->addr1),
3915 MAC_ARG(header->addr1), 3920 print_mac(mac2, header->addr2),
3916 MAC_ARG(header->addr2), 3921 print_mac(mac3, header->addr3));
3917 MAC_ARG(header->addr3));
3918 return; 3922 return;
3919 } 3923 }
3920 } 3924 }
@@ -3936,28 +3940,31 @@ static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
3936 3940
3937 break; 3941 break;
3938 3942
3939 case IEEE80211_FTYPE_DATA: 3943 case IEEE80211_FTYPE_DATA: {
3944 DECLARE_MAC_BUF(mac1);
3945 DECLARE_MAC_BUF(mac2);
3946 DECLARE_MAC_BUF(mac3);
3947
3940 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 3948 if (priv->iw_mode == IEEE80211_IF_TYPE_AP)
3941 iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, 3949 iwl4965_update_ps_mode(priv, fc & IEEE80211_FCTL_PM,
3942 header->addr2); 3950 header->addr2);
3943 3951
3944 if (unlikely(!network_packet)) 3952 if (unlikely(!network_packet))
3945 IWL_DEBUG_DROP("Dropping (non network): " 3953 IWL_DEBUG_DROP("Dropping (non network): "
3946 MAC_FMT ", " MAC_FMT ", " 3954 "%s, %s, %s\n",
3947 MAC_FMT "\n", 3955 print_mac(mac1, header->addr1),
3948 MAC_ARG(header->addr1), 3956 print_mac(mac2, header->addr2),
3949 MAC_ARG(header->addr2), 3957 print_mac(mac3, header->addr3));
3950 MAC_ARG(header->addr3));
3951 else if (unlikely(is_duplicate_packet(priv, header))) 3958 else if (unlikely(is_duplicate_packet(priv, header)))
3952 IWL_DEBUG_DROP("Dropping (dup): " MAC_FMT ", " 3959 IWL_DEBUG_DROP("Dropping (dup): %s, %s, %s\n",
3953 MAC_FMT ", " MAC_FMT "\n", 3960 print_mac(mac1, header->addr1),
3954 MAC_ARG(header->addr1), 3961 print_mac(mac2, header->addr2),
3955 MAC_ARG(header->addr2), 3962 print_mac(mac3, header->addr3));
3956 MAC_ARG(header->addr3));
3957 else 3963 else
3958 iwl4965_handle_data_packet(priv, 1, include_phy, rxb, 3964 iwl4965_handle_data_packet(priv, 1, include_phy, rxb,
3959 &stats); 3965 &stats);
3960 break; 3966 break;
3967 }
3961 default: 3968 default:
3962 break; 3969 break;
3963 3970
@@ -4106,10 +4113,12 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4106 4113
4107 /* TODO: Need to get this copy more sefely - now good for debug */ 4114 /* TODO: Need to get this copy more sefely - now good for debug */
4108/* 4115/*
4109 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from " MAC_FMT ", 4116 {
4110 sta_id = %d\n", 4117 DECLARE_MAC_BUF(mac);
4118 IWL_DEBUG_TX_REPLY("REPLY_COMPRESSED_BA [%d]Received from %s, "
4119 "sta_id = %d\n",
4111 agg->wait_for_ba, 4120 agg->wait_for_ba,
4112 MAC_ARG((u8*) &ba_resp->sta_addr_lo32), 4121 print_mac(mac, (u8*) &ba_resp->sta_addr_lo32),
4113 ba_resp->sta_id); 4122 ba_resp->sta_id);
4114 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = " 4123 IWL_DEBUG_TX_REPLY("TID = %d, SeqCtl = %d, bitmap = 0x%X%X, scd_flow = "
4115 "%d, scd_ssn = %d\n", 4124 "%d, scd_ssn = %d\n",
@@ -4123,6 +4132,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
4123 agg->start_idx, 4132 agg->start_idx,
4124 agg->bitmap1, 4133 agg->bitmap1,
4125 agg->bitmap0); 4134 agg->bitmap0);
4135 }
4126*/ 4136*/
4127 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp); 4137 iwl4965_tx_status_reply_compressed_ba(priv, agg, ba_resp);
4128 /* releases all the TFDs until the SSN */ 4138 /* releases all the TFDs until the SSN */
@@ -4539,14 +4549,15 @@ int iwl_mac_ht_tx_agg_start(struct ieee80211_hw *hw, u8 *da, u16 tid,
4539 int ssn = -1; 4549 int ssn = -1;
4540 unsigned long flags; 4550 unsigned long flags;
4541 struct iwl_tid_data *tid_data; 4551 struct iwl_tid_data *tid_data;
4552 DECLARE_MAC_BUF(mac);
4542 4553
4543 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo))) 4554 if (likely(tid < ARRAY_SIZE(default_tid_to_tx_fifo)))
4544 tx_fifo = default_tid_to_tx_fifo[tid]; 4555 tx_fifo = default_tid_to_tx_fifo[tid];
4545 else 4556 else
4546 return -EINVAL; 4557 return -EINVAL;
4547 4558
4548 IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=" MAC_FMT 4559 IWL_WARNING("iwl-AGG iwl_mac_ht_tx_agg_start on da=%s"
4549 " tid=%d\n", MAC_ARG(da), tid); 4560 " tid=%d\n", print_mac(mac, da), tid);
4550 4561
4551 sta_id = iwl_hw_find_station(priv, da); 4562 sta_id = iwl_hw_find_station(priv, da);
4552 if (sta_id == IWL_INVALID_STATION) 4563 if (sta_id == IWL_INVALID_STATION)
@@ -4577,6 +4588,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid,
4577 int tx_fifo_id, txq_id, sta_id, ssn = -1; 4588 int tx_fifo_id, txq_id, sta_id, ssn = -1;
4578 struct iwl_tid_data *tid_data; 4589 struct iwl_tid_data *tid_data;
4579 int rc; 4590 int rc;
4591 DECLARE_MAC_BUF(mac);
4592
4580 if (!da) { 4593 if (!da) {
4581 IWL_ERROR("%s: da = NULL\n", __func__); 4594 IWL_ERROR("%s: da = NULL\n", __func__);
4582 return -EINVAL; 4595 return -EINVAL;
@@ -4602,8 +4615,8 @@ int iwl_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, u8 *da, u16 tid,
4602 return rc; 4615 return rc;
4603 4616
4604 iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA); 4617 iwl4965_ba_status(priv, tid, BA_STATUS_INITIATOR_DELBA);
4605 IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=" MAC_FMT " tid=%d\n", 4618 IWL_DEBUG_INFO("iwl_mac_ht_tx_agg_stop on da=%s tid=%d\n",
4606 MAC_ARG(da), tid); 4619 print_mac(mac, da), tid);
4607 4620
4608 return 0; 4621 return 0;
4609} 4622}
@@ -4613,9 +4626,10 @@ int iwl_mac_ht_rx_agg_start(struct ieee80211_hw *hw, u8 *da,
4613{ 4626{
4614 struct iwl_priv *priv = hw->priv; 4627 struct iwl_priv *priv = hw->priv;
4615 int sta_id; 4628 int sta_id;
4629 DECLARE_MAC_BUF(mac);
4616 4630
4617 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=" MAC_FMT 4631 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_start on da=%s"
4618 " tid=%d\n", MAC_ARG(da), tid); 4632 " tid=%d\n", print_mac(mac, da), tid);
4619 sta_id = iwl_hw_find_station(priv, da); 4633 sta_id = iwl_hw_find_station(priv, da);
4620 iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num); 4634 iwl4965_sta_modify_add_ba_tid(priv, sta_id, tid, start_seq_num);
4621 return 0; 4635 return 0;
@@ -4626,9 +4640,10 @@ int iwl_mac_ht_rx_agg_stop(struct ieee80211_hw *hw, u8 *da,
4626{ 4640{
4627 struct iwl_priv *priv = hw->priv; 4641 struct iwl_priv *priv = hw->priv;
4628 int sta_id; 4642 int sta_id;
4643 DECLARE_MAC_BUF(mac);
4629 4644
4630 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=" MAC_FMT " tid=%d\n", 4645 IWL_WARNING("iwl-AGG iwl_mac_ht_rx_agg_stop on da=%s tid=%d\n",
4631 MAC_ARG(da), tid); 4646 print_mac(mac, da), tid);
4632 sta_id = iwl_hw_find_station(priv, da); 4647 sta_id = iwl_hw_find_station(priv, da);
4633 iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid); 4648 iwl4965_sta_modify_del_ba_tid(priv, sta_id, tid);
4634 return 0; 4649 return 0;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 474b6402040c..cc405f4a8647 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -460,6 +460,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
460 int index = IWL_INVALID_STATION; 460 int index = IWL_INVALID_STATION;
461 struct iwl_station_entry *station; 461 struct iwl_station_entry *station;
462 unsigned long flags_spin; 462 unsigned long flags_spin;
463 DECLARE_MAC_BUF(mac);
463 464
464 spin_lock_irqsave(&priv->sta_lock, flags_spin); 465 spin_lock_irqsave(&priv->sta_lock, flags_spin);
465 if (is_ap) 466 if (is_ap)
@@ -492,7 +493,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
492 return index; 493 return index;
493 } 494 }
494 495
495 IWL_DEBUG_ASSOC("Add STA ID %d: " MAC_FMT "\n", index, MAC_ARG(addr)); 496 IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr));
496 station = &priv->stations[index]; 497 station = &priv->stations[index];
497 station->used = 1; 498 station->used = 1;
498 priv->num_stations++; 499 priv->num_stations++;
@@ -1064,6 +1065,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1064 /* cast away the const for active_rxon in this function */ 1065 /* cast away the const for active_rxon in this function */
1065 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1066 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
1066 int rc = 0; 1067 int rc = 0;
1068 DECLARE_MAC_BUF(mac);
1067 1069
1068 if (!iwl_is_alive(priv)) 1070 if (!iwl_is_alive(priv))
1069 return -1; 1071 return -1;
@@ -1134,11 +1136,11 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1134 IWL_DEBUG_INFO("Sending RXON\n" 1136 IWL_DEBUG_INFO("Sending RXON\n"
1135 "* with%s RXON_FILTER_ASSOC_MSK\n" 1137 "* with%s RXON_FILTER_ASSOC_MSK\n"
1136 "* channel = %d\n" 1138 "* channel = %d\n"
1137 "* bssid = " MAC_FMT "\n", 1139 "* bssid = %s\n",
1138 ((priv->staging_rxon.filter_flags & 1140 ((priv->staging_rxon.filter_flags &
1139 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1141 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1140 le16_to_cpu(priv->staging_rxon.channel), 1142 le16_to_cpu(priv->staging_rxon.channel),
1141 MAC_ARG(priv->staging_rxon.bssid_addr)); 1143 print_mac(mac, priv->staging_rxon.bssid_addr));
1142 1144
1143 /* Apply the new configuration */ 1145 /* Apply the new configuration */
1144 rc = iwl_send_cmd_pdu(priv, REPLY_RXON, 1146 rc = iwl_send_cmd_pdu(priv, REPLY_RXON,
@@ -2693,7 +2695,9 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2693 2695
2694 /* If this frame is part of a IBSS network, then we use the 2696 /* If this frame is part of a IBSS network, then we use the
2695 * target specific station id */ 2697 * target specific station id */
2696 case IEEE80211_IF_TYPE_IBSS: 2698 case IEEE80211_IF_TYPE_IBSS: {
2699 DECLARE_MAC_BUF(mac);
2700
2697 sta_id = iwl_hw_find_station(priv, hdr->addr1); 2701 sta_id = iwl_hw_find_station(priv, hdr->addr1);
2698 if (sta_id != IWL_INVALID_STATION) 2702 if (sta_id != IWL_INVALID_STATION)
2699 return sta_id; 2703 return sta_id;
@@ -2703,12 +2707,12 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2703 if (sta_id != IWL_INVALID_STATION) 2707 if (sta_id != IWL_INVALID_STATION)
2704 return sta_id; 2708 return sta_id;
2705 2709
2706 IWL_DEBUG_DROP("Station " MAC_FMT " not in station map. " 2710 IWL_DEBUG_DROP("Station %s not in station map. "
2707 "Defaulting to broadcast...\n", 2711 "Defaulting to broadcast...\n",
2708 MAC_ARG(hdr->addr1)); 2712 print_mac(mac, hdr->addr1));
2709 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2713 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2710 return priv->hw_setting.bcast_sta_id; 2714 return priv->hw_setting.bcast_sta_id;
2711 2715 }
2712 default: 2716 default:
2713 IWL_WARNING("Unkown mode of operation: %d", priv->iw_mode); 2717 IWL_WARNING("Unkown mode of operation: %d", priv->iw_mode);
2714 return priv->hw_setting.bcast_sta_id; 2718 return priv->hw_setting.bcast_sta_id;
@@ -2781,8 +2785,10 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2781 hdr_len = ieee80211_get_hdrlen(fc); 2785 hdr_len = ieee80211_get_hdrlen(fc);
2782 sta_id = iwl_get_sta_id(priv, hdr); 2786 sta_id = iwl_get_sta_id(priv, hdr);
2783 if (sta_id == IWL_INVALID_STATION) { 2787 if (sta_id == IWL_INVALID_STATION) {
2784 IWL_DEBUG_DROP("Dropping - INVALID STATION: " MAC_FMT "\n", 2788 DECLARE_MAC_BUF(mac);
2785 MAC_ARG(hdr->addr1)); 2789
2790 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
2791 print_mac(mac, hdr->addr1));
2786 goto drop; 2792 goto drop;
2787 } 2793 }
2788 2794
@@ -4385,6 +4391,8 @@ int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4385#ifdef CONFIG_IWLWIFI_DEBUG 4391#ifdef CONFIG_IWLWIFI_DEBUG
4386static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4392static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4387{ 4393{
4394 DECLARE_MAC_BUF(mac);
4395
4388 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4396 IWL_DEBUG_RADIO("RX CONFIG:\n");
4389 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4397 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4390 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4398 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
@@ -4395,10 +4403,10 @@ static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4395 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 4403 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
4396 rxon->ofdm_basic_rates); 4404 rxon->ofdm_basic_rates);
4397 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 4405 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
4398 IWL_DEBUG_RADIO("u8[6] node_addr: " MAC_FMT "\n", 4406 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n",
4399 MAC_ARG(rxon->node_addr)); 4407 print_mac(mac, rxon->node_addr));
4400 IWL_DEBUG_RADIO("u8[6] bssid_addr: " MAC_FMT "\n", 4408 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
4401 MAC_ARG(rxon->bssid_addr)); 4409 print_mac(mac, rxon->bssid_addr));
4402 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 4410 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4403} 4411}
4404#endif 4412#endif
@@ -6322,6 +6330,7 @@ static void iwl_down(struct iwl_priv *priv)
6322 6330
6323static int __iwl_up(struct iwl_priv *priv) 6331static int __iwl_up(struct iwl_priv *priv)
6324{ 6332{
6333 DECLARE_MAC_BUF(mac);
6325 int rc, i; 6334 int rc, i;
6326 6335
6327 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) { 6336 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) {
@@ -6381,8 +6390,8 @@ static int __iwl_up(struct iwl_priv *priv)
6381 6390
6382 /* MAC Address location in EEPROM same for 3945/4965 */ 6391 /* MAC Address location in EEPROM same for 3945/4965 */
6383 get_eeprom_mac(priv, priv->mac_addr); 6392 get_eeprom_mac(priv, priv->mac_addr);
6384 IWL_DEBUG_INFO("MAC address: " MAC_FMT "\n", 6393 IWL_DEBUG_INFO("MAC address: %s\n",
6385 MAC_ARG(priv->mac_addr)); 6394 print_mac(mac, priv->mac_addr));
6386 6395
6387 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 6396 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
6388 6397
@@ -6728,6 +6737,7 @@ static void iwl_bg_post_associate(struct work_struct *data)
6728 6737
6729 int rc = 0; 6738 int rc = 0;
6730 struct ieee80211_conf *conf = NULL; 6739 struct ieee80211_conf *conf = NULL;
6740 DECLARE_MAC_BUF(mac);
6731 6741
6732 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 6742 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
6733 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); 6743 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__);
@@ -6735,8 +6745,9 @@ static void iwl_bg_post_associate(struct work_struct *data)
6735 } 6745 }
6736 6746
6737 6747
6738 IWL_DEBUG_ASSOC("Associated as %d to: " MAC_FMT "\n", 6748 IWL_DEBUG_ASSOC("Associated as %d to: %s\n",
6739 priv->assoc_id, MAC_ARG(priv->active_rxon.bssid_addr)); 6749 priv->assoc_id,
6750 print_mac(mac, priv->active_rxon.bssid_addr));
6740 6751
6741 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 6752 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
6742 return; 6753 return;
@@ -6916,11 +6927,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw,
6916{ 6927{
6917 struct iwl_priv *priv = hw->priv; 6928 struct iwl_priv *priv = hw->priv;
6918 unsigned long flags; 6929 unsigned long flags;
6930 DECLARE_MAC_BUF(mac);
6919 6931
6920 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); 6932 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type);
6921 if (conf->mac_addr) 6933 if (conf->mac_addr)
6922 IWL_DEBUG_MAC80211("enter: MAC " MAC_FMT "\n", 6934 IWL_DEBUG_MAC80211("enter: MAC %s\n",
6923 MAC_ARG(conf->mac_addr)); 6935 print_mac(mac, conf->mac_addr));
6924 6936
6925 if (priv->interface_id) { 6937 if (priv->interface_id) {
6926 IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); 6938 IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
@@ -7094,6 +7106,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7094 struct ieee80211_if_conf *conf) 7106 struct ieee80211_if_conf *conf)
7095{ 7107{
7096 struct iwl_priv *priv = hw->priv; 7108 struct iwl_priv *priv = hw->priv;
7109 DECLARE_MAC_BUF(mac);
7097 unsigned long flags; 7110 unsigned long flags;
7098 int rc; 7111 int rc;
7099 7112
@@ -7111,8 +7124,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7111 7124
7112 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id); 7125 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id);
7113 if (conf->bssid) 7126 if (conf->bssid)
7114 IWL_DEBUG_MAC80211("bssid: " MAC_FMT "\n", 7127 IWL_DEBUG_MAC80211("bssid: %s\n",
7115 MAC_ARG(conf->bssid)); 7128 print_mac(mac, conf->bssid));
7116 7129
7117 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && 7130 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) &&
7118 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 7131 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
@@ -7131,8 +7144,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7131 if (!conf->bssid) { 7144 if (!conf->bssid) {
7132 conf->bssid = priv->mac_addr; 7145 conf->bssid = priv->mac_addr;
7133 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 7146 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
7134 IWL_DEBUG_MAC80211("bssid was set to: " MAC_FMT "\n", 7147 IWL_DEBUG_MAC80211("bssid was set to: %s\n",
7135 MAC_ARG(conf->bssid)); 7148 print_mac(mac, conf->bssid));
7136 } 7149 }
7137 if (priv->ibss_beacon) 7150 if (priv->ibss_beacon)
7138 dev_kfree_skb(priv->ibss_beacon); 7151 dev_kfree_skb(priv->ibss_beacon);
@@ -7282,8 +7295,10 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7282 7295
7283 sta_id = iwl_hw_find_station(priv, addr); 7296 sta_id = iwl_hw_find_station(priv, addr);
7284 if (sta_id == IWL_INVALID_STATION) { 7297 if (sta_id == IWL_INVALID_STATION) {
7285 IWL_DEBUG_MAC80211("leave - " MAC_FMT " not in station map.\n", 7298 DECLARE_MAC_BUF(mac);
7286 MAC_ARG(addr)); 7299
7300 IWL_DEBUG_MAC80211("leave - %s not in station map.\n",
7301 print_mac(mac, addr));
7287 return -EINVAL; 7302 return -EINVAL;
7288 } 7303 }
7289 7304
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index b79dabc8c01c..6cea3118b7c1 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -459,6 +459,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
459 int index = IWL_INVALID_STATION; 459 int index = IWL_INVALID_STATION;
460 struct iwl_station_entry *station; 460 struct iwl_station_entry *station;
461 unsigned long flags_spin; 461 unsigned long flags_spin;
462 DECLARE_MAC_BUF(mac);
462 463
463 spin_lock_irqsave(&priv->sta_lock, flags_spin); 464 spin_lock_irqsave(&priv->sta_lock, flags_spin);
464 if (is_ap) 465 if (is_ap)
@@ -493,7 +494,7 @@ u8 iwl_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap, u8 flags)
493 } 494 }
494 495
495 496
496 IWL_DEBUG_ASSOC("Add STA ID %d: " MAC_FMT "\n", index, MAC_ARG(addr)); 497 IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr));
497 station = &priv->stations[index]; 498 station = &priv->stations[index];
498 station->used = 1; 499 station->used = 1;
499 priv->num_stations++; 500 priv->num_stations++;
@@ -1083,6 +1084,7 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1083{ 1084{
1084 /* cast away the const for active_rxon in this function */ 1085 /* cast away the const for active_rxon in this function */
1085 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon; 1086 struct iwl_rxon_cmd *active_rxon = (void *)&priv->active_rxon;
1087 DECLARE_MAC_BUF(mac);
1086 int rc = 0; 1088 int rc = 0;
1087 1089
1088 if (!iwl_is_alive(priv)) 1090 if (!iwl_is_alive(priv))
@@ -1160,11 +1162,11 @@ static int iwl_commit_rxon(struct iwl_priv *priv)
1160 IWL_DEBUG_INFO("Sending RXON\n" 1162 IWL_DEBUG_INFO("Sending RXON\n"
1161 "* with%s RXON_FILTER_ASSOC_MSK\n" 1163 "* with%s RXON_FILTER_ASSOC_MSK\n"
1162 "* channel = %d\n" 1164 "* channel = %d\n"
1163 "* bssid = " MAC_FMT "\n", 1165 "* bssid = %s\n",
1164 ((priv->staging_rxon.filter_flags & 1166 ((priv->staging_rxon.filter_flags &
1165 RXON_FILTER_ASSOC_MSK) ? "" : "out"), 1167 RXON_FILTER_ASSOC_MSK) ? "" : "out"),
1166 le16_to_cpu(priv->staging_rxon.channel), 1168 le16_to_cpu(priv->staging_rxon.channel),
1167 MAC_ARG(priv->staging_rxon.bssid_addr)); 1169 print_mac(mac, priv->staging_rxon.bssid_addr));
1168 1170
1169 /* Apply the new configuration */ 1171 /* Apply the new configuration */
1170 rc = iwl_send_cmd_pdu(priv, REPLY_RXON, 1172 rc = iwl_send_cmd_pdu(priv, REPLY_RXON,
@@ -2748,6 +2750,7 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2748{ 2750{
2749 int sta_id; 2751 int sta_id;
2750 u16 fc = le16_to_cpu(hdr->frame_control); 2752 u16 fc = le16_to_cpu(hdr->frame_control);
2753 DECLARE_MAC_BUF(mac);
2751 2754
2752 /* If this frame is broadcast or not data then use the broadcast 2755 /* If this frame is broadcast or not data then use the broadcast
2753 * station id */ 2756 * station id */
@@ -2781,9 +2784,9 @@ static int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
2781 if (sta_id != IWL_INVALID_STATION) 2784 if (sta_id != IWL_INVALID_STATION)
2782 return sta_id; 2785 return sta_id;
2783 2786
2784 IWL_DEBUG_DROP("Station " MAC_FMT " not in station map. " 2787 IWL_DEBUG_DROP("Station %s not in station map. "
2785 "Defaulting to broadcast...\n", 2788 "Defaulting to broadcast...\n",
2786 MAC_ARG(hdr->addr1)); 2789 print_mac(mac, hdr->addr1));
2787 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); 2790 iwl_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr));
2788 return priv->hw_setting.bcast_sta_id; 2791 return priv->hw_setting.bcast_sta_id;
2789 2792
@@ -2859,8 +2862,10 @@ static int iwl_tx_skb(struct iwl_priv *priv,
2859 hdr_len = ieee80211_get_hdrlen(fc); 2862 hdr_len = ieee80211_get_hdrlen(fc);
2860 sta_id = iwl_get_sta_id(priv, hdr); 2863 sta_id = iwl_get_sta_id(priv, hdr);
2861 if (sta_id == IWL_INVALID_STATION) { 2864 if (sta_id == IWL_INVALID_STATION) {
2862 IWL_DEBUG_DROP("Dropping - INVALID STATION: " MAC_FMT "\n", 2865 DECLARE_MAC_BUF(mac);
2863 MAC_ARG(hdr->addr1)); 2866
2867 IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n",
2868 print_mac(mac, hdr->addr1));
2864 goto drop; 2869 goto drop;
2865 } 2870 }
2866 2871
@@ -4703,6 +4708,8 @@ int iwl_tx_queue_update_write_ptr(struct iwl_priv *priv,
4703#ifdef CONFIG_IWLWIFI_DEBUG 4708#ifdef CONFIG_IWLWIFI_DEBUG
4704static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon) 4709static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4705{ 4710{
4711 DECLARE_MAC_BUF(mac);
4712
4706 IWL_DEBUG_RADIO("RX CONFIG:\n"); 4713 IWL_DEBUG_RADIO("RX CONFIG:\n");
4707 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); 4714 iwl_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon));
4708 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); 4715 IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel));
@@ -4713,10 +4720,10 @@ static void iwl_print_rx_config_cmd(struct iwl_rxon_cmd *rxon)
4713 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", 4720 IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n",
4714 rxon->ofdm_basic_rates); 4721 rxon->ofdm_basic_rates);
4715 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); 4722 IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates);
4716 IWL_DEBUG_RADIO("u8[6] node_addr: " MAC_FMT "\n", 4723 IWL_DEBUG_RADIO("u8[6] node_addr: %s\n",
4717 MAC_ARG(rxon->node_addr)); 4724 print_mac(mac, rxon->node_addr));
4718 IWL_DEBUG_RADIO("u8[6] bssid_addr: " MAC_FMT "\n", 4725 IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n",
4719 MAC_ARG(rxon->bssid_addr)); 4726 print_mac(mac, rxon->bssid_addr));
4720 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); 4727 IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id));
4721} 4728}
4722#endif 4729#endif
@@ -6670,6 +6677,7 @@ static void iwl_down(struct iwl_priv *priv)
6670 6677
6671static int __iwl_up(struct iwl_priv *priv) 6678static int __iwl_up(struct iwl_priv *priv)
6672{ 6679{
6680 DECLARE_MAC_BUF(mac);
6673 int rc, i; 6681 int rc, i;
6674 u32 hw_rf_kill = 0; 6682 u32 hw_rf_kill = 0;
6675 6683
@@ -6742,8 +6750,8 @@ static int __iwl_up(struct iwl_priv *priv)
6742 6750
6743 /* MAC Address location in EEPROM same for 3945/4965 */ 6751 /* MAC Address location in EEPROM same for 3945/4965 */
6744 get_eeprom_mac(priv, priv->mac_addr); 6752 get_eeprom_mac(priv, priv->mac_addr);
6745 IWL_DEBUG_INFO("MAC address: " MAC_FMT "\n", 6753 IWL_DEBUG_INFO("MAC address: %s\n",
6746 MAC_ARG(priv->mac_addr)); 6754 print_mac(mac, priv->mac_addr));
6747 6755
6748 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); 6756 SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
6749 6757
@@ -7096,14 +7104,16 @@ static void iwl_bg_post_associate(struct work_struct *data)
7096 7104
7097 int rc = 0; 7105 int rc = 0;
7098 struct ieee80211_conf *conf = NULL; 7106 struct ieee80211_conf *conf = NULL;
7107 DECLARE_MAC_BUF(mac);
7099 7108
7100 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 7109 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) {
7101 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__); 7110 IWL_ERROR("%s Should not be called in AP mode\n", __FUNCTION__);
7102 return; 7111 return;
7103 } 7112 }
7104 7113
7105 IWL_DEBUG_ASSOC("Associated as %d to: " MAC_FMT "\n", 7114 IWL_DEBUG_ASSOC("Associated as %d to: %s\n",
7106 priv->assoc_id, MAC_ARG(priv->active_rxon.bssid_addr)); 7115 priv->assoc_id,
7116 print_mac(mac, priv->active_rxon.bssid_addr));
7107 7117
7108 7118
7109 if (test_bit(STATUS_EXIT_PENDING, &priv->status)) 7119 if (test_bit(STATUS_EXIT_PENDING, &priv->status))
@@ -7299,11 +7309,12 @@ static int iwl_mac_add_interface(struct ieee80211_hw *hw,
7299{ 7309{
7300 struct iwl_priv *priv = hw->priv; 7310 struct iwl_priv *priv = hw->priv;
7301 unsigned long flags; 7311 unsigned long flags;
7312 DECLARE_MAC_BUF(mac);
7302 7313
7303 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type); 7314 IWL_DEBUG_MAC80211("enter: id %d, type %d\n", conf->if_id, conf->type);
7304 if (conf->mac_addr) 7315 if (conf->mac_addr)
7305 IWL_DEBUG_MAC80211("enter: MAC " MAC_FMT "\n", 7316 IWL_DEBUG_MAC80211("enter: MAC %s\n",
7306 MAC_ARG(conf->mac_addr)); 7317 print_mac(mac, conf->mac_addr));
7307 7318
7308 if (priv->interface_id) { 7319 if (priv->interface_id) {
7309 IWL_DEBUG_MAC80211("leave - interface_id != 0\n"); 7320 IWL_DEBUG_MAC80211("leave - interface_id != 0\n");
@@ -7494,6 +7505,7 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7494 struct ieee80211_if_conf *conf) 7505 struct ieee80211_if_conf *conf)
7495{ 7506{
7496 struct iwl_priv *priv = hw->priv; 7507 struct iwl_priv *priv = hw->priv;
7508 DECLARE_MAC_BUF(mac);
7497 unsigned long flags; 7509 unsigned long flags;
7498 int rc; 7510 int rc;
7499 7511
@@ -7511,8 +7523,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7511 7523
7512 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id); 7524 IWL_DEBUG_MAC80211("enter: interface id %d\n", if_id);
7513 if (conf->bssid) 7525 if (conf->bssid)
7514 IWL_DEBUG_MAC80211("bssid: " MAC_FMT "\n", 7526 IWL_DEBUG_MAC80211("bssid: %s\n",
7515 MAC_ARG(conf->bssid)); 7527 print_mac(mac, conf->bssid));
7516 7528
7517 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) && 7529 if (unlikely(test_bit(STATUS_SCANNING, &priv->status)) &&
7518 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 7530 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
@@ -7531,8 +7543,8 @@ static int iwl_mac_config_interface(struct ieee80211_hw *hw, int if_id,
7531 if (!conf->bssid) { 7543 if (!conf->bssid) {
7532 conf->bssid = priv->mac_addr; 7544 conf->bssid = priv->mac_addr;
7533 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 7545 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
7534 IWL_DEBUG_MAC80211("bssid was set to: " MAC_FMT "\n", 7546 IWL_DEBUG_MAC80211("bssid was set to: %s\n",
7535 MAC_ARG(conf->bssid)); 7547 print_mac(mac, conf->bssid));
7536 } 7548 }
7537 if (priv->ibss_beacon) 7549 if (priv->ibss_beacon)
7538 dev_kfree_skb(priv->ibss_beacon); 7550 dev_kfree_skb(priv->ibss_beacon);
@@ -7666,6 +7678,7 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7666 struct ieee80211_key_conf *key) 7678 struct ieee80211_key_conf *key)
7667{ 7679{
7668 struct iwl_priv *priv = hw->priv; 7680 struct iwl_priv *priv = hw->priv;
7681 DECLARE_MAC_BUF(mac);
7669 int rc = 0; 7682 int rc = 0;
7670 u8 sta_id; 7683 u8 sta_id;
7671 7684
@@ -7682,8 +7695,8 @@ static int iwl_mac_set_key(struct ieee80211_hw *hw, set_key_cmd cmd,
7682 7695
7683 sta_id = iwl_hw_find_station(priv, addr); 7696 sta_id = iwl_hw_find_station(priv, addr);
7684 if (sta_id == IWL_INVALID_STATION) { 7697 if (sta_id == IWL_INVALID_STATION) {
7685 IWL_DEBUG_MAC80211("leave - " MAC_FMT " not in station map.\n", 7698 IWL_DEBUG_MAC80211("leave - %s not in station map.\n",
7686 MAC_ARG(addr)); 7699 print_mac(mac, addr));
7687 return -EINVAL; 7700 return -EINVAL;
7688 } 7701 }
7689 7702