aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/assoc.c9
-rw-r--r--drivers/net/wireless/libertas/cmdresp.c7
-rw-r--r--drivers/net/wireless/libertas/join.c55
3 files changed, 28 insertions, 43 deletions
diff --git a/drivers/net/wireless/libertas/assoc.c b/drivers/net/wireless/libertas/assoc.c
index b529e54151d6..88da68ee0f02 100644
--- a/drivers/net/wireless/libertas/assoc.c
+++ b/drivers/net/wireless/libertas/assoc.c
@@ -638,20 +638,19 @@ void lbs_association_worker(struct work_struct *work)
638 638
639 ret = assoc_helper_associate(priv, assoc_req); 639 ret = assoc_helper_associate(priv, assoc_req);
640 if (ret) { 640 if (ret) {
641 lbs_deb_assoc("ASSOC: association attempt unsuccessful: %d\n", 641 lbs_deb_assoc("ASSOC: association unsuccessful: %d\n",
642 ret); 642 ret);
643 success = 0; 643 success = 0;
644 } 644 }
645 645
646 if (adapter->connect_status != LBS_CONNECTED) { 646 if (adapter->connect_status != LBS_CONNECTED) {
647 lbs_deb_assoc("ASSOC: association attempt unsuccessful, " 647 lbs_deb_assoc("ASSOC: association unsuccessful, "
648 "not connected.\n"); 648 "not connected\n");
649 success = 0; 649 success = 0;
650 } 650 }
651 651
652 if (success) { 652 if (success) {
653 lbs_deb_assoc("ASSOC: association attempt successful. " 653 lbs_deb_assoc("ASSOC: associated to '%s', %s\n",
654 "Associated to '%s' (%s)\n",
655 escape_essid(adapter->curbssparams.ssid, 654 escape_essid(adapter->curbssparams.ssid,
656 adapter->curbssparams.ssid_len), 655 adapter->curbssparams.ssid_len),
657 print_mac(mac, adapter->curbssparams.bssid)); 656 print_mac(mac, adapter->curbssparams.bssid));
diff --git a/drivers/net/wireless/libertas/cmdresp.c b/drivers/net/wireless/libertas/cmdresp.c
index 87b5bd2988e7..5165c91897a4 100644
--- a/drivers/net/wireless/libertas/cmdresp.c
+++ b/drivers/net/wireless/libertas/cmdresp.c
@@ -31,7 +31,7 @@ void lbs_mac_event_disconnected(struct lbs_private *priv)
31 if (adapter->connect_status != LBS_CONNECTED) 31 if (adapter->connect_status != LBS_CONNECTED)
32 return; 32 return;
33 33
34 lbs_deb_enter(LBS_DEB_CMD); 34 lbs_deb_enter(LBS_DEB_ASSOC);
35 35
36 memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN); 36 memset(wrqu.ap_addr.sa_data, 0x00, ETH_ALEN);
37 wrqu.ap_addr.sa_family = ARPHRD_ETHER; 37 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
@@ -60,11 +60,6 @@ void lbs_mac_event_disconnected(struct lbs_private *priv)
60 memset(adapter->rawNF, 0x00, sizeof(adapter->rawNF)); 60 memset(adapter->rawNF, 0x00, sizeof(adapter->rawNF));
61 adapter->nextSNRNF = 0; 61 adapter->nextSNRNF = 0;
62 adapter->numSNRNF = 0; 62 adapter->numSNRNF = 0;
63 lbs_deb_cmd("current SSID '%s', length %u\n",
64 escape_essid(adapter->curbssparams.ssid,
65 adapter->curbssparams.ssid_len),
66 adapter->curbssparams.ssid_len);
67
68 adapter->connect_status = LBS_DISCONNECTED; 63 adapter->connect_status = LBS_DISCONNECTED;
69 64
70 /* Clear out associated SSID and BSSID since connection is 65 /* Clear out associated SSID and BSSID since connection is
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index d80b6e05e27d..1550e6afb053 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -57,7 +57,7 @@ static int get_common_rates(struct lbs_adapter *adapter,
57 lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size); 57 lbs_deb_hex(LBS_DEB_JOIN, "AP rates ", rates, *rates_size);
58 lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates); 58 lbs_deb_hex(LBS_DEB_JOIN, "card rates ", card_rates, num_card_rates);
59 lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size); 59 lbs_deb_hex(LBS_DEB_JOIN, "common rates", tmp, tmp_size);
60 lbs_deb_join("Tx datarate is currently 0x%X\n", adapter->cur_rate); 60 lbs_deb_join("TX data rate 0x%02x\n", adapter->cur_rate);
61 61
62 if (!adapter->auto_rate) { 62 if (!adapter->auto_rate) {
63 for (i = 0; i < tmp_size; i++) { 63 for (i = 0; i < tmp_size; i++) {
@@ -128,7 +128,7 @@ int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req)
128 struct lbs_adapter *adapter = priv->adapter; 128 struct lbs_adapter *adapter = priv->adapter;
129 int ret; 129 int ret;
130 130
131 lbs_deb_enter(LBS_DEB_JOIN); 131 lbs_deb_enter(LBS_DEB_ASSOC);
132 132
133 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE, 133 ret = lbs_prepare_and_send_command(priv, CMD_802_11_AUTHENTICATE,
134 0, CMD_OPTION_WAITFORRSP, 134 0, CMD_OPTION_WAITFORRSP,
@@ -150,7 +150,7 @@ int lbs_associate(struct lbs_private *priv, struct assoc_request *assoc_req)
150 0, CMD_OPTION_WAITFORRSP, 0, assoc_req); 150 0, CMD_OPTION_WAITFORRSP, 0, assoc_req);
151 151
152done: 152done:
153 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 153 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
154 return ret; 154 return ret;
155} 155}
156 156
@@ -324,7 +324,7 @@ int lbs_cmd_80211_authenticate(struct lbs_private *priv,
324 324
325 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN); 325 memcpy(pauthenticate->macaddr, bssid, ETH_ALEN);
326 326
327 lbs_deb_join("AUTH_CMD: BSSID is : %s auth=0x%X\n", 327 lbs_deb_join("AUTH_CMD: BSSID %s, auth 0x%x\n",
328 print_mac(mac, bssid), pauthenticate->authtype); 328 print_mac(mac, bssid), pauthenticate->authtype);
329 ret = 0; 329 ret = 0;
330 330
@@ -372,7 +372,7 @@ int lbs_cmd_80211_associate(struct lbs_private *priv,
372 struct mrvlietypes_ratesparamset *rates; 372 struct mrvlietypes_ratesparamset *rates;
373 struct mrvlietypes_rsnparamset *rsn; 373 struct mrvlietypes_rsnparamset *rsn;
374 374
375 lbs_deb_enter(LBS_DEB_JOIN); 375 lbs_deb_enter(LBS_DEB_ASSOC);
376 376
377 pos = (u8 *) passo; 377 pos = (u8 *) passo;
378 378
@@ -426,7 +426,7 @@ int lbs_cmd_80211_associate(struct lbs_private *priv,
426 } 426 }
427 pos += sizeof(rates->header) + tmplen; 427 pos += sizeof(rates->header) + tmplen;
428 rates->header.len = cpu_to_le16(tmplen); 428 rates->header.len = cpu_to_le16(tmplen);
429 lbs_deb_join("ASSOC_CMD: num rates = %u\n", tmplen); 429 lbs_deb_assoc("ASSOC_CMD: num rates %u\n", tmplen);
430 430
431 /* Copy the infra. association rates into Current BSS state structure */ 431 /* Copy the infra. association rates into Current BSS state structure */
432 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates)); 432 memset(&adapter->curbssparams.rates, 0, sizeof(adapter->curbssparams.rates));
@@ -464,11 +464,10 @@ int lbs_cmd_80211_associate(struct lbs_private *priv,
464 if (bss->mode == IW_MODE_INFRA) 464 if (bss->mode == IW_MODE_INFRA)
465 tmpcap |= WLAN_CAPABILITY_ESS; 465 tmpcap |= WLAN_CAPABILITY_ESS;
466 passo->capability = cpu_to_le16(tmpcap); 466 passo->capability = cpu_to_le16(tmpcap);
467 lbs_deb_join("ASSOC_CMD: capability=%4X CAPINFO_MASK=%4X\n", 467 lbs_deb_assoc("ASSOC_CMD: capability 0x%04x\n", tmpcap);
468 tmpcap, CAPINFO_MASK);
469 468
470done: 469done:
471 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 470 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
472 return ret; 471 return ret;
473} 472}
474 473
@@ -708,10 +707,10 @@ int lbs_ret_80211_associate(struct lbs_private *priv,
708 struct bss_descriptor * bss; 707 struct bss_descriptor * bss;
709 u16 status_code; 708 u16 status_code;
710 709
711 lbs_deb_enter(LBS_DEB_JOIN); 710 lbs_deb_enter(LBS_DEB_ASSOC);
712 711
713 if (!adapter->in_progress_assoc_req) { 712 if (!adapter->in_progress_assoc_req) {
714 lbs_deb_join("ASSOC_RESP: no in-progress association request\n"); 713 lbs_deb_assoc("ASSOC_RESP: no in-progress assoc request\n");
715 ret = -1; 714 ret = -1;
716 goto done; 715 goto done;
717 } 716 }
@@ -740,30 +739,25 @@ int lbs_ret_80211_associate(struct lbs_private *priv,
740 status_code = le16_to_cpu(passocrsp->statuscode); 739 status_code = le16_to_cpu(passocrsp->statuscode);
741 switch (status_code) { 740 switch (status_code) {
742 case 0x00: 741 case 0x00:
743 lbs_deb_join("ASSOC_RESP: Association succeeded\n");
744 break; 742 break;
745 case 0x01: 743 case 0x01:
746 lbs_deb_join("ASSOC_RESP: Association failed; invalid " 744 lbs_deb_assoc("ASSOC_RESP: invalid parameters\n");
747 "parameters (status code %d)\n", status_code);
748 break; 745 break;
749 case 0x02: 746 case 0x02:
750 lbs_deb_join("ASSOC_RESP: Association failed; internal timer " 747 lbs_deb_assoc("ASSOC_RESP: internal timer "
751 "expired while waiting for the AP (status code %d)" 748 "expired while waiting for the AP\n");
752 "\n", status_code);
753 break; 749 break;
754 case 0x03: 750 case 0x03:
755 lbs_deb_join("ASSOC_RESP: Association failed; association " 751 lbs_deb_assoc("ASSOC_RESP: association "
756 "was refused by the AP (status code %d)\n", 752 "refused by AP\n");
757 status_code);
758 break; 753 break;
759 case 0x04: 754 case 0x04:
760 lbs_deb_join("ASSOC_RESP: Association failed; authentication " 755 lbs_deb_assoc("ASSOC_RESP: authentication "
761 "was refused by the AP (status code %d)\n", 756 "refused by AP\n");
762 status_code);
763 break; 757 break;
764 default: 758 default:
765 lbs_deb_join("ASSOC_RESP: Association failed; reason unknown " 759 lbs_deb_assoc("ASSOC_RESP: failure reason 0x%02x "
766 "(status code %d)\n", status_code); 760 " unknown\n", status_code);
767 break; 761 break;
768 } 762 }
769 763
@@ -773,22 +767,19 @@ int lbs_ret_80211_associate(struct lbs_private *priv,
773 goto done; 767 goto done;
774 } 768 }
775 769
776 lbs_deb_hex(LBS_DEB_JOIN, "ASSOC_RESP", (void *)&resp->params, 770 lbs_deb_hex(LBS_DEB_ASSOC, "ASSOC_RESP", (void *)&resp->params,
777 le16_to_cpu(resp->size) - S_DS_GEN); 771 le16_to_cpu(resp->size) - S_DS_GEN);
778 772
779 /* Send a Media Connected event, according to the Spec */ 773 /* Send a Media Connected event, according to the Spec */
780 adapter->connect_status = LBS_CONNECTED; 774 adapter->connect_status = LBS_CONNECTED;
781 775
782 lbs_deb_join("ASSOC_RESP: assocated to '%s'\n",
783 escape_essid(bss->ssid, bss->ssid_len));
784
785 /* Update current SSID and BSSID */ 776 /* Update current SSID and BSSID */
786 memcpy(&adapter->curbssparams.ssid, &bss->ssid, IW_ESSID_MAX_SIZE); 777 memcpy(&adapter->curbssparams.ssid, &bss->ssid, IW_ESSID_MAX_SIZE);
787 adapter->curbssparams.ssid_len = bss->ssid_len; 778 adapter->curbssparams.ssid_len = bss->ssid_len;
788 memcpy(adapter->curbssparams.bssid, bss->bssid, ETH_ALEN); 779 memcpy(adapter->curbssparams.bssid, bss->bssid, ETH_ALEN);
789 780
790 lbs_deb_join("ASSOC_RESP: currentpacketfilter is %x\n", 781 lbs_deb_assoc("ASSOC_RESP: currentpacketfilter is 0x%x\n",
791 adapter->currentpacketfilter); 782 adapter->currentpacketfilter);
792 783
793 adapter->SNR[TYPE_RXPD][TYPE_AVG] = 0; 784 adapter->SNR[TYPE_RXPD][TYPE_AVG] = 0;
794 adapter->NF[TYPE_RXPD][TYPE_AVG] = 0; 785 adapter->NF[TYPE_RXPD][TYPE_AVG] = 0;
@@ -807,7 +798,7 @@ int lbs_ret_80211_associate(struct lbs_private *priv,
807 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL); 798 wireless_send_event(priv->dev, SIOCGIWAP, &wrqu, NULL);
808 799
809done: 800done:
810 lbs_deb_leave_args(LBS_DEB_JOIN, "ret %d", ret); 801 lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
811 return ret; 802 return ret;
812} 803}
813 804