From 595aee588da674fa5b656e398bff979987283a71 Mon Sep 17 00:00:00 2001 From: Kabilan Kannan Date: Thu, 26 Jan 2017 17:02:01 -0800 Subject: qcacld-3.0: Fix TDLS connection problem in concurrency cases TDLS conection is not happening consistently when the system goes in and out of sta/p2p concurrency. TDLS set mode source bit map is not cleared correctly in concurrency situation and it causes connection problem. Clear the TDLS set mode source bit map correctly in concurrency cases. Change-Id: Ided72067e194794f45382c2c3ba32343a3ab2e59 CRs-Fixed: 1116900 --- core/hdd/src/wlan_hdd_tdls.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 93682925331b..b02738038af8 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -1617,22 +1617,24 @@ static void wlan_hdd_tdls_set_mode(hdd_context_t *pHddCtx, mutex_unlock(&pHddCtx->tdls_lock); hdd_notice("already in mode %d", (int)tdls_mode); + switch (tdls_mode) { + /* TDLS is already enabled hence clear source mask, return */ + case eTDLS_SUPPORT_ENABLED: + case eTDLS_SUPPORT_EXPLICIT_TRIGGER_ONLY: + case eTDLS_SUPPORT_EXTERNAL_CONTROL: + clear_bit((unsigned long)source, + &pHddCtx->tdls_source_bitmap); + hdd_notice("clear source mask:%d", source); + return; /* TDLS is already disabled hence set source mask, return */ - if (eTDLS_SUPPORT_DISABLED == tdls_mode) { + case eTDLS_SUPPORT_DISABLED: set_bit((unsigned long)source, &pHddCtx->tdls_source_bitmap); hdd_notice("set source mask:%d", source); return; - } - - /* TDLS is already enabled hence clear source mask, return */ - if (eTDLS_SUPPORT_ENABLED == tdls_mode) { - clear_bit((unsigned long)source, - &pHddCtx->tdls_source_bitmap); - hdd_notice("clear source mask:%d", source); + default: return; } - return; } status = hdd_get_front_adapter(pHddCtx, &pAdapterNode); -- cgit v1.2.3