diff options
| author | Nitesh Shah <niteshs@codeaurora.org> | 2017-02-23 16:45:44 +0530 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-03-01 00:38:10 -0800 |
| commit | e798a4fe6d575c85902b9c5a040b6579e1fb8232 (patch) | |
| tree | d54d34bee5d3b9e6a45952d071c946e83d28f2cb | |
| parent | 869651fd3b62474e7ae09f18e667e1ce2d15f54a (diff) | |
qcacld-3.0: Enable TDLS conn tracker while updating tdls info
TDLS connection tracker gets disabled while decrementing the
session. While incrementing the session, cds_set_tdls_ct_mode()
is called first, which does not enable TDLS connection tracker
as TDLS mode is already disabled. Then, wlan_hdd_update_tdls_
info() is called that enables TDLS mode, but still TDLS
connection tracker is disabled. TDLS connection tracker gets
enabled only in wlan_hdd_tdls_scan_done_callback().
The change is to enable TDLS connection tracker whenever
wlan_hdd_update_tdls_info() enables TDLS mode.
Change-Id: I00acaebdea737c4482b204ddc25df6b15b330254
CRs-Fixed: 2009566
| -rw-r--r-- | core/hdd/src/wlan_hdd_assoc.c | 3 | ||||
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 24 |
2 files changed, 14 insertions, 13 deletions
diff --git a/core/hdd/src/wlan_hdd_assoc.c b/core/hdd/src/wlan_hdd_assoc.c index 59c88456b88d..18d571cff83e 100644 --- a/core/hdd/src/wlan_hdd_assoc.c +++ b/core/hdd/src/wlan_hdd_assoc.c @@ -3529,7 +3529,8 @@ static QDF_STATUS hdd_tdls_connection_tracker_update(hdd_adapter_t *adapter, roam_info->reasonCode == eWMI_TDLS_SCAN_COMPLETED_EVENT) hdd_ctx->enable_tdls_connection_tracker = true; - + hdd_info("hdd_ctx->enable_tdls_connection_tracker %d", + hdd_ctx->enable_tdls_connection_tracker); } else { hdd_err("TDLS not connected, ignore notification, reason: %d", roam_info->reasonCode); diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 2abbe0129382..ea8cc6255779 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -292,6 +292,7 @@ void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx) mutex_lock(&hddctx->tdls_lock); hddctx->enable_tdls_connection_tracker = false; mutex_unlock(&hddctx->tdls_lock); + hdd_info("hdd_ctx->enable_tdls_connection_tracker: 0"); wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx); } @@ -689,6 +690,7 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx, bool ssr) * standalone STA mode */ hdd_ctx->enable_tdls_connection_tracker = false; + hdd_info("hdd_ctx->enable_tdls_connection_tracker: 0"); hdd_ctx->concurrency_marked = false; } @@ -705,6 +707,7 @@ void hdd_tdls_context_destroy(hdd_context_t *hdd_ctx) hdd_ctx->tdls_external_peer_count = 0; hdd_ctx->concurrency_marked = false; hdd_ctx->enable_tdls_connection_tracker = false; + hdd_info("hdd_ctx->enable_tdls_connection_tracker: 0"); mutex_destroy(&hdd_ctx->tdls_lock); qdf_spinlock_destroy(&hdd_ctx->tdls_ct_spinlock); } @@ -1858,13 +1861,13 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, if (!hdd_tdls_ctx) { /* may be TDLS is not applicable for this adapter */ hdd_err("HDD TDLS context is null"); - return; + goto done; } /* If TDLS support is disabled then no need to update target */ if (false == hdd_ctx->config->fEnableTDLSSupport) { hdd_err("TDLS not enabled"); - return; + goto done; } hdd_info("tdls_prohibited: %d, tdls_chan_swit_prohibited: %d", @@ -1875,7 +1878,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, if (hdd_ctx->set_state_info.set_state_cnt == 0 && tdls_prohibited) { mutex_unlock(&hdd_ctx->tdls_lock); - return; + goto done; } /* If AP or caller indicated TDLS Prohibited then disable tdls mode */ @@ -1893,7 +1896,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, if (!tdls_param) { mutex_unlock(&hdd_ctx->tdls_lock); hdd_err("memory allocation failed for tdlsParams"); - return; + goto done; } /* If any concurrency detected, teardown all TDLS links and disable @@ -1912,7 +1915,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, wlan_hdd_tdls_disable_offchan_and_teardown_links( hdd_ctx); qdf_mem_free(tdls_param); - return; + goto done; } tdls_prohibited = true; hdd_ctx->tdls_mode = eTDLS_SUPPORT_NOT_ENABLED; @@ -1970,7 +1973,7 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, true); if (QDF_STATUS_SUCCESS != qdf_ret_status) { qdf_mem_free(tdls_param); - return; + goto done; } mutex_lock(&hdd_ctx->tdls_lock); @@ -1986,6 +1989,8 @@ void wlan_hdd_update_tdls_info(hdd_adapter_t *adapter, bool tdls_prohibited, hdd_ctx->set_state_info.set_state_cnt); mutex_unlock(&hdd_ctx->tdls_lock); +done: + cds_set_tdls_ct_mode(hdd_ctx); return; } @@ -2051,15 +2056,10 @@ void wlan_hdd_tdls_notify_disconnect(hdd_adapter_t *adapter, bool lfr_roam) if (!lfr_roam && !hdd_ctx->concurrency_marked) { temp_adapter = wlan_hdd_tdls_get_adapter( hdd_ctx); - if (NULL != temp_adapter) { + if (NULL != temp_adapter) wlan_hdd_update_tdls_info(temp_adapter, false, false); - /* Enable connection tracker, if it is implicit and - * external control mode. - */ - cds_set_tdls_ct_mode(hdd_ctx); - } } } |
