aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/libertas
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/libertas')
-rw-r--r--drivers/net/wireless/libertas/assoc.c19
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c5
-rw-r--r--drivers/net/wireless/libertas/debugfs.c5
-rw-r--r--drivers/net/wireless/libertas/join.c16
-rw-r--r--drivers/net/wireless/libertas/main.c12
-rw-r--r--drivers/net/wireless/libertas/scan.c14
-rw-r--r--drivers/net/wireless/libertas/wext.c5
7 files changed, 42 insertions, 34 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index 3131afcf459..2c6ddb1f007 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -16,6 +16,7 @@ static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
16 16
17static void print_assoc_req(const char * extra, struct assoc_request * assoc_req) 17static void print_assoc_req(const char * extra, struct assoc_request * assoc_req)
18{ 18{
19 DECLARE_MAC_BUF(mac);
19 lbs_deb_assoc( 20 lbs_deb_assoc(
20 "#### Association Request: %s\n" 21 "#### Association Request: %s\n"
21 " flags: 0x%08lX\n" 22 " flags: 0x%08lX\n"
@@ -23,13 +24,13 @@ static void print_assoc_req(const char * extra, struct assoc_request * assoc_req
23 " channel: %d\n" 24 " channel: %d\n"
24 " band: %d\n" 25 " band: %d\n"
25 " mode: %d\n" 26 " mode: %d\n"
26 " BSSID: " MAC_FMT "\n" 27 " BSSID: %s\n"
27 " Encryption:%s%s%s\n" 28 " Encryption:%s%s%s\n"
28 " auth: %d\n", 29 " auth: %d\n",
29 extra, assoc_req->flags, 30 extra, assoc_req->flags,
30 escape_essid(assoc_req->ssid, assoc_req->ssid_len), 31 escape_essid(assoc_req->ssid, assoc_req->ssid_len),
31 assoc_req->channel, assoc_req->band, assoc_req->mode, 32 assoc_req->channel, assoc_req->band, assoc_req->mode,
32 MAC_ARG(assoc_req->bssid), 33 print_mac(mac, assoc_req->bssid),
33 assoc_req->secinfo.WPAenabled ? " WPA" : "", 34 assoc_req->secinfo.WPAenabled ? " WPA" : "",
34 assoc_req->secinfo.WPA2enabled ? " WPA2" : "", 35 assoc_req->secinfo.WPA2enabled ? " WPA2" : "",
35 assoc_req->secinfo.wep_enabled ? " WEP" : "", 36 assoc_req->secinfo.wep_enabled ? " WEP" : "",
@@ -104,16 +105,17 @@ static int assoc_helper_bssid(wlan_private *priv,
104 wlan_adapter *adapter = priv->adapter; 105 wlan_adapter *adapter = priv->adapter;
105 int ret = 0; 106 int ret = 0;
106 struct bss_descriptor * bss; 107 struct bss_descriptor * bss;
108 DECLARE_MAC_BUF(mac);
107 109
108 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID " MAC_FMT, 110 lbs_deb_enter_args(LBS_DEB_ASSOC, "BSSID %s",
109 MAC_ARG(assoc_req->bssid)); 111 print_mac(mac, assoc_req->bssid));
110 112
111 /* Search for index position in list for requested MAC */ 113 /* Search for index position in list for requested MAC */
112 bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid, 114 bss = libertas_find_bssid_in_list(adapter, assoc_req->bssid,
113 assoc_req->mode); 115 assoc_req->mode);
114 if (bss == NULL) { 116 if (bss == NULL) {
115 lbs_deb_assoc("ASSOC: WAP: BSSID " MAC_FMT " not found, " 117 lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
116 "cannot associate.\n", MAC_ARG(assoc_req->bssid)); 118 "cannot associate.\n", print_mac(mac, assoc_req->bssid));
117 goto out; 119 goto out;
118 } 120 }
119 121
@@ -481,6 +483,7 @@ void libertas_association_worker(struct work_struct *work)
481 struct assoc_request * assoc_req = NULL; 483 struct assoc_request * assoc_req = NULL;
482 int ret = 0; 484 int ret = 0;
483 int find_any_ssid = 0; 485 int find_any_ssid = 0;
486 DECLARE_MAC_BUF(mac);
484 487
485 lbs_deb_enter(LBS_DEB_ASSOC); 488 lbs_deb_enter(LBS_DEB_ASSOC);
486 489
@@ -629,10 +632,10 @@ void libertas_association_worker(struct work_struct *work)
629 632
630 if (success) { 633 if (success) {
631 lbs_deb_assoc("ASSOC: association attempt successful. " 634 lbs_deb_assoc("ASSOC: association attempt successful. "
632 "Associated to '%s' (" MAC_FMT ")\n", 635 "Associated to '%s' (%s)\n",
633 escape_essid(adapter->curbssparams.ssid, 636 escape_essid(adapter->curbssparams.ssid,
634 adapter->curbssparams.ssid_len), 637 adapter->curbssparams.ssid_len),
635 MAC_ARG(adapter->curbssparams.bssid)); 638 print_mac(mac, adapter->curbssparams.bssid));
636 libertas_prepare_and_send_command(priv, 639 libertas_prepare_and_send_command(priv,
637 CMD_802_11_RSSI, 640 CMD_802_11_RSSI,
638 0, CMD_OPTION_WAITFORRSP, 0, NULL); 641 0, CMD_OPTION_WAITFORRSP, 0, NULL);
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index d64ad87db45..fe70e30b1f3 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -159,6 +159,7 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec; 159 struct cmd_ds_get_hw_spec *hwspec = &resp->params.hwspec;
160 wlan_adapter *adapter = priv->adapter; 160 wlan_adapter *adapter = priv->adapter;
161 int ret = 0; 161 int ret = 0;
162 DECLARE_MAC_BUF(mac);
162 163
163 lbs_deb_enter(LBS_DEB_CMD); 164 lbs_deb_enter(LBS_DEB_CMD);
164 165
@@ -169,8 +170,8 @@ static int wlan_ret_get_hw_spec(wlan_private * priv,
169 lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n", 170 lbs_deb_cmd("GET_HW_SPEC: firmware release %u.%u.%up%u\n",
170 adapter->fwreleasenumber[2], adapter->fwreleasenumber[1], 171 adapter->fwreleasenumber[2], adapter->fwreleasenumber[1],
171 adapter->fwreleasenumber[0], adapter->fwreleasenumber[3]); 172 adapter->fwreleasenumber[0], adapter->fwreleasenumber[3]);
172 lbs_deb_cmd("GET_HW_SPEC: MAC addr " MAC_FMT "\n", 173 lbs_deb_cmd("GET_HW_SPEC: MAC addr %s\n",
173 MAC_ARG(hwspec->permanentaddr)); 174 print_mac(mac, hwspec->permanentaddr));
174 lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n", 175 lbs_deb_cmd("GET_HW_SPEC: hardware interface 0x%x, hardware spec 0x%04x\n",
175 hwspec->hwifversion, hwspec->version); 176 hwspec->hwifversion, hwspec->version);
176 177
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 816f42e4f5b..cb00b080409 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -63,6 +63,7 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
63 int numscansdone = 0, res; 63 int numscansdone = 0, res;
64 unsigned long addr = get_zeroed_page(GFP_KERNEL); 64 unsigned long addr = get_zeroed_page(GFP_KERNEL);
65 char *buf = (char *)addr; 65 char *buf = (char *)addr;
66 DECLARE_MAC_BUF(mac);
66 struct bss_descriptor * iter_bss; 67 struct bss_descriptor * iter_bss;
67 68
68 pos += snprintf(buf+pos, len-pos, 69 pos += snprintf(buf+pos, len-pos,
@@ -75,9 +76,9 @@ static ssize_t libertas_getscantable(struct file *file, char __user *userbuf,
75 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT); 76 u16 spectrum_mgmt = (iter_bss->capability & WLAN_CAPABILITY_SPECTRUM_MGMT);
76 77
77 pos += snprintf(buf+pos, len-pos, 78 pos += snprintf(buf+pos, len-pos,
78 "%02u| %03d | %04ld | " MAC_FMT " |", 79 "%02u| %03d | %04ld | %s |",
79 numscansdone, iter_bss->channel, iter_bss->rssi, 80 numscansdone, iter_bss->channel, iter_bss->rssi,
80 MAC_ARG(iter_bss->bssid)); 81 print_mac(mac, iter_bss->bssid));
81 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability); 82 pos += snprintf(buf+pos, len-pos, " %04x-", iter_bss->capability);
82 pos += snprintf(buf+pos, len-pos, "%c%c%c |", 83 pos += snprintf(buf+pos, len-pos, "%c%c%c |",
83 ibss ? 'A' : 'I', privacy ? 'P' : ' ', 84 ibss ? 'A' : 'I', privacy ? 'P' : ' ',
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index 0ad1362b14e..8dcff00574f 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -293,6 +293,7 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth; 293 struct cmd_ds_802_11_authenticate *pauthenticate = &cmd->params.auth;
294 int ret = -1; 294 int ret = -1;
295 u8 *bssid = pdata_buf; 295 u8 *bssid = pdata_buf;
296 DECLARE_MAC_BUF(mac);
296 297
297 lbs_deb_enter(LBS_DEB_JOIN); 298 lbs_deb_enter(LBS_DEB_JOIN);
298 299
@@ -319,8 +320,8 @@ int libertas_cmd_80211_authenticate(wlan_private * priv,
319 320
320 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); 321 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
321 322
322 lbs_deb_join("AUTH_CMD: BSSID is : " MAC_FMT " auth=0x%X\n", 323 lbs_deb_join("AUTH_CMD: BSSID is : %s auth=0x%X\n",
323 MAC_ARG(bssid), pauthenticate->authtype); 324 print_mac(mac, bssid), pauthenticate->authtype);
324 ret = 0; 325 ret = 0;
325 326
326out: 327out:
@@ -598,6 +599,7 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
598 int cmdappendsize = 0; 599 int cmdappendsize = 0;
599 int ret = 0; 600 int ret = 0;
600 u16 ratesize = 0; 601 u16 ratesize = 0;
602 DECLARE_MAC_BUF(mac);
601 603
602 lbs_deb_enter(LBS_DEB_JOIN); 604 lbs_deb_enter(LBS_DEB_JOIN);
603 605
@@ -621,8 +623,9 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
621 623
622 /* information on BSSID descriptor passed to FW */ 624 /* information on BSSID descriptor passed to FW */
623 lbs_deb_join( 625 lbs_deb_join(
624 "ADHOC_J_CMD: BSSID = " MAC_FMT ", SSID = '%s'\n", 626 "ADHOC_J_CMD: BSSID = %s, SSID = '%s'\n",
625 MAC_ARG(join_cmd->bss.bssid), join_cmd->bss.ssid); 627 print_mac(mac, join_cmd->bss.bssid),
628 join_cmd->bss.ssid);
626 629
627 /* failtimeout */ 630 /* failtimeout */
628 join_cmd->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT); 631 join_cmd->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT);
@@ -829,6 +832,7 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
829 struct cmd_ds_802_11_ad_hoc_result *padhocresult; 832 struct cmd_ds_802_11_ad_hoc_result *padhocresult;
830 union iwreq_data wrqu; 833 union iwreq_data wrqu;
831 struct bss_descriptor *bss; 834 struct bss_descriptor *bss;
835 DECLARE_MAC_BUF(mac);
832 836
833 lbs_deb_enter(LBS_DEB_JOIN); 837 lbs_deb_enter(LBS_DEB_JOIN);
834 838
@@ -894,8 +898,8 @@ int libertas_ret_80211_ad_hoc_start(wlan_private * priv,
894 898
895 lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n"); 899 lbs_deb_join("ADHOC_RESP: - Joined/Started Ad Hoc\n");
896 lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->curbssparams.channel); 900 lbs_deb_join("ADHOC_RESP: channel = %d\n", adapter->curbssparams.channel);
897 lbs_deb_join("ADHOC_RESP: BSSID = " MAC_FMT "\n", 901 lbs_deb_join("ADHOC_RESP: BSSID = %s\n",
898 MAC_ARG(padhocresult->bssid)); 902 print_mac(mac, padhocresult->bssid));
899 903
900done: 904done:
901 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 905 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret);
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c
index a54171af7b9..5ead08312e1 100644
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
@@ -677,6 +677,7 @@ static void libertas_set_multicast_list(struct net_device *dev)
677 wlan_private *priv = dev->priv; 677 wlan_private *priv = dev->priv;
678 wlan_adapter *adapter = priv->adapter; 678 wlan_adapter *adapter = priv->adapter;
679 int oldpacketfilter; 679 int oldpacketfilter;
680 DECLARE_MAC_BUF(mac);
680 681
681 lbs_deb_enter(LBS_DEB_NET); 682 lbs_deb_enter(LBS_DEB_NET);
682 683
@@ -723,14 +724,9 @@ static void libertas_set_multicast_list(struct net_device *dev)
723 dev->mc_count); 724 dev->mc_count);
724 725
725 for (i = 0; i < dev->mc_count; i++) { 726 for (i = 0; i < dev->mc_count; i++) {
726 lbs_deb_net("Multicast address %d:" 727 lbs_deb_net("Multicast address %d:%s\n",
727 MAC_FMT "\n", i, 728 i, print_mac(mac,
728 adapter->multicastlist[i][0], 729 adapter->multicastlist[i]));
729 adapter->multicastlist[i][1],
730 adapter->multicastlist[i][2],
731 adapter->multicastlist[i][3],
732 adapter->multicastlist[i][4],
733 adapter->multicastlist[i][5]);
734 } 730 }
735 /* send multicast addresses to firmware */ 731 /* send multicast addresses to firmware */
736 libertas_prepare_and_send_command(priv, 732 libertas_prepare_and_send_command(priv,
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index e2e9ebcd834..8f073ad1957 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -777,6 +777,7 @@ int wlan_scan_networks(wlan_private * priv,
777#ifdef CONFIG_LIBERTAS_DEBUG 777#ifdef CONFIG_LIBERTAS_DEBUG
778 struct bss_descriptor * iter_bss; 778 struct bss_descriptor * iter_bss;
779 int i = 0; 779 int i = 0;
780 DECLARE_MAC_BUF(mac);
780#endif 781#endif
781 782
782 lbs_deb_enter(LBS_DEB_SCAN); 783 lbs_deb_enter(LBS_DEB_SCAN);
@@ -831,8 +832,8 @@ int wlan_scan_networks(wlan_private * priv,
831 /* Dump the scan table */ 832 /* Dump the scan table */
832 mutex_lock(&adapter->lock); 833 mutex_lock(&adapter->lock);
833 list_for_each_entry (iter_bss, &adapter->network_list, list) { 834 list_for_each_entry (iter_bss, &adapter->network_list, list) {
834 lbs_deb_scan("Scan:(%02d) " MAC_FMT ", RSSI[%03d], SSID[%s]\n", 835 lbs_deb_scan("Scan:(%02d) %s, RSSI[%03d], SSID[%s]\n",
835 i++, MAC_ARG(iter_bss->bssid), (s32) iter_bss->rssi, 836 i++, print_mac(mac, iter_bss->bssid), (s32) iter_bss->rssi,
836 escape_essid(iter_bss->ssid, iter_bss->ssid_len)); 837 escape_essid(iter_bss->ssid, iter_bss->ssid_len));
837 } 838 }
838 mutex_unlock(&adapter->lock); 839 mutex_unlock(&adapter->lock);
@@ -876,6 +877,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
876 struct ieeetypes_dsparamset *pDS; 877 struct ieeetypes_dsparamset *pDS;
877 struct ieeetypes_cfparamset *pCF; 878 struct ieeetypes_cfparamset *pCF;
878 struct ieeetypes_ibssparamset *pibss; 879 struct ieeetypes_ibssparamset *pibss;
880 DECLARE_MAC_BUF(mac);
879 struct ieeetypes_countryinfoset *pcountryinfo; 881 struct ieeetypes_countryinfoset *pcountryinfo;
880 u8 *pos, *end, *p; 882 u8 *pos, *end, *p;
881 u8 n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0; 883 u8 n_ex_rates = 0, got_basic_rates = 0, n_basic_rates = 0;
@@ -906,7 +908,7 @@ static int libertas_process_bss(struct bss_descriptor * bss,
906 *bytesleft -= beaconsize; 908 *bytesleft -= beaconsize;
907 909
908 memcpy(bss->bssid, pos, ETH_ALEN); 910 memcpy(bss->bssid, pos, ETH_ALEN);
909 lbs_deb_scan("process_bss: AP BSSID " MAC_FMT "\n", MAC_ARG(bss->bssid)); 911 lbs_deb_scan("process_bss: AP BSSID %s\n", print_mac(mac, bss->bssid));
910 pos += ETH_ALEN; 912 pos += ETH_ALEN;
911 913
912 if ((end - pos) < 12) { 914 if ((end - pos) < 12) {
@@ -1724,6 +1726,7 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1724 struct bss_descriptor new; 1726 struct bss_descriptor new;
1725 struct bss_descriptor * found = NULL; 1727 struct bss_descriptor * found = NULL;
1726 struct bss_descriptor * oldest = NULL; 1728 struct bss_descriptor * oldest = NULL;
1729 DECLARE_MAC_BUF(mac);
1727 1730
1728 /* Process the data fields and IEs returned for this BSS */ 1731 /* Process the data fields and IEs returned for this BSS */
1729 memset(&new, 0, sizeof (struct bss_descriptor)); 1732 memset(&new, 0, sizeof (struct bss_descriptor));
@@ -1762,9 +1765,8 @@ int libertas_ret_80211_scan(wlan_private * priv, struct cmd_ds_command *resp)
1762 continue; 1765 continue;
1763 } 1766 }
1764 1767
1765 lbs_deb_scan("SCAN_RESP: BSSID = " MAC_FMT "\n", 1768 lbs_deb_scan("SCAN_RESP: BSSID = %s\n",
1766 new.bssid[0], new.bssid[1], new.bssid[2], 1769 print_mac(mac, new.bssid));
1767 new.bssid[3], new.bssid[4], new.bssid[5]);
1768 1770
1769 /* Copy the locally created newbssentry to the scan table */ 1771 /* Copy the locally created newbssentry to the scan table */
1770 memcpy(found, &new, offsetof(struct bss_descriptor, list)); 1772 memcpy(found, &new, offsetof(struct bss_descriptor, list));
diff --git a/drivers/net/wireless/libertas/wext.c b/drivers/net/wireless/libertas/wext.c
index f8036efd729..0b2103e0af5 100644
--- a/drivers/net/wireless/libertas/wext.c
+++ b/drivers/net/wireless/libertas/wext.c
@@ -1160,7 +1160,7 @@ static int wlan_get_encode(struct net_device *dev,
1160 1160
1161 dwrq->flags |= IW_ENCODE_NOKEY; 1161 dwrq->flags |= IW_ENCODE_NOKEY;
1162 1162
1163 lbs_deb_wext("key: " MAC_FMT ", keylen %d\n", 1163 lbs_deb_wext("key: %02x:%02x:%02x:%02x:%02x:%02x, keylen %d\n",
1164 extra[0], extra[1], extra[2], 1164 extra[0], extra[1], extra[2],
1165 extra[3], extra[4], extra[5], dwrq->length); 1165 extra[3], extra[4], extra[5], dwrq->length);
1166 1166
@@ -1980,13 +1980,14 @@ static int wlan_set_wap(struct net_device *dev, struct iw_request_info *info,
1980 wlan_adapter *adapter = priv->adapter; 1980 wlan_adapter *adapter = priv->adapter;
1981 struct assoc_request * assoc_req; 1981 struct assoc_request * assoc_req;
1982 int ret = 0; 1982 int ret = 0;
1983 DECLARE_MAC_BUF(mac);
1983 1984
1984 lbs_deb_enter(LBS_DEB_WEXT); 1985 lbs_deb_enter(LBS_DEB_WEXT);
1985 1986
1986 if (awrq->sa_family != ARPHRD_ETHER) 1987 if (awrq->sa_family != ARPHRD_ETHER)
1987 return -EINVAL; 1988 return -EINVAL;
1988 1989
1989 lbs_deb_wext("ASSOC: WAP: sa_data " MAC_FMT "\n", MAC_ARG(awrq->sa_data)); 1990 lbs_deb_wext("ASSOC: WAP: sa_data %s\n", print_mac(mac, awrq->sa_data));
1990 1991
1991 mutex_lock(&adapter->lock); 1992 mutex_lock(&adapter->lock);
1992 1993