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