]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
ath6kl: Remove auth type fall back in auto authentication mode
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Sat, 10 Sep 2011 09:56:34 +0000 (15:26 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 16 Sep 2011 15:49:26 +0000 (18:49 +0300)
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>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/wmi.h

index a889bf4a47223d852c9d3fa85773e08f41752592..fcef417884b85309700630c90de524fa382f9894 100644 (file)
@@ -158,8 +158,7 @@ static int ath6kl_set_auth_type(struct ath6kl *ar,
                break;
 
        case NL80211_AUTHTYPE_AUTOMATIC:
-               ar->dot11_auth_mode = OPEN_AUTH;
-               ar->auto_auth_stage = AUTH_OPEN_IN_PROGRESS;
+               ar->dot11_auth_mode = OPEN_AUTH | SHARED_AUTH;
                break;
 
        default:
@@ -446,8 +445,6 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel,
        assoc_req_len -= assoc_req_ie_offset;
        assoc_resp_len -= assoc_resp_ie_offset;
 
-       ar->auto_auth_stage = AUTH_IDLE;
-
        if (nw_type & ADHOC_NETWORK) {
                if (ar->wdev->iftype != NL80211_IFTYPE_ADHOC) {
                        ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
@@ -599,9 +596,6 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
                                      u8 *bssid, u8 assoc_resp_len,
                                      u8 *assoc_info, u16 proto_reason)
 {
-       struct ath6kl_key *key = NULL;
-       u16 status;
-
        if (ar->scan_req) {
                cfg80211_scan_done(ar->scan_req, true);
                ar->scan_req = NULL;
@@ -643,64 +637,20 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
        if (reason != DISCONNECT_CMD)
                return;
 
-       if (!ar->auto_auth_stage) {
-               clear_bit(CONNECT_PEND, &ar->flag);
-
-               if (ar->sme_state == SME_CONNECTING) {
-                       cfg80211_connect_result(ar->net_dev,
-                                               bssid, NULL, 0,
-                                               NULL, 0,
-                                               WLAN_STATUS_UNSPECIFIED_FAILURE,
-                                               GFP_KERNEL);
-               } else if (ar->sme_state == SME_CONNECTED) {
-                       cfg80211_disconnected(ar->net_dev, reason,
-                                             NULL, 0, GFP_KERNEL);
-               }
-
-               ar->sme_state = SME_DISCONNECTED;
-               return;
-       }
-
-       if (ar->dot11_auth_mode != OPEN_AUTH)
-               return;
+       clear_bit(CONNECT_PEND, &ar->flag);
 
-       /*
-        * If the current auth algorithm is open, try shared and
-        * make autoAuthStage idle. We do not make it leap for now
-        * being.
-        */
-       key = &ar->keys[ar->def_txkey_index];
-       if (down_interruptible(&ar->sem)) {
-               ath6kl_err("busy, couldn't get access\n");
-               return;
+       if (ar->sme_state == SME_CONNECTING) {
+               cfg80211_connect_result(ar->net_dev,
+                               bssid, NULL, 0,
+                               NULL, 0,
+                               WLAN_STATUS_UNSPECIFIED_FAILURE,
+                               GFP_KERNEL);
+       } else if (ar->sme_state == SME_CONNECTED) {
+               cfg80211_disconnected(ar->net_dev, reason,
+                               NULL, 0, GFP_KERNEL);
        }
 
-       ar->dot11_auth_mode = SHARED_AUTH;
-       ar->auto_auth_stage = AUTH_IDLE;
-
-       ath6kl_wmi_addkey_cmd(ar->wmi,
-                             ar->def_txkey_index,
-                             ar->prwise_crypto,
-                             GROUP_USAGE | TX_USAGE,
-                             key->key_len, NULL,
-                             key->key,
-                             KEY_OP_INIT_VAL, NULL,
-                             NO_SYNC_WMIFLAG);
-
-       status = ath6kl_wmi_connect_cmd(ar->wmi,
-                                       ar->nw_type,
-                                       ar->dot11_auth_mode,
-                                       ar->auth_mode,
-                                       ar->prwise_crypto,
-                                       ar->prwise_crypto_len,
-                                       ar->grp_crypto,
-                                       ar->grp_crypto_len,
-                                       ar->ssid_len,
-                                       ar->ssid,
-                                       ar->req_bssid,
-                                       ar->ch_hint,
-                                       ar->connect_ctrl_flags);
-       up(&ar->sem);
+       ar->sme_state = SME_DISCONNECTED;
 }
 
 static inline bool is_ch_11a(u16 ch)
index 0fb82e9002bed82e9c07cf456087cf80a5d8ff9b..a9b3b17ef3ef00d31fd974bbbd2cfff3cf97ee66 100644 (file)
@@ -466,8 +466,6 @@ struct ath6kl {
        enum wlan_low_pwr_state wlan_pwr_state;
        struct wmi_scan_params_cmd sc_params;
 #define AR_MCAST_FILTER_MAC_ADDR_SIZE  4
-       u8 auto_auth_stage;
-
        struct {
                void *rx_report;
                size_t rx_report_len;
index b9b13a040c7eb748c6f69138a710a38f4512c801..1834e9af5799a41c59322bf331efabfa14ff5a90 100644 (file)
@@ -586,7 +586,6 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev)
        SET_NETDEV_DEV(dev, wiphy_dev(wdev->wiphy));
        wdev->netdev = dev;
        ar->sme_state = SME_DISCONNECTED;
-       ar->auto_auth_stage = AUTH_IDLE;
 
        init_netdev(dev);
 
index dc49ef86c1c887cc13d876352a4a888cdf7e0ff8..f036e78522ab3449d622448f0b86d7279cf1afff 100644 (file)
@@ -566,11 +566,6 @@ enum dot11_auth_mode {
        LEAP_AUTH = 0x04,
 };
 
-enum {
-       AUTH_IDLE,
-       AUTH_OPEN_IN_PROGRESS,
-};
-
 enum auth_mode {
        NONE_AUTH = 0x01,
        WPA_AUTH = 0x02,