diff options
| author | Kabilan Kannan <kabilank@codeaurora.org> | 2016-11-14 01:49:50 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2016-11-22 16:48:18 -0800 |
| commit | 4b8deabfa3365ae43459de65f71b515b76f4501d (patch) | |
| tree | fd7c10c8177e72232555bece0bef685460e5c816 | |
| parent | 14ffc5ee680e03c256a627c22a184c0ae4065b76 (diff) | |
qcacld-3.0: Fix TDLS connection problem
TDLS connection is not established consistently, when the
system comes out of concurrency. This issue happens, when
the previous tdls connection is not cleared completely.
Add changes in the host driver to clear the stale
entries, when system comes out of concurrency.
Change-Id: I7ab7c1e424cb03e0edff9800114e01205e19d63a
CRs-Fixed: 1089497
| -rw-r--r-- | core/hdd/src/wlan_hdd_tdls.c | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/core/hdd/src/wlan_hdd_tdls.c b/core/hdd/src/wlan_hdd_tdls.c index 7598f2be6b3b..0dcbed14de4b 100644 --- a/core/hdd/src/wlan_hdd_tdls.c +++ b/core/hdd/src/wlan_hdd_tdls.c @@ -288,7 +288,6 @@ void hdd_tdls_notify_mode_change(hdd_adapter_t *adapter, hdd_context_t *hddctx) wlan_hdd_tdls_disable_offchan_and_teardown_links(hddctx); } - /** * wlan_hdd_tdls_pre_setup_init_work() - schedule work for tdls pre-setup * @pHddTdlsCtx: HDD TDLS context @@ -663,6 +662,8 @@ static void wlan_hdd_tdls_del_non_forced_peers(tdlsCtx_t *hdd_tdls_ctx) */ void hdd_tdls_context_init(hdd_context_t *hdd_ctx) { + uint8_t sta_idx; + mutex_init(&hdd_ctx->tdls_lock); qdf_spinlock_create(&hdd_ctx->tdls_ct_spinlock); @@ -680,6 +681,22 @@ void hdd_tdls_context_init(hdd_context_t *hdd_ctx) hdd_ctx->tdls_nss_teardown_complete = false; hdd_ctx->tdls_nss_transition_mode = TDLS_NSS_TRANSITION_UNKNOWN; + if (hdd_ctx->config->fEnableTDLSSleepSta || + hdd_ctx->config->fEnableTDLSBufferSta || + hdd_ctx->config->fEnableTDLSOffChannel) + hdd_ctx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN; + else + hdd_ctx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA; + + hdd_notice("max_num_tdls_sta: %d", hdd_ctx->max_num_tdls_sta); + + for (sta_idx = 0; sta_idx < hdd_ctx->max_num_tdls_sta; sta_idx++) { + hdd_ctx->tdlsConnInfo[sta_idx].staId = 0; + hdd_ctx->tdlsConnInfo[sta_idx].sessionId = 255; + qdf_mem_zero(&hdd_ctx->tdlsConnInfo[sta_idx].peerMac, + QDF_MAC_ADDR_SIZE); + } + /* This flag will set be true, only when device operates in * standalone STA mode */ @@ -715,7 +732,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter); tdlsCtx_t *pHddTdlsCtx; int i; - uint8_t staIdx; if (NULL == pHddCtx) return -EINVAL; @@ -788,23 +804,6 @@ int wlan_hdd_tdls_init(hdd_adapter_t *pAdapter) sme_set_tdls_power_save_prohibited(WLAN_HDD_GET_HAL_CTX(pAdapter), pAdapter->sessionId, 0); - - if (pHddCtx->config->fEnableTDLSSleepSta || - pHddCtx->config->fEnableTDLSBufferSta || - pHddCtx->config->fEnableTDLSOffChannel) - pHddCtx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA_P_UAPSD_OFFCHAN; - else - pHddCtx->max_num_tdls_sta = HDD_MAX_NUM_TDLS_STA; - - hdd_notice("max_num_tdls_sta: %d", pHddCtx->max_num_tdls_sta); - - for (staIdx = 0; staIdx < pHddCtx->max_num_tdls_sta; staIdx++) { - pHddCtx->tdlsConnInfo[staIdx].staId = 0; - pHddCtx->tdlsConnInfo[staIdx].sessionId = 255; - qdf_mem_zero(&pHddCtx->tdlsConnInfo[staIdx].peerMac, - QDF_MAC_ADDR_SIZE); - } - pHddTdlsCtx->pAdapter = pAdapter; pHddTdlsCtx->curr_candidate = NULL; |
