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
This commit is contained in:
Selvaraj, Sridhar 2016-09-14 17:00:38 +05:30 • committed by qcabuildsw
commit 5d95e631e3
2 changed files with 7 additions and 6 deletions

View file

@ -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

View file

@ -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;