summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelvaraj, Sridhar <sselvara@codeaurora.org>2016-09-14 17:00:38 +0530
committerqcabuildsw <qcabuildsw@localhost>2016-10-07 15:52:46 -0700
commit5d95e631e3248e088f1034a7e53da1c0477c2bca (patch)
tree16fd91fae09bc8f17228f300918a93f210614fea
parentccd00e89a0ff4cbc29980f41f638e7ab532a76f4 (diff)
qcacld-3.0: Fix consecutive TDLS connection failure after TDLS add sta failure
qcacld-2.0 to qcacld-3.0 propagation. Currently, Failure of TDLS add sta is leading to failure of next consecutive tdls connection. Fix is to update the failure info to HDD and return error to supplicant. Change-Id: I0d46a198f2abb87b4a4350b454deb98c5e3b8211 CRs-Fixed: 958534
-rw-r--r--core/hdd/src/wlan_hdd_assoc.c2
-rw-r--r--core/hdd/src/wlan_hdd_tdls.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c
index e008534fb224..8810512e169b 100644
--- a/core/hdd/src/wlan_hdd_assoc.c
+++ b/core/hdd/src/wlan_hdd_assoc.c
@@ -3634,6 +3634,8 @@ hdd_roam_tdls_status_update_handler(hdd_adapter_t *pAdapter,
if (eSIR_SME_SUCCESS != pRoamInfo->statusCode) {
hdd_err("Add Sta failed. status code(=%d)",
pRoamInfo->statusCode);
+ pAdapter->tdlsAddStaStatus = QDF_STATUS_E_FAILURE;
+
} else {
/*
* Check if there is available index for this new TDLS
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c
index 6204e72aee8b..eaac53a0a77f 100644
--- a/core/hdd/src/wlan_hdd_tdls.c
+++ b/core/hdd/src/wlan_hdd_tdls.c
@@ -3624,7 +3624,7 @@ int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
hddTdlsPeer_t *pTdlsPeer;
uint16_t numCurrTdlsPeers;
unsigned long rc;
- long ret;
+ int ret;
int rate_idx;
ENTER();
@@ -3763,16 +3763,15 @@ int wlan_hdd_tdls_add_station(struct wiphy *wiphy,
(WAIT_TIME_TDLS_ADD_STA));
if (!rc) {
- QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
- "%s: timeout waiting for tdls add station indication",
- __func__);
- return -EPERM;
+ hdd_err("timeout waiting for tdls add station indication %ld peer link status %u",
+ rc, pTdlsPeer->link_status);
+ goto error;
}
if (QDF_STATUS_SUCCESS != pAdapter->tdlsAddStaStatus) {
QDF_TRACE(QDF_MODULE_ID_HDD, QDF_TRACE_LEVEL_ERROR,
"%s: Add Station is unsuccessful", __func__);
- return -EPERM;
+ goto error;
}
return 0;