diff options
| author | Wu Gao <wugao@qti.qualcomm.com> | 2016-04-08 10:48:21 +0800 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-04-11 12:43:55 +0530 |
| commit | 2fae6b431b79fc4400ab6b3eb975e631e0eef2c1 (patch) | |
| tree | 0dc83b74b7dd39025601d001e6ccccadba021a01 | |
| parent | 675293377fe7f4fe330de7849454c9513d4ee62a (diff) | |
qcacld-2.0: Send protocol reason code instead of generic reason
prima to qcacld-2.0 propagation
When assoc fail, send protocol reason code instead of generic
reason code. Customer complain that it just reports generic
reason for WPA2 AP and cause UI mismatch.
Change-Id: I69f99a10664510beed9f9700d53fe1201ed1122e
CRs-Fixed: 970759
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 38 |
1 files changed, 7 insertions, 31 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 148788c2c01f..c61eb366f1aa 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -1633,6 +1633,7 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs hdd_adapter_t *sap_adapter; hdd_ap_ctx_t *hdd_ap_ctx; uint8_t default_sap_channel = 6; + u16 reason_code; #ifdef WLAN_FEATURE_ROAM_OFFLOAD if (pRoamInfo && pRoamInfo->roamSynchInProgress) { /* change logging before release */ @@ -2135,37 +2136,12 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs } else { - if (pRoamInfo) { - eCsrAuthType authType = - pWextState->roamProfile.AuthType.authType[0]; - eCsrEncryptionType encryptionType = - pWextState->roamProfile.EncryptionType.encryptionType[0]; - v_BOOL_t isWep = - (((authType == eCSR_AUTH_TYPE_OPEN_SYSTEM) || - (authType == eCSR_AUTH_TYPE_SHARED_KEY)) && - ((encryptionType == eCSR_ENCRYPT_TYPE_WEP40) || - (encryptionType == eCSR_ENCRYPT_TYPE_WEP104) || - (encryptionType == - eCSR_ENCRYPT_TYPE_WEP40_STATICKEY) || - (encryptionType == - eCSR_ENCRYPT_TYPE_WEP104_STATICKEY))); - - /* In case of OPEN-WEP or SHARED-WEP authentication, - * send exact protocol reason code. This enables user - * applications to reconnect the station with correct - * configuration. - */ - hdd_connect_result(dev, pRoamInfo->bssid, - NULL, 0, NULL, 0, - (isWep && pRoamInfo->reasonCode) ? - pRoamInfo->reasonCode : - WLAN_STATUS_UNSPECIFIED_FAILURE, - GFP_KERNEL); - } else - hdd_connect_result(dev, pWextState->req_bssId, - NULL, 0, NULL, 0, - WLAN_STATUS_UNSPECIFIED_FAILURE, - GFP_KERNEL); + reason_code = WLAN_STATUS_UNSPECIFIED_FAILURE; + if (pRoamInfo && pRoamInfo->reasonCode) + reason_code = (u16)pRoamInfo->reasonCode; + + cfg80211_connect_result(dev, pWextState->req_bssId, + NULL, 0, NULL, 0, reason_code, GFP_KERNEL); } /* Clear the roam profile */ hdd_clearRoamProfileIe(pAdapter); |
