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;