From a27049adf39bd34e4744aa8db9bcb2f143507be0 Mon Sep 17 00:00:00 2001 From: Yun Park Date: Tue, 11 Oct 2016 12:30:49 -0700 Subject: [PATCH] qcacld-3.0: Fix to disable MCC path for DBS and TX_FLOW_CONTROL_V2 Add code to check MCC for DBS case, and remove MCC mode switch message to IPA when TX_FLOW_CONTROL_V2 is defined. Change-Id: Ic09d1cbcb2df98b4b62b4fff27d44b67ce57c196 CRs-Fixed: 1077246 --- core/cds/src/cds_concurrency.c | 37 ++++++++++++++++++---------------- core/hdd/inc/wlan_hdd_ipa.h | 10 ++++++++- core/hdd/src/wlan_hdd_ipa.c | 2 ++ 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index e5519c4727c2..e8426415a1ee 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -3018,36 +3018,39 @@ static void cds_dump_current_concurrency(void) } /** - * cds_current_concurrency_is_scc() - To check the current - * concurrency combination if it is doing SCC + * cds_current_concurrency_is_mcc() - To check the current + * concurrency combination if it is doing MCC * - * This routine is called to check if it is doing SCC + * This routine is called to check if it is doing MCC * - * Return: True - SCC, False - Otherwise + * Return: True - MCC, False - Otherwise */ -static bool cds_current_concurrency_is_scc(void) +static bool cds_current_concurrency_is_mcc(void) { uint32_t num_connections = 0; - bool is_scc = false; + bool is_mcc = false; num_connections = cds_get_connection_count(); switch (num_connections) { case 1: - is_scc = true; break; case 2: - if (conc_connection_list[0].chan == - conc_connection_list[1].chan) { - is_scc = true; + if ((conc_connection_list[0].chan != + conc_connection_list[1].chan) && + (conc_connection_list[0].mac == + conc_connection_list[1].mac)) { + is_mcc = true; } break; case 3: - if ((conc_connection_list[0].chan == - conc_connection_list[1].chan) && - (conc_connection_list[0].chan == - conc_connection_list[2].chan)){ - is_scc = true; + if ((conc_connection_list[0].chan != + conc_connection_list[1].chan) || + (conc_connection_list[0].chan != + conc_connection_list[2].chan) || + (conc_connection_list[1].chan != + conc_connection_list[2].chan)){ + is_mcc = true; } break; default: @@ -3056,7 +3059,7 @@ static bool cds_current_concurrency_is_scc(void) break; } - return is_scc; + return is_mcc; } /** @@ -3342,7 +3345,7 @@ void cds_dump_concurrency_info(void) adapterNode = pNext; } cds_dump_current_concurrency(); - hdd_ctx->mcc_mode = !cds_current_concurrency_is_scc(); + hdd_ctx->mcc_mode = cds_current_concurrency_is_mcc(); } #ifdef FEATURE_WLAN_TDLS diff --git a/core/hdd/inc/wlan_hdd_ipa.h b/core/hdd/inc/wlan_hdd_ipa.h index f7221a653daf..54e7b1d2ca67 100644 --- a/core/hdd/inc/wlan_hdd_ipa.h +++ b/core/hdd/inc/wlan_hdd_ipa.h @@ -88,7 +88,15 @@ void hdd_ipa_uc_rt_debug_host_dump(hdd_context_t *hdd_ctx); void hdd_ipa_uc_stat_request(hdd_adapter_t *adapter, uint8_t reason); bool hdd_ipa_is_enabled(hdd_context_t *pHddCtx); bool hdd_ipa_uc_is_enabled(hdd_context_t *pHddCtx); -int hdd_ipa_send_mcc_scc_msg(hdd_context_t *pHddCtx, bool mcc_mode); +#ifndef QCA_LL_TX_FLOW_CONTROL_V2 +int hdd_ipa_send_mcc_scc_msg(hdd_context_t *hdd_ctx, bool mcc_mode); +#else +static inline int hdd_ipa_send_mcc_scc_msg(hdd_context_t *hdd_ctx, + bool mcc_mode) +{ + return 0; +} +#endif int hdd_ipa_uc_ssr_reinit(void); int hdd_ipa_uc_ssr_deinit(void); void hdd_ipa_uc_force_pipe_shutdown(hdd_context_t *hdd_ctx); diff --git a/core/hdd/src/wlan_hdd_ipa.c b/core/hdd/src/wlan_hdd_ipa.c index 4bf1436322d6..f6e10a735b7a 100644 --- a/core/hdd/src/wlan_hdd_ipa.c +++ b/core/hdd/src/wlan_hdd_ipa.c @@ -3468,6 +3468,7 @@ static void hdd_ipa_msg_free_fn(void *buff, uint32_t len, uint32_t type) qdf_mem_free(buff); } +#ifndef QCA_LL_TX_FLOW_CONTROL_V2 /** * hdd_ipa_send_mcc_scc_msg() - send IPA WLAN_SWITCH_TO_MCC/SCC message * @mcc_mode: 0=MCC/1=SCC @@ -3526,6 +3527,7 @@ int hdd_ipa_send_mcc_scc_msg(hdd_context_t *pHddCtx, bool mcc_mode) return ret; } +#endif /** * hdd_ipa_wlan_event_to_str() - convert IPA WLAN event to string