summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreelakshmi Konamki <c_skonam@qti.qualcomm.com>2015-05-18 13:35:15 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2015-06-25 00:58:41 -0700
commit21ff36ca60eae7e5ef47dba3f19c3638819e99d4 (patch)
tree033c301bd3a9cbbd88f7187f8b597efd6c02f8c2
parentef45a2c2810b52f507d19cf05ff2a063c524c7a4 (diff)
qcacld-2.0: TDLS:Fix wrong status when mac is disabled from HAL
This is prima to qcacld-2.0 propagation After disabling a particular peer mac from HAL, the status of the peer was always coming as enabled, fix the same. Change-Id: I27ac4602a05880c545b8c8d071ca9a8e7b52c824 CRs-Fixed: 734378
-rw-r--r--CORE/HDD/src/wlan_hdd_tdls.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_tdls.c b/CORE/HDD/src/wlan_hdd_tdls.c
index 97e8ef7ac766..713cd40aa205 100644
--- a/CORE/HDD/src/wlan_hdd_tdls.c
+++ b/CORE/HDD/src/wlan_hdd_tdls.c
@@ -2900,16 +2900,25 @@ int wlan_hdd_tdls_get_status(hdd_adapter_t *pAdapter,
tANI_S32 *reason)
{
hddTdlsPeer_t *curr_peer;
+ hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
curr_peer = wlan_hdd_tdls_find_peer(pAdapter, mac, TRUE);
- if (curr_peer == NULL)
- {
+ if (curr_peer == NULL) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
FL("curr_peer is NULL"));
- return -EINVAL;
+ *state = QCA_WIFI_HAL_TDLS_DISABLED;
+ *reason = eTDLS_LINK_UNSPECIFIED;
+ } else {
+ if (pHddCtx->cfg_ini->fTDLSExternalControl &&
+ (FALSE == curr_peer->isForcedPeer)) {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ FL("curr_peer is not Forced"));
+ *state = QCA_WIFI_HAL_TDLS_DISABLED;
+ *reason = eTDLS_LINK_UNSPECIFIED;
+ } else {
+ wlan_hdd_tdls_get_wifi_hal_state(curr_peer, state, reason);
+ }
}
-
- wlan_hdd_tdls_get_wifi_hal_state(curr_peer, state, reason);
return (0);
}