aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c59
1 files changed, 36 insertions, 23 deletions
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