diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index dc299a6b59c83b0e8d8e2b054514b6fc35aab2de..14559ffb1453bb019d6e4300ddd06d032759581a 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c @@ -559,14 +559,14 @@ void ath6kl_cfg80211_connect_event(struct ath6kl *ar, u16 channel, return; } - if (!test_bit(CONNECTED, &ar->flag)) { + if (ar->sme_state == SME_CONNECTING) { /* inform connect result to cfg80211 */ - ar->sme_state = SME_DISCONNECTED; + ar->sme_state = SME_CONNECTED; cfg80211_connect_result(ar->net_dev, bssid, assoc_req_ie, assoc_req_len, assoc_resp_ie, assoc_resp_len, WLAN_STATUS_SUCCESS, GFP_KERNEL); - } else { + } else if (ar->sme_state == SME_CONNECTED) { /* inform roam event to cfg80211 */ cfg80211_roamed(ar->net_dev, ibss_ch, bssid, assoc_req_ie, assoc_req_len,