aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath6kl/cfg80211.c
diff options
context:
space:
mode:
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>2011-09-10 05:56:34 -0400
committerKalle Valo <kvalo@qca.qualcomm.com>2011-09-16 11:49:26 -0400
commitac59a2b285abbcec1ec487ef56dcc25c654853fb (patch)
tree94c4429754a90a18537ce26b3b070614ce743372 /drivers/net/wireless/ath/ath6kl/cfg80211.c
parent97e0496d056726ab46e7e977315f2ab847b34209 (diff)
ath6kl: Remove auth type fall back in auto authentication mode
Target already tries with different authentication mechanism when authentication type is configured to NL80211_AUTHTYPE_AUTOMATIC. Remove this piece of code from driver. Having this code in driver even affects auto + WEP authentication in some cases. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/cfg80211.c')
-rw-r--r--drivers/net/wireless/ath/ath6kl/cfg80211.c74
1 files changed, 12 insertions, 62 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index a889bf4a4722..fcef417884b8 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -158,8 +158,7 @@ static int ath6kl_set_auth_type(struct ath6kl *ar,
158 break; 158 break;
159 159
160 case NL80211_AUTHTYPE_AUTOMATIC: 160 case NL80211_AUTHTYPE_AUTOMATIC:
161 ar->dot11_auth_mode = OPEN_AUTH; 161 ar->dot11_auth_mode = OPEN_AUTH | SHARED_AUTH;
162 ar->auto_auth_stage = AUTH_OPEN_IN_PROGRESS;
163 break; 162 break;
164 163
165 default: 164 default:
@@ -446,8 +445,6 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel,
446 assoc_req_len -= assoc_req_ie_offset; 445 assoc_req_len -= assoc_req_ie_offset;
447 assoc_resp_len -= assoc_resp_ie_offset; 446 assoc_resp_len -= assoc_resp_ie_offset;
448 447
449 ar->auto_auth_stage = AUTH_IDLE;
450
451 if (nw_type & ADHOC_NETWORK) { 448 if (nw_type & ADHOC_NETWORK) {
452 if (ar->wdev->iftype != NL80211_IFTYPE_ADHOC) { 449 if (ar->wdev->iftype != NL80211_IFTYPE_ADHOC) {
453 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, 450 ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -599,9 +596,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
599 u8 *bssid, u8 assoc_resp_len, 596 u8 *bssid, u8 assoc_resp_len,
600 u8 *assoc_info, u16 proto_reason) 597 u8 *assoc_info, u16 proto_reason)
601{ 598{
602 struct ath6kl_key *key = NULL;
603 u16 status;
604
605 if (ar->scan_req) { 599 if (ar->scan_req) {
606 cfg80211_scan_done(ar->scan_req, true); 600 cfg80211_scan_done(ar->scan_req, true);
607 ar->scan_req = NULL; 601 ar->scan_req = NULL;
@@ -643,64 +637,20 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
643 if (reason != DISCONNECT_CMD) 637 if (reason != DISCONNECT_CMD)
644 return; 638 return;
645 639
646 if (!ar->auto_auth_stage) { 640 clear_bit(CONNECT_PEND, &ar->flag);
647 clear_bit(CONNECT_PEND, &ar->flag);
648
649 if (ar->sme_state == SME_CONNECTING) {
650 cfg80211_connect_result(ar->net_dev,
651 bssid, NULL, 0,
652 NULL, 0,
653 WLAN_STATUS_UNSPECIFIED_FAILURE,
654 GFP_KERNEL);
655 } else if (ar->sme_state == SME_CONNECTED) {
656 cfg80211_disconnected(ar->net_dev, reason,
657 NULL, 0, GFP_KERNEL);
658 }
659
660 ar->sme_state = SME_DISCONNECTED;
661 return;
662 }
663
664 if (ar->dot11_auth_mode != OPEN_AUTH)
665 return;
666 641
667 /* 642 if (ar->sme_state == SME_CONNECTING) {
668 * If the current auth algorithm is open, try shared and 643 cfg80211_connect_result(ar->net_dev,
669 * make autoAuthStage idle. We do not make it leap for now 644 bssid, NULL, 0,
670 * being. 645 NULL, 0,
671 */ 646 WLAN_STATUS_UNSPECIFIED_FAILURE,
672 key = &ar->keys[ar->def_txkey_index]; 647 GFP_KERNEL);
673 if (down_interruptible(&ar->sem)) { 648 } else if (ar->sme_state == SME_CONNECTED) {
674 ath6kl_err("busy, couldn't get access\n"); 649 cfg80211_disconnected(ar->net_dev, reason,
675 return; 650 NULL, 0, GFP_KERNEL);
676 } 651 }
677 652
678 ar->dot11_auth_mode = SHARED_AUTH; 653 ar->sme_state = SME_DISCONNECTED;
679 ar->auto_auth_stage = AUTH_IDLE;
680
681 ath6kl_wmi_addkey_cmd(ar->wmi,
682 ar->def_txkey_index,
683 ar->prwise_crypto,
684 GROUP_USAGE | TX_USAGE,
685 key->key_len, NULL,
686 key->key,
687 KEY_OP_INIT_VAL, NULL,
688 NO_SYNC_WMIFLAG);
689
690 status = ath6kl_wmi_connect_cmd(ar->wmi,
691 ar->nw_type,
692 ar->dot11_auth_mode,
693 ar->auth_mode,
694 ar->prwise_crypto,
695 ar->prwise_crypto_len,
696 ar->grp_crypto,
697 ar->grp_crypto_len,
698 ar->ssid_len,
699 ar->ssid,
700 ar->req_bssid,
701 ar->ch_hint,
702 ar->connect_ctrl_flags);
703 up(&ar->sem);
704} 654}
705 655
706static inline bool is_ch_11a(u16 ch) 656static inline bool is_ch_11a(u16 ch)