diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-10-27 18:56:10 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-27 20:06:16 -0400 |
commit | 0c68ae2605dbcf67414d8d1f19af93be44b355fb (patch) | |
tree | 19175d53668f5358d346929e5db01d8fe41cb2aa /net/mac80211/mlme.c | |
parent | dd45c9cf687682c9ce256ab14bd8914db77410bb (diff) |
mac80211: convert to %pM away from print_mac
Also remove a few stray DECLARE_MAC_BUF that were no longer
used at all.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mac80211/mlme.c')
-rw-r--r-- | net/mac80211/mlme.c | 121 |
1 files changed, 47 insertions, 74 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 87665d7bb4f9..6ad2619db85f 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -575,18 +575,16 @@ static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata, | |||
575 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; | 575 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; |
576 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 576 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
577 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; | 577 | struct ieee80211_if_sta *ifsta = &sdata->u.sta; |
578 | DECLARE_MAC_BUF(mac); | ||
579 | #endif | 578 | #endif |
580 | u32 changed = 0; | 579 | u32 changed = 0; |
581 | 580 | ||
582 | if (use_protection != bss_conf->use_cts_prot) { | 581 | if (use_protection != bss_conf->use_cts_prot) { |
583 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 582 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
584 | if (net_ratelimit()) { | 583 | if (net_ratelimit()) { |
585 | printk(KERN_DEBUG "%s: CTS protection %s (BSSID=" | 584 | printk(KERN_DEBUG "%s: CTS protection %s (BSSID=%pM)\n", |
586 | "%s)\n", | ||
587 | sdata->dev->name, | 585 | sdata->dev->name, |
588 | use_protection ? "enabled" : "disabled", | 586 | use_protection ? "enabled" : "disabled", |
589 | print_mac(mac, ifsta->bssid)); | 587 | ifsta->bssid); |
590 | } | 588 | } |
591 | #endif | 589 | #endif |
592 | bss_conf->use_cts_prot = use_protection; | 590 | bss_conf->use_cts_prot = use_protection; |
@@ -597,10 +595,10 @@ static u32 ieee80211_handle_protect_preamb(struct ieee80211_sub_if_data *sdata, | |||
597 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 595 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
598 | if (net_ratelimit()) { | 596 | if (net_ratelimit()) { |
599 | printk(KERN_DEBUG "%s: switched to %s barker preamble" | 597 | printk(KERN_DEBUG "%s: switched to %s barker preamble" |
600 | " (BSSID=%s)\n", | 598 | " (BSSID=%pM)\n", |
601 | sdata->dev->name, | 599 | sdata->dev->name, |
602 | use_short_preamble ? "short" : "long", | 600 | use_short_preamble ? "short" : "long", |
603 | print_mac(mac, ifsta->bssid)); | 601 | ifsta->bssid); |
604 | } | 602 | } |
605 | #endif | 603 | #endif |
606 | bss_conf->use_short_preamble = use_short_preamble; | 604 | bss_conf->use_short_preamble = use_short_preamble; |
@@ -760,18 +758,16 @@ static void ieee80211_set_associated(struct ieee80211_sub_if_data *sdata, | |||
760 | static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, | 758 | static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, |
761 | struct ieee80211_if_sta *ifsta) | 759 | struct ieee80211_if_sta *ifsta) |
762 | { | 760 | { |
763 | DECLARE_MAC_BUF(mac); | ||
764 | |||
765 | ifsta->direct_probe_tries++; | 761 | ifsta->direct_probe_tries++; |
766 | if (ifsta->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) { | 762 | if (ifsta->direct_probe_tries > IEEE80211_AUTH_MAX_TRIES) { |
767 | printk(KERN_DEBUG "%s: direct probe to AP %s timed out\n", | 763 | printk(KERN_DEBUG "%s: direct probe to AP %pM timed out\n", |
768 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 764 | sdata->dev->name, ifsta->bssid); |
769 | ifsta->state = IEEE80211_STA_MLME_DISABLED; | 765 | ifsta->state = IEEE80211_STA_MLME_DISABLED; |
770 | return; | 766 | return; |
771 | } | 767 | } |
772 | 768 | ||
773 | printk(KERN_DEBUG "%s: direct probe to AP %s try %d\n", | 769 | printk(KERN_DEBUG "%s: direct probe to AP %pM try %d\n", |
774 | sdata->dev->name, print_mac(mac, ifsta->bssid), | 770 | sdata->dev->name, ifsta->bssid, |
775 | ifsta->direct_probe_tries); | 771 | ifsta->direct_probe_tries); |
776 | 772 | ||
777 | ifsta->state = IEEE80211_STA_MLME_DIRECT_PROBE; | 773 | ifsta->state = IEEE80211_STA_MLME_DIRECT_PROBE; |
@@ -791,20 +787,18 @@ static void ieee80211_direct_probe(struct ieee80211_sub_if_data *sdata, | |||
791 | static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata, | 787 | static void ieee80211_authenticate(struct ieee80211_sub_if_data *sdata, |
792 | struct ieee80211_if_sta *ifsta) | 788 | struct ieee80211_if_sta *ifsta) |
793 | { | 789 | { |
794 | DECLARE_MAC_BUF(mac); | ||
795 | |||
796 | ifsta->auth_tries++; | 790 | ifsta->auth_tries++; |
797 | if (ifsta->auth_tries > IEEE80211_AUTH_MAX_TRIES) { | 791 | if (ifsta->auth_tries > IEEE80211_AUTH_MAX_TRIES) { |
798 | printk(KERN_DEBUG "%s: authentication with AP %s" | 792 | printk(KERN_DEBUG "%s: authentication with AP %pM" |
799 | " timed out\n", | 793 | " timed out\n", |
800 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 794 | sdata->dev->name, ifsta->bssid); |
801 | ifsta->state = IEEE80211_STA_MLME_DISABLED; | 795 | ifsta->state = IEEE80211_STA_MLME_DISABLED; |
802 | return; | 796 | return; |
803 | } | 797 | } |
804 | 798 | ||
805 | ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE; | 799 | ifsta->state = IEEE80211_STA_MLME_AUTHENTICATE; |
806 | printk(KERN_DEBUG "%s: authenticate with AP %s\n", | 800 | printk(KERN_DEBUG "%s: authenticate with AP %pM\n", |
807 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 801 | sdata->dev->name, ifsta->bssid); |
808 | 802 | ||
809 | ieee80211_send_auth(sdata, ifsta, 1, NULL, 0, 0); | 803 | ieee80211_send_auth(sdata, ifsta, 1, NULL, 0, 0); |
810 | 804 | ||
@@ -914,20 +908,18 @@ static int ieee80211_privacy_mismatch(struct ieee80211_sub_if_data *sdata, | |||
914 | static void ieee80211_associate(struct ieee80211_sub_if_data *sdata, | 908 | static void ieee80211_associate(struct ieee80211_sub_if_data *sdata, |
915 | struct ieee80211_if_sta *ifsta) | 909 | struct ieee80211_if_sta *ifsta) |
916 | { | 910 | { |
917 | DECLARE_MAC_BUF(mac); | ||
918 | |||
919 | ifsta->assoc_tries++; | 911 | ifsta->assoc_tries++; |
920 | if (ifsta->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) { | 912 | if (ifsta->assoc_tries > IEEE80211_ASSOC_MAX_TRIES) { |
921 | printk(KERN_DEBUG "%s: association with AP %s" | 913 | printk(KERN_DEBUG "%s: association with AP %pM" |
922 | " timed out\n", | 914 | " timed out\n", |
923 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 915 | sdata->dev->name, ifsta->bssid); |
924 | ifsta->state = IEEE80211_STA_MLME_DISABLED; | 916 | ifsta->state = IEEE80211_STA_MLME_DISABLED; |
925 | return; | 917 | return; |
926 | } | 918 | } |
927 | 919 | ||
928 | ifsta->state = IEEE80211_STA_MLME_ASSOCIATE; | 920 | ifsta->state = IEEE80211_STA_MLME_ASSOCIATE; |
929 | printk(KERN_DEBUG "%s: associate with AP %s\n", | 921 | printk(KERN_DEBUG "%s: associate with AP %pM\n", |
930 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 922 | sdata->dev->name, ifsta->bssid); |
931 | if (ieee80211_privacy_mismatch(sdata, ifsta)) { | 923 | if (ieee80211_privacy_mismatch(sdata, ifsta)) { |
932 | printk(KERN_DEBUG "%s: mismatch in privacy configuration and " | 924 | printk(KERN_DEBUG "%s: mismatch in privacy configuration and " |
933 | "mixed-cell disabled - abort association\n", sdata->dev->name); | 925 | "mixed-cell disabled - abort association\n", sdata->dev->name); |
@@ -947,7 +939,6 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata, | |||
947 | struct ieee80211_local *local = sdata->local; | 939 | struct ieee80211_local *local = sdata->local; |
948 | struct sta_info *sta; | 940 | struct sta_info *sta; |
949 | int disassoc; | 941 | int disassoc; |
950 | DECLARE_MAC_BUF(mac); | ||
951 | 942 | ||
952 | /* TODO: start monitoring current AP signal quality and number of | 943 | /* TODO: start monitoring current AP signal quality and number of |
953 | * missed beacons. Scan other channels every now and then and search | 944 | * missed beacons. Scan other channels every now and then and search |
@@ -960,8 +951,8 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata, | |||
960 | 951 | ||
961 | sta = sta_info_get(local, ifsta->bssid); | 952 | sta = sta_info_get(local, ifsta->bssid); |
962 | if (!sta) { | 953 | if (!sta) { |
963 | printk(KERN_DEBUG "%s: No STA entry for own AP %s\n", | 954 | printk(KERN_DEBUG "%s: No STA entry for own AP %pM\n", |
964 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 955 | sdata->dev->name, ifsta->bssid); |
965 | disassoc = 1; | 956 | disassoc = 1; |
966 | } else { | 957 | } else { |
967 | disassoc = 0; | 958 | disassoc = 0; |
@@ -969,9 +960,9 @@ static void ieee80211_associated(struct ieee80211_sub_if_data *sdata, | |||
969 | sta->last_rx + IEEE80211_MONITORING_INTERVAL)) { | 960 | sta->last_rx + IEEE80211_MONITORING_INTERVAL)) { |
970 | if (ifsta->flags & IEEE80211_STA_PROBEREQ_POLL) { | 961 | if (ifsta->flags & IEEE80211_STA_PROBEREQ_POLL) { |
971 | printk(KERN_DEBUG "%s: No ProbeResp from " | 962 | printk(KERN_DEBUG "%s: No ProbeResp from " |
972 | "current AP %s - assume out of " | 963 | "current AP %pM - assume out of " |
973 | "range\n", | 964 | "range\n", |
974 | sdata->dev->name, print_mac(mac, ifsta->bssid)); | 965 | sdata->dev->name, ifsta->bssid); |
975 | disassoc = 1; | 966 | disassoc = 1; |
976 | } else | 967 | } else |
977 | ieee80211_send_probe_req(sdata, ifsta->bssid, | 968 | ieee80211_send_probe_req(sdata, ifsta->bssid, |
@@ -1032,7 +1023,6 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata, | |||
1032 | size_t len) | 1023 | size_t len) |
1033 | { | 1024 | { |
1034 | u16 auth_alg, auth_transaction, status_code; | 1025 | u16 auth_alg, auth_transaction, status_code; |
1035 | DECLARE_MAC_BUF(mac); | ||
1036 | 1026 | ||
1037 | if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE && | 1027 | if (ifsta->state != IEEE80211_STA_MLME_AUTHENTICATE && |
1038 | sdata->vif.type != NL80211_IFTYPE_ADHOC) | 1028 | sdata->vif.type != NL80211_IFTYPE_ADHOC) |
@@ -1125,7 +1115,6 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata, | |||
1125 | size_t len) | 1115 | size_t len) |
1126 | { | 1116 | { |
1127 | u16 reason_code; | 1117 | u16 reason_code; |
1128 | DECLARE_MAC_BUF(mac); | ||
1129 | 1118 | ||
1130 | if (len < 24 + 2) | 1119 | if (len < 24 + 2) |
1131 | return; | 1120 | return; |
@@ -1157,7 +1146,6 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata, | |||
1157 | size_t len) | 1146 | size_t len) |
1158 | { | 1147 | { |
1159 | u16 reason_code; | 1148 | u16 reason_code; |
1160 | DECLARE_MAC_BUF(mac); | ||
1161 | 1149 | ||
1162 | if (len < 24 + 2) | 1150 | if (len < 24 + 2) |
1163 | return; | 1151 | return; |
@@ -1195,7 +1183,6 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1195 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; | 1183 | struct ieee80211_bss_conf *bss_conf = &sdata->bss_conf; |
1196 | u8 *pos; | 1184 | u8 *pos; |
1197 | int i, j; | 1185 | int i, j; |
1198 | DECLARE_MAC_BUF(mac); | ||
1199 | bool have_higher_than_11mbit = false; | 1186 | bool have_higher_than_11mbit = false; |
1200 | 1187 | ||
1201 | /* AssocResp and ReassocResp have identical structure, so process both | 1188 | /* AssocResp and ReassocResp have identical structure, so process both |
@@ -1214,9 +1201,9 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
1214 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); | 1201 | status_code = le16_to_cpu(mgmt->u.assoc_resp.status_code); |
1215 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); | 1202 | aid = le16_to_cpu(mgmt->u.assoc_resp.aid); |
1216 | 1203 | ||
1217 | printk(KERN_DEBUG "%s: RX %sssocResp from %s (capab=0x%x " | 1204 | printk(KERN_DEBUG "%s: RX %sssocResp from %pM (capab=0x%x " |
1218 | "status=%d aid=%d)\n", | 1205 | "status=%d aid=%d)\n", |
1219 | sdata->dev->name, reassoc ? "Rea" : "A", print_mac(mac, mgmt->sa), | 1206 | sdata->dev->name, reassoc ? "Rea" : "A", mgmt->sa, |
1220 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); | 1207 | capab_info, status_code, (u16)(aid & ~(BIT(15) | BIT(14)))); |
1221 | 1208 | ||
1222 | if (status_code != WLAN_STATUS_SUCCESS) { | 1209 | if (status_code != WLAN_STATUS_SUCCESS) { |
@@ -1507,8 +1494,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1507 | u64 beacon_timestamp, rx_timestamp; | 1494 | u64 beacon_timestamp, rx_timestamp; |
1508 | u64 supp_rates = 0; | 1495 | u64 supp_rates = 0; |
1509 | enum ieee80211_band band = rx_status->band; | 1496 | enum ieee80211_band band = rx_status->band; |
1510 | DECLARE_MAC_BUF(mac); | ||
1511 | DECLARE_MAC_BUF(mac2); | ||
1512 | 1497 | ||
1513 | if (elems->ds_params && elems->ds_params_len == 1) | 1498 | if (elems->ds_params && elems->ds_params_len == 1) |
1514 | freq = ieee80211_channel_to_frequency(elems->ds_params[0]); | 1499 | freq = ieee80211_channel_to_frequency(elems->ds_params[0]); |
@@ -1538,10 +1523,10 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1538 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1523 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1539 | if (sta->sta.supp_rates[band] != prev_rates) | 1524 | if (sta->sta.supp_rates[band] != prev_rates) |
1540 | printk(KERN_DEBUG "%s: updated supp_rates set " | 1525 | printk(KERN_DEBUG "%s: updated supp_rates set " |
1541 | "for %s based on beacon info (0x%llx | " | 1526 | "for %pM based on beacon info (0x%llx | " |
1542 | "0x%llx -> 0x%llx)\n", | 1527 | "0x%llx -> 0x%llx)\n", |
1543 | sdata->dev->name, | 1528 | sdata->dev->name, |
1544 | print_mac(mac, sta->sta.addr), | 1529 | sta->sta.addr, |
1545 | (unsigned long long) prev_rates, | 1530 | (unsigned long long) prev_rates, |
1546 | (unsigned long long) supp_rates, | 1531 | (unsigned long long) supp_rates, |
1547 | (unsigned long long) sta->sta.supp_rates[band]); | 1532 | (unsigned long long) sta->sta.supp_rates[band]); |
@@ -1605,10 +1590,9 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1605 | /* can't merge without knowing the TSF */ | 1590 | /* can't merge without knowing the TSF */ |
1606 | rx_timestamp = -1LLU; | 1591 | rx_timestamp = -1LLU; |
1607 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1592 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1608 | printk(KERN_DEBUG "RX beacon SA=%s BSSID=" | 1593 | printk(KERN_DEBUG "RX beacon SA=%pM BSSID=" |
1609 | "%s TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n", | 1594 | "%pM TSF=0x%llx BCN=0x%llx diff=%lld @%lu\n", |
1610 | print_mac(mac, mgmt->sa), | 1595 | mgmt->sa, mgmt->bssid, |
1611 | print_mac(mac2, mgmt->bssid), | ||
1612 | (unsigned long long)rx_timestamp, | 1596 | (unsigned long long)rx_timestamp, |
1613 | (unsigned long long)beacon_timestamp, | 1597 | (unsigned long long)beacon_timestamp, |
1614 | (unsigned long long)(rx_timestamp - beacon_timestamp), | 1598 | (unsigned long long)(rx_timestamp - beacon_timestamp), |
@@ -1617,8 +1601,8 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
1617 | if (beacon_timestamp > rx_timestamp) { | 1601 | if (beacon_timestamp > rx_timestamp) { |
1618 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1602 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1619 | printk(KERN_DEBUG "%s: beacon TSF higher than " | 1603 | printk(KERN_DEBUG "%s: beacon TSF higher than " |
1620 | "local TSF - IBSS merge with BSSID %s\n", | 1604 | "local TSF - IBSS merge with BSSID %pM\n", |
1621 | sdata->dev->name, print_mac(mac, mgmt->bssid)); | 1605 | sdata->dev->name, mgmt->bssid); |
1622 | #endif | 1606 | #endif |
1623 | ieee80211_sta_join_ibss(sdata, &sdata->u.sta, bss); | 1607 | ieee80211_sta_join_ibss(sdata, &sdata->u.sta, bss); |
1624 | ieee80211_ibss_add_sta(sdata, NULL, | 1608 | ieee80211_ibss_add_sta(sdata, NULL, |
@@ -1727,11 +1711,6 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
1727 | struct sk_buff *skb; | 1711 | struct sk_buff *skb; |
1728 | struct ieee80211_mgmt *resp; | 1712 | struct ieee80211_mgmt *resp; |
1729 | u8 *pos, *end; | 1713 | u8 *pos, *end; |
1730 | DECLARE_MAC_BUF(mac); | ||
1731 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | ||
1732 | DECLARE_MAC_BUF(mac2); | ||
1733 | DECLARE_MAC_BUF(mac3); | ||
1734 | #endif | ||
1735 | 1714 | ||
1736 | if (sdata->vif.type != NL80211_IFTYPE_ADHOC || | 1715 | if (sdata->vif.type != NL80211_IFTYPE_ADHOC || |
1737 | ifsta->state != IEEE80211_STA_MLME_IBSS_JOINED || | 1716 | ifsta->state != IEEE80211_STA_MLME_IBSS_JOINED || |
@@ -1744,10 +1723,10 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
1744 | tx_last_beacon = 1; | 1723 | tx_last_beacon = 1; |
1745 | 1724 | ||
1746 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1725 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1747 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%s DA=%s BSSID=" | 1726 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM" |
1748 | "%s (tx_last_beacon=%d)\n", | 1727 | " (tx_last_beacon=%d)\n", |
1749 | sdata->dev->name, print_mac(mac, mgmt->sa), print_mac(mac2, mgmt->da), | 1728 | sdata->dev->name, mgmt->sa, mgmt->da, |
1750 | print_mac(mac3, mgmt->bssid), tx_last_beacon); | 1729 | mgmt->bssid, tx_last_beacon); |
1751 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 1730 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
1752 | 1731 | ||
1753 | if (!tx_last_beacon) | 1732 | if (!tx_last_beacon) |
@@ -1763,8 +1742,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
1763 | pos + 2 + pos[1] > end) { | 1742 | pos + 2 + pos[1] > end) { |
1764 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1743 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1765 | printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " | 1744 | printk(KERN_DEBUG "%s: Invalid SSID IE in ProbeReq " |
1766 | "from %s\n", | 1745 | "from %pM\n", |
1767 | sdata->dev->name, print_mac(mac, mgmt->sa)); | 1746 | sdata->dev->name, mgmt->sa); |
1768 | #endif | 1747 | #endif |
1769 | return; | 1748 | return; |
1770 | } | 1749 | } |
@@ -1783,8 +1762,8 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
1783 | resp = (struct ieee80211_mgmt *) skb->data; | 1762 | resp = (struct ieee80211_mgmt *) skb->data; |
1784 | memcpy(resp->da, mgmt->sa, ETH_ALEN); | 1763 | memcpy(resp->da, mgmt->sa, ETH_ALEN); |
1785 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 1764 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
1786 | printk(KERN_DEBUG "%s: Sending ProbeResp to %s\n", | 1765 | printk(KERN_DEBUG "%s: Sending ProbeResp to %pM\n", |
1787 | sdata->dev->name, print_mac(mac, resp->da)); | 1766 | sdata->dev->name, resp->da); |
1788 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 1767 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
1789 | ieee80211_tx_skb(sdata, skb, 0); | 1768 | ieee80211_tx_skb(sdata, skb, 0); |
1790 | } | 1769 | } |
@@ -1990,7 +1969,6 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata, | |||
1990 | u8 bssid[ETH_ALEN], *pos; | 1969 | u8 bssid[ETH_ALEN], *pos; |
1991 | int i; | 1970 | int i; |
1992 | int ret; | 1971 | int ret; |
1993 | DECLARE_MAC_BUF(mac); | ||
1994 | 1972 | ||
1995 | #if 0 | 1973 | #if 0 |
1996 | /* Easier testing, use fixed BSSID. */ | 1974 | /* Easier testing, use fixed BSSID. */ |
@@ -2006,8 +1984,8 @@ static int ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata, | |||
2006 | bssid[0] |= 0x02; | 1984 | bssid[0] |= 0x02; |
2007 | #endif | 1985 | #endif |
2008 | 1986 | ||
2009 | printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %s\n", | 1987 | printk(KERN_DEBUG "%s: Creating new IBSS network, BSSID %pM\n", |
2010 | sdata->dev->name, print_mac(mac, bssid)); | 1988 | sdata->dev->name, bssid); |
2011 | 1989 | ||
2012 | bss = ieee80211_rx_bss_add(local, bssid, | 1990 | bss = ieee80211_rx_bss_add(local, bssid, |
2013 | local->hw.conf.channel->center_freq, | 1991 | local->hw.conf.channel->center_freq, |
@@ -2050,8 +2028,6 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata, | |||
2050 | int found = 0; | 2028 | int found = 0; |
2051 | u8 bssid[ETH_ALEN]; | 2029 | u8 bssid[ETH_ALEN]; |
2052 | int active_ibss; | 2030 | int active_ibss; |
2053 | DECLARE_MAC_BUF(mac); | ||
2054 | DECLARE_MAC_BUF(mac2); | ||
2055 | 2031 | ||
2056 | if (ifsta->ssid_len == 0) | 2032 | if (ifsta->ssid_len == 0) |
2057 | return -EINVAL; | 2033 | return -EINVAL; |
@@ -2068,8 +2044,7 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata, | |||
2068 | || !(bss->capability & WLAN_CAPABILITY_IBSS)) | 2044 | || !(bss->capability & WLAN_CAPABILITY_IBSS)) |
2069 | continue; | 2045 | continue; |
2070 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 2046 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
2071 | printk(KERN_DEBUG " bssid=%s found\n", | 2047 | printk(KERN_DEBUG " bssid=%pM found\n", bss->bssid); |
2072 | print_mac(mac, bss->bssid)); | ||
2073 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 2048 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
2074 | memcpy(bssid, bss->bssid, ETH_ALEN); | 2049 | memcpy(bssid, bss->bssid, ETH_ALEN); |
2075 | found = 1; | 2050 | found = 1; |
@@ -2080,9 +2055,8 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata, | |||
2080 | 2055 | ||
2081 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 2056 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
2082 | if (found) | 2057 | if (found) |
2083 | printk(KERN_DEBUG " sta_find_ibss: selected %s current " | 2058 | printk(KERN_DEBUG " sta_find_ibss: selected %pM current " |
2084 | "%s\n", print_mac(mac, bssid), | 2059 | "%pM\n", bssid, ifsta->bssid); |
2085 | print_mac(mac2, ifsta->bssid)); | ||
2086 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ | 2060 | #endif /* CONFIG_MAC80211_IBSS_DEBUG */ |
2087 | 2061 | ||
2088 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { | 2062 | if (found && memcmp(ifsta->bssid, bssid, ETH_ALEN) != 0) { |
@@ -2099,9 +2073,9 @@ static int ieee80211_sta_find_ibss(struct ieee80211_sub_if_data *sdata, | |||
2099 | if (!bss) | 2073 | if (!bss) |
2100 | goto dont_join; | 2074 | goto dont_join; |
2101 | 2075 | ||
2102 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" | 2076 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %pM" |
2103 | " based on configured SSID\n", | 2077 | " based on configured SSID\n", |
2104 | sdata->dev->name, print_mac(mac, bssid)); | 2078 | sdata->dev->name, bssid); |
2105 | ret = ieee80211_sta_join_ibss(sdata, ifsta, bss); | 2079 | ret = ieee80211_sta_join_ibss(sdata, ifsta, bss); |
2106 | ieee80211_rx_bss_put(local, bss); | 2080 | ieee80211_rx_bss_put(local, bss); |
2107 | return ret; | 2081 | return ret; |
@@ -2343,7 +2317,6 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
2343 | { | 2317 | { |
2344 | struct ieee80211_local *local = sdata->local; | 2318 | struct ieee80211_local *local = sdata->local; |
2345 | struct sta_info *sta; | 2319 | struct sta_info *sta; |
2346 | DECLARE_MAC_BUF(mac); | ||
2347 | int band = local->hw.conf.channel->band; | 2320 | int band = local->hw.conf.channel->band; |
2348 | 2321 | ||
2349 | /* TODO: Could consider removing the least recently used entry and | 2322 | /* TODO: Could consider removing the least recently used entry and |
@@ -2351,7 +2324,7 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
2351 | if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { | 2324 | if (local->num_sta >= IEEE80211_IBSS_MAX_STA_ENTRIES) { |
2352 | if (net_ratelimit()) { | 2325 | if (net_ratelimit()) { |
2353 | printk(KERN_DEBUG "%s: No room for a new IBSS STA " | 2326 | printk(KERN_DEBUG "%s: No room for a new IBSS STA " |
2354 | "entry %s\n", sdata->dev->name, print_mac(mac, addr)); | 2327 | "entry %pM\n", sdata->dev->name, addr); |
2355 | } | 2328 | } |
2356 | return NULL; | 2329 | return NULL; |
2357 | } | 2330 | } |
@@ -2360,8 +2333,8 @@ struct sta_info *ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, | |||
2360 | return NULL; | 2333 | return NULL; |
2361 | 2334 | ||
2362 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 2335 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
2363 | printk(KERN_DEBUG "%s: Adding new IBSS station %s (dev=%s)\n", | 2336 | printk(KERN_DEBUG "%s: Adding new IBSS station %pM (dev=%s)\n", |
2364 | wiphy_name(local->hw.wiphy), print_mac(mac, addr), sdata->dev->name); | 2337 | wiphy_name(local->hw.wiphy), addr, sdata->dev->name); |
2365 | #endif | 2338 | #endif |
2366 | 2339 | ||
2367 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); | 2340 | sta = sta_info_alloc(sdata, addr, GFP_ATOMIC); |