From 7bc4f912e9ffd4dbe72b2bdc3869d708b7dd48a4 Mon Sep 17 00:00:00 2001 From: Krunal Soni Date: Sun, 15 Nov 2015 23:41:56 -0800 Subject: [PATCH] qcacld-3.0: Add support for IBSS+SAP Provide necessary code changes to support IBSS+SAP concurrency for emulation platform only. Change-Id: I76dc023bd48ee79ba706f5a7009b1d8462c6b712 CRs-Fixed: 953796 --- core/cds/src/cds_concurrency.c | 16 +++++++++++++++- core/hdd/src/wlan_hdd_cfg80211.c | 15 +++++++++++++++ core/sme/src/csr/csr_util.c | 10 ++++++++-- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/core/cds/src/cds_concurrency.c b/core/cds/src/cds_concurrency.c index 48694243c276..fe41bb41c7e7 100644 --- a/core/cds/src/cds_concurrency.c +++ b/core/cds/src/cds_concurrency.c @@ -4660,11 +4660,25 @@ bool cds_allow_concurrency(hdd_context_t *hdd_ctx, enum cds_con_mode mode, cds_err("No IBSS, we have concurrent connections already"); goto done; } +#ifndef QCA_WIFI_3_0_EMU if (CDS_STA_MODE != conc_connection_list[0].mode) { /* err msg */ - cds_err("No IBSS, we have a non STA connection"); + cds_err("No IBSS, we've a non-STA connection"); goto done; } +#else + if (CDS_STA_MODE != conc_connection_list[0].mode && + CDS_SAP_MODE != conc_connection_list[0].mode) { + /* err msg */ + cds_err("No IBSS, we've a non-STA/SAP conn"); + goto done; + } +#endif + /* + * This logic protects STA and IBSS to come up on same + * band. If requirement changes then this condition + * needs to be removed + */ if (channel && (conc_connection_list[0].chan != channel) && CDS_IS_SAME_BAND_CHANNELS( diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index b904e4ddc6a8..f2cbcda32a63 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -374,6 +374,7 @@ static const struct ieee80211_iface_limit }, }; +#ifndef QCA_WIFI_3_0_EMU /* ADHOC (IBSS) limit */ static const struct ieee80211_iface_limit wlan_hdd_adhoc_iface_limit[] = { @@ -386,6 +387,20 @@ static const struct ieee80211_iface_limit .types = BIT(NL80211_IFTYPE_ADHOC), }, }; +#else +/* ADHOC (IBSS) limit */ +static const struct ieee80211_iface_limit + wlan_hdd_adhoc_iface_limit[] = { + { + .max = 1, + .types = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_AP), + }, + { + .max = 1, + .types = BIT(NL80211_IFTYPE_ADHOC), + }, +}; +#endif /* AP ( + AP ) combination */ static const struct ieee80211_iface_limit diff --git a/core/sme/src/csr/csr_util.c b/core/sme/src/csr/csr_util.c index a21cad315d38..8c9c1d869cec 100644 --- a/core/sme/src/csr/csr_util.c +++ b/core/sme/src/csr/csr_util.c @@ -1877,10 +1877,13 @@ csr_isconcurrentsession_valid(tpAniSirGlobal mac_ctx, uint32_t cur_sessionid, #endif if ((bss_persona == CDF_IBSS_MODE) && (connect_state != temp)) { + /* allow IBSS+SAP for Emulation only */ +#ifndef QCA_WIFI_3_0_EMU CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR, - FL("Can't start GO")); + FL("Can't start SAP")); return CDF_STATUS_E_FAILURE; +#endif } break; @@ -1916,10 +1919,13 @@ csr_isconcurrentsession_valid(tpAniSirGlobal mac_ctx, uint32_t cur_sessionid, (bss_persona == CDF_SAP_MODE)) && (connect_state != eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED)) { + /* allow IBSS+SAP for Emulation only */ +#ifndef QCA_WIFI_3_0_EMU CDF_TRACE(CDF_MODULE_ID_SME, CDF_TRACE_LEVEL_ERROR, - FL("Can't start GO")); + FL("Can't start GO/SAP")); return CDF_STATUS_E_FAILURE; +#endif } break; case CDF_P2P_CLIENT_MODE: