diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
| -rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 54 |
1 files changed, 18 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d15a2c997954..d3a2966d9181 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
| @@ -446,7 +446,6 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8 | |||
| 446 | int index = IWL_INVALID_STATION; | 446 | int index = IWL_INVALID_STATION; |
| 447 | struct iwl3945_station_entry *station; | 447 | struct iwl3945_station_entry *station; |
| 448 | unsigned long flags_spin; | 448 | unsigned long flags_spin; |
| 449 | DECLARE_MAC_BUF(mac); | ||
| 450 | u8 rate; | 449 | u8 rate; |
| 451 | 450 | ||
| 452 | spin_lock_irqsave(&priv->sta_lock, flags_spin); | 451 | spin_lock_irqsave(&priv->sta_lock, flags_spin); |
| @@ -480,7 +479,7 @@ u8 iwl3945_add_station(struct iwl3945_priv *priv, const u8 *addr, int is_ap, u8 | |||
| 480 | return index; | 479 | return index; |
| 481 | } | 480 | } |
| 482 | 481 | ||
| 483 | IWL_DEBUG_ASSOC("Add STA ID %d: %s\n", index, print_mac(mac, addr)); | 482 | IWL_DEBUG_ASSOC("Add STA ID %d: %pM\n", index, addr); |
| 484 | station = &priv->stations[index]; | 483 | station = &priv->stations[index]; |
| 485 | station->used = 1; | 484 | station->used = 1; |
| 486 | priv->num_stations++; | 485 | priv->num_stations++; |
| @@ -1063,7 +1062,6 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv) | |||
| 1063 | /* cast away the const for active_rxon in this function */ | 1062 | /* cast away the const for active_rxon in this function */ |
| 1064 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; | 1063 | struct iwl3945_rxon_cmd *active_rxon = (void *)&priv->active_rxon; |
| 1065 | int rc = 0; | 1064 | int rc = 0; |
| 1066 | DECLARE_MAC_BUF(mac); | ||
| 1067 | 1065 | ||
| 1068 | if (!iwl3945_is_alive(priv)) | 1066 | if (!iwl3945_is_alive(priv)) |
| 1069 | return -1; | 1067 | return -1; |
| @@ -1124,11 +1122,11 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv) | |||
| 1124 | IWL_DEBUG_INFO("Sending RXON\n" | 1122 | IWL_DEBUG_INFO("Sending RXON\n" |
| 1125 | "* with%s RXON_FILTER_ASSOC_MSK\n" | 1123 | "* with%s RXON_FILTER_ASSOC_MSK\n" |
| 1126 | "* channel = %d\n" | 1124 | "* channel = %d\n" |
| 1127 | "* bssid = %s\n", | 1125 | "* bssid = %pM\n", |
| 1128 | ((priv->staging_rxon.filter_flags & | 1126 | ((priv->staging_rxon.filter_flags & |
| 1129 | RXON_FILTER_ASSOC_MSK) ? "" : "out"), | 1127 | RXON_FILTER_ASSOC_MSK) ? "" : "out"), |
| 1130 | le16_to_cpu(priv->staging_rxon.channel), | 1128 | le16_to_cpu(priv->staging_rxon.channel), |
| 1131 | print_mac(mac, priv->staging_rxon.bssid_addr)); | 1129 | priv->staging_rxon.bssid_addr); |
| 1132 | 1130 | ||
| 1133 | /* Apply the new configuration */ | 1131 | /* Apply the new configuration */ |
| 1134 | rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON, | 1132 | rc = iwl3945_send_cmd_pdu(priv, REPLY_RXON, |
| @@ -2482,8 +2480,6 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h | |||
| 2482 | /* If this frame is going out to an IBSS network, find the station, | 2480 | /* If this frame is going out to an IBSS network, find the station, |
| 2483 | * or create a new station table entry */ | 2481 | * or create a new station table entry */ |
| 2484 | case NL80211_IFTYPE_ADHOC: { | 2482 | case NL80211_IFTYPE_ADHOC: { |
| 2485 | DECLARE_MAC_BUF(mac); | ||
| 2486 | |||
| 2487 | /* Create new station table entry */ | 2483 | /* Create new station table entry */ |
| 2488 | sta_id = iwl3945_hw_find_station(priv, hdr->addr1); | 2484 | sta_id = iwl3945_hw_find_station(priv, hdr->addr1); |
| 2489 | if (sta_id != IWL_INVALID_STATION) | 2485 | if (sta_id != IWL_INVALID_STATION) |
| @@ -2494,9 +2490,9 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h | |||
| 2494 | if (sta_id != IWL_INVALID_STATION) | 2490 | if (sta_id != IWL_INVALID_STATION) |
| 2495 | return sta_id; | 2491 | return sta_id; |
| 2496 | 2492 | ||
| 2497 | IWL_DEBUG_DROP("Station %s not in station map. " | 2493 | IWL_DEBUG_DROP("Station %pM not in station map. " |
| 2498 | "Defaulting to broadcast...\n", | 2494 | "Defaulting to broadcast...\n", |
| 2499 | print_mac(mac, hdr->addr1)); | 2495 | hdr->addr1); |
| 2500 | iwl3945_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); | 2496 | iwl3945_print_hex_dump(IWL_DL_DROP, (u8 *) hdr, sizeof(*hdr)); |
| 2501 | return priv->hw_setting.bcast_sta_id; | 2497 | return priv->hw_setting.bcast_sta_id; |
| 2502 | } | 2498 | } |
| @@ -2579,10 +2575,8 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb) | |||
| 2579 | /* Find (or create) index into station table for destination station */ | 2575 | /* Find (or create) index into station table for destination station */ |
| 2580 | sta_id = iwl3945_get_sta_id(priv, hdr); | 2576 | sta_id = iwl3945_get_sta_id(priv, hdr); |
| 2581 | if (sta_id == IWL_INVALID_STATION) { | 2577 | if (sta_id == IWL_INVALID_STATION) { |
| 2582 | DECLARE_MAC_BUF(mac); | 2578 | IWL_DEBUG_DROP("Dropping - INVALID STATION: %pM\n", |
| 2583 | 2579 | hdr->addr1); | |
| 2584 | IWL_DEBUG_DROP("Dropping - INVALID STATION: %s\n", | ||
| 2585 | print_mac(mac, hdr->addr1)); | ||
| 2586 | goto drop; | 2580 | goto drop; |
| 2587 | } | 2581 | } |
| 2588 | 2582 | ||
| @@ -4019,8 +4013,6 @@ static int iwl3945_tx_queue_update_write_ptr(struct iwl3945_priv *priv, | |||
| 4019 | #ifdef CONFIG_IWL3945_DEBUG | 4013 | #ifdef CONFIG_IWL3945_DEBUG |
| 4020 | static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon) | 4014 | static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon) |
| 4021 | { | 4015 | { |
| 4022 | DECLARE_MAC_BUF(mac); | ||
| 4023 | |||
| 4024 | IWL_DEBUG_RADIO("RX CONFIG:\n"); | 4016 | IWL_DEBUG_RADIO("RX CONFIG:\n"); |
| 4025 | iwl3945_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); | 4017 | iwl3945_print_hex_dump(IWL_DL_RADIO, (u8 *) rxon, sizeof(*rxon)); |
| 4026 | IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); | 4018 | IWL_DEBUG_RADIO("u16 channel: 0x%x\n", le16_to_cpu(rxon->channel)); |
| @@ -4031,10 +4023,8 @@ static void iwl3945_print_rx_config_cmd(struct iwl3945_rxon_cmd *rxon) | |||
| 4031 | IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", | 4023 | IWL_DEBUG_RADIO("u8 ofdm_basic_rates: 0x%02x\n", |
| 4032 | rxon->ofdm_basic_rates); | 4024 | rxon->ofdm_basic_rates); |
| 4033 | IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); | 4025 | IWL_DEBUG_RADIO("u8 cck_basic_rates: 0x%02x\n", rxon->cck_basic_rates); |
| 4034 | IWL_DEBUG_RADIO("u8[6] node_addr: %s\n", | 4026 | IWL_DEBUG_RADIO("u8[6] node_addr: %pM\n", rxon->node_addr); |
| 4035 | print_mac(mac, rxon->node_addr)); | 4027 | IWL_DEBUG_RADIO("u8[6] bssid_addr: %pM\n", rxon->bssid_addr); |
| 4036 | IWL_DEBUG_RADIO("u8[6] bssid_addr: %s\n", | ||
| 4037 | print_mac(mac, rxon->bssid_addr)); | ||
| 4038 | IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); | 4028 | IWL_DEBUG_RADIO("u16 assoc_id: 0x%x\n", le16_to_cpu(rxon->assoc_id)); |
| 4039 | } | 4029 | } |
| 4040 | #endif | 4030 | #endif |
| @@ -6321,7 +6311,6 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv) | |||
| 6321 | { | 6311 | { |
| 6322 | int rc = 0; | 6312 | int rc = 0; |
| 6323 | struct ieee80211_conf *conf = NULL; | 6313 | struct ieee80211_conf *conf = NULL; |
| 6324 | DECLARE_MAC_BUF(mac); | ||
| 6325 | 6314 | ||
| 6326 | if (priv->iw_mode == NL80211_IFTYPE_AP) { | 6315 | if (priv->iw_mode == NL80211_IFTYPE_AP) { |
| 6327 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); | 6316 | IWL_ERROR("%s Should not be called in AP mode\n", __func__); |
| @@ -6329,9 +6318,8 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv) | |||
| 6329 | } | 6318 | } |
| 6330 | 6319 | ||
| 6331 | 6320 | ||
| 6332 | IWL_DEBUG_ASSOC("Associated as %d to: %s\n", | 6321 | IWL_DEBUG_ASSOC("Associated as %d to: %pM\n", |
| 6333 | priv->assoc_id, | 6322 | priv->assoc_id, priv->active_rxon.bssid_addr); |
| 6334 | print_mac(mac, priv->active_rxon.bssid_addr)); | ||
| 6335 | 6323 | ||
| 6336 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 6324 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
| 6337 | return; | 6325 | return; |
| @@ -6592,7 +6580,6 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
| 6592 | { | 6580 | { |
| 6593 | struct iwl3945_priv *priv = hw->priv; | 6581 | struct iwl3945_priv *priv = hw->priv; |
| 6594 | unsigned long flags; | 6582 | unsigned long flags; |
| 6595 | DECLARE_MAC_BUF(mac); | ||
| 6596 | 6583 | ||
| 6597 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); | 6584 | IWL_DEBUG_MAC80211("enter: type %d\n", conf->type); |
| 6598 | 6585 | ||
| @@ -6609,7 +6596,7 @@ static int iwl3945_mac_add_interface(struct ieee80211_hw *hw, | |||
| 6609 | mutex_lock(&priv->mutex); | 6596 | mutex_lock(&priv->mutex); |
| 6610 | 6597 | ||
| 6611 | if (conf->mac_addr) { | 6598 | if (conf->mac_addr) { |
| 6612 | IWL_DEBUG_MAC80211("Set: %s\n", print_mac(mac, conf->mac_addr)); | 6599 | IWL_DEBUG_MAC80211("Set: %pM\n", conf->mac_addr); |
| 6613 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); | 6600 | memcpy(priv->mac_addr, conf->mac_addr, ETH_ALEN); |
| 6614 | } | 6601 | } |
| 6615 | 6602 | ||
| @@ -6778,7 +6765,6 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
| 6778 | struct ieee80211_if_conf *conf) | 6765 | struct ieee80211_if_conf *conf) |
| 6779 | { | 6766 | { |
| 6780 | struct iwl3945_priv *priv = hw->priv; | 6767 | struct iwl3945_priv *priv = hw->priv; |
| 6781 | DECLARE_MAC_BUF(mac); | ||
| 6782 | unsigned long flags; | 6768 | unsigned long flags; |
| 6783 | int rc; | 6769 | int rc; |
| 6784 | 6770 | ||
| @@ -6816,8 +6802,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
| 6816 | mutex_lock(&priv->mutex); | 6802 | mutex_lock(&priv->mutex); |
| 6817 | 6803 | ||
| 6818 | if (conf->bssid) | 6804 | if (conf->bssid) |
| 6819 | IWL_DEBUG_MAC80211("bssid: %s\n", | 6805 | IWL_DEBUG_MAC80211("bssid: %pM\n", conf->bssid); |
| 6820 | print_mac(mac, conf->bssid)); | ||
| 6821 | 6806 | ||
| 6822 | /* | 6807 | /* |
| 6823 | * very dubious code was here; the probe filtering flag is never set: | 6808 | * very dubious code was here; the probe filtering flag is never set: |
| @@ -6830,8 +6815,8 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw, | |||
| 6830 | if (!conf->bssid) { | 6815 | if (!conf->bssid) { |
| 6831 | conf->bssid = priv->mac_addr; | 6816 | conf->bssid = priv->mac_addr; |
| 6832 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); | 6817 | memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); |
| 6833 | IWL_DEBUG_MAC80211("bssid was set to: %s\n", | 6818 | IWL_DEBUG_MAC80211("bssid was set to: %pM\n", |
| 6834 | print_mac(mac, conf->bssid)); | 6819 | conf->bssid); |
| 6835 | } | 6820 | } |
| 6836 | if (priv->ibss_beacon) | 6821 | if (priv->ibss_beacon) |
| 6837 | dev_kfree_skb(priv->ibss_beacon); | 6822 | dev_kfree_skb(priv->ibss_beacon); |
| @@ -7072,10 +7057,8 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd, | |||
| 7072 | 7057 | ||
| 7073 | sta_id = iwl3945_hw_find_station(priv, addr); | 7058 | sta_id = iwl3945_hw_find_station(priv, addr); |
| 7074 | if (sta_id == IWL_INVALID_STATION) { | 7059 | if (sta_id == IWL_INVALID_STATION) { |
| 7075 | DECLARE_MAC_BUF(mac); | 7060 | IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", |
| 7076 | 7061 | addr); | |
| 7077 | IWL_DEBUG_MAC80211("leave - %s not in station map.\n", | ||
| 7078 | print_mac(mac, addr)); | ||
| 7079 | return -EINVAL; | 7062 | return -EINVAL; |
| 7080 | } | 7063 | } |
| 7081 | 7064 | ||
| @@ -7870,7 +7853,6 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
| 7870 | struct ieee80211_hw *hw; | 7853 | struct ieee80211_hw *hw; |
| 7871 | struct iwl_3945_cfg *cfg = (struct iwl_3945_cfg *)(ent->driver_data); | 7854 | struct iwl_3945_cfg *cfg = (struct iwl_3945_cfg *)(ent->driver_data); |
| 7872 | unsigned long flags; | 7855 | unsigned long flags; |
| 7873 | DECLARE_MAC_BUF(mac); | ||
| 7874 | 7856 | ||
| 7875 | /* Disabling hardware scan means that mac80211 will perform scans | 7857 | /* Disabling hardware scan means that mac80211 will perform scans |
| 7876 | * "the hard way", rather than using device's scan. */ | 7858 | * "the hard way", rather than using device's scan. */ |
| @@ -8045,7 +8027,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e | |||
| 8045 | } | 8027 | } |
| 8046 | /* MAC Address location in EEPROM same for 3945/4965 */ | 8028 | /* MAC Address location in EEPROM same for 3945/4965 */ |
| 8047 | get_eeprom_mac(priv, priv->mac_addr); | 8029 | get_eeprom_mac(priv, priv->mac_addr); |
| 8048 | IWL_DEBUG_INFO("MAC address: %s\n", print_mac(mac, priv->mac_addr)); | 8030 | IWL_DEBUG_INFO("MAC address: %pM\n", priv->mac_addr); |
| 8049 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); | 8031 | SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr); |
| 8050 | 8032 | ||
| 8051 | err = iwl3945_init_channel_map(priv); | 8033 | err = iwl3945_init_channel_map(priv); |
