wlan: MCC GO+STA different B.I
Fixes: Add one qcom_cfg.ini item and override SME concurrency policy
check
MCC: Add gAllowMCCGODiffBI paramter in qcom_cfg.ini to accept different
beacon interval than STA's. This is mainly to pass Wi-Fi Cert. 5.1.12
only. Usually different B.I GO+STA is not handled very well by
RIVA firmware at this point, so do not turn on this excpet Wi-Fi
cert. purpose.
Change-Id: Ia7d425670d6495d713ca6a7e92fa4c09508c4ef1
CRs-Fixed: 392112
diff --git a/CORE/HDD/inc/wlan_hdd_cfg.h b/CORE/HDD/inc/wlan_hdd_cfg.h
index 32818fa..a707ce1 100644
--- a/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1291,6 +1291,16 @@
#define CFG_ENABLE_MCC_ENABLED_DEFAULT ( 0 )
/*
+ * Allow GO in MCC mode to accept different beacon interval than STA's.
+ * Added for Wi-Fi Cert. 5.1.12
+ * Default: Disable
+ */
+#define CFG_ALLOW_MCC_GO_DIFF_BI_NAME "gAllowMCCGODiffBI"
+#define CFG_ALLOW_MCC_GO_DIFF_BI_MIN ( 0 )
+#define CFG_ALLOW_MCC_GO_DIFF_BI_MAX ( 1 )
+#define CFG_ALLOW_MCC_GO_DIFF_BI_DEFAULT ( 0 )
+
+/*
* Enable/Disable Thermal Mitigation feature
* Default: Disable
*/
@@ -1592,6 +1602,7 @@
v_S31_t linkSpeedRssiHigh;
v_S31_t linkSpeedRssiLow;
v_U8_t enableMCC;
+ v_U8_t allowMCCGODiffBI;
#ifdef WLAN_FEATURE_P2P
v_BOOL_t isP2pDeviceAddrAdministrated;
#endif
diff --git a/CORE/HDD/src/wlan_hdd_cfg.c b/CORE/HDD/src/wlan_hdd_cfg.c
index 5b31fb2..3ad2c46 100644
--- a/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1534,6 +1534,13 @@
CFG_ENABLE_MCC_ENABLED_MIN,
CFG_ENABLE_MCC_ENABLED_MAX ),
+REG_VARIABLE( CFG_ALLOW_MCC_GO_DIFF_BI_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, allowMCCGODiffBI,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_ALLOW_MCC_GO_DIFF_BI_DEFAULT,
+ CFG_ALLOW_MCC_GO_DIFF_BI_MIN,
+ CFG_ALLOW_MCC_GO_DIFF_BI_MAX ),
+
REG_VARIABLE( CFG_THERMAL_MIGRATION_ENABLE_NAME, WLAN_PARAM_Integer,
hdd_config_t, thermalMitigationEnable,
VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
@@ -3119,6 +3126,7 @@
//Enable/Disable MCC
smeConfig.csrConfig.fEnableMCCMode = pConfig->enableMCC;
+ smeConfig.csrConfig.fAllowMCCGODiffBI = pConfig->allowMCCGODiffBI;
halStatus = sme_UpdateConfig( pHddCtx->hHal, &smeConfig);
if ( !HAL_STATUS_SUCCESS( halStatus ) )
diff --git a/CORE/SME/inc/csrApi.h b/CORE/SME/inc/csrApi.h
index 34dc3aa..b76079c 100644
--- a/CORE/SME/inc/csrApi.h
+++ b/CORE/SME/inc/csrApi.h
@@ -922,7 +922,8 @@
tANI_U32 nRoamingTime; //In seconds, CSR will try this long before gives up. 0 means no roaming
tANI_U8 bCatRssiOffset; //to set the RSSI difference for each category
tANI_U8 fEnableMCCMode; //to set MCC Enable/Disable mode
-
+ tANI_U8 fAllowMCCGODiffBI; //to allow MCC GO different B.I than STA's. NOTE: make sure if RIVA firmware can handle this combination before enabling this
+ //at the moment, this flag is provided only to pass Wi-Fi Cert. 5.1.12
tCsr11dinfo Csr11dinfo;
//Whether to limit the channels to the ones set in Csr11dInfo. If true, the opertaional
//channels are limited to the default channel list. It is an "AND" operation between the
diff --git a/CORE/SME/inc/csrInternal.h b/CORE/SME/inc/csrInternal.h
index 9edb85a..504f9dc 100644
--- a/CORE/SME/inc/csrInternal.h
+++ b/CORE/SME/inc/csrInternal.h
@@ -493,6 +493,7 @@
tANI_BOOLEAN shortSlotTime;
tANI_BOOLEAN ProprietaryRatesEnabled;
tANI_BOOLEAN fenableMCCMode;
+ tANI_BOOLEAN fAllowMCCGODiffBI;
tANI_U16 TxRate;
tANI_U8 AdHocChannel24;
tANI_U8 AdHocChannel5G;
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index e57bb66..78ba495 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -1097,6 +1097,8 @@
pMac->roam.configParam.Is11hSupportEnabled = pParam->Is11hSupportEnabled;
pMac->roam.configParam.fenableMCCMode = pParam->fEnableMCCMode;
+ pMac->roam.configParam.fAllowMCCGODiffBI = pParam->fAllowMCCGODiffBI;
+
/* channelBondingMode5GHz plays a dual role right now
* INFRA STA will use this non zero value as CB enabled and SOFTAP will use this non-zero value to determine the secondary channel offset
* This is how channelBondingMode5GHz works now and this is kept intact to avoid any cfg.ini change
diff --git a/CORE/SME/src/csr/csrUtil.c b/CORE/SME/src/csr/csrUtil.c
index 342c28f..9148c1a 100644
--- a/CORE/SME/src/csr/csrUtil.c
+++ b/CORE/SME/src/csr/csrUtil.c
@@ -2807,6 +2807,10 @@
else if(pMac->roam.roamSession[sessionId].bssParams.bssPersona
== VOS_P2P_GO_MODE) //Check for P2P go scenario
{
+ /* if GO in MCC support different beacon interval, return success */
+ if ( pMac->roam.configParam.fAllowMCCGODiffBI == TRUE)
+ return eHAL_STATUS_SUCCESS;
+
if ((pMac->roam.roamSession[sessionId].bssParams.operationChn
!= channelId ) &&
(pMac->roam.roamSession[sessionId].bssParams.beaconInterval