wlan: FirstSet of Run Time Config variables

Support for run time configuration of
1. GET/SET ROAM DELTA
2. GET/SET ROAM SCAN PERIOD
3. GET/SET ROAM SCAN CHANNELS
4. GET/SET COUNTRYREV
6. GET/SET BAND
7. GET/SET ROAMTRIGGER
Prefer5G, RssiCatCap, FWMonitoring is removed from the ini
if LFR/CCX is enabled, FW RSSI Monitoring is enabled internally

CRs-Fixed: 450908
Change-Id: I21755ace757479949ef711ff4501c331fd333cc9
diff --git a/CORE/MAC/src/pe/pmm/pmmApi.c b/CORE/MAC/src/pe/pmm/pmmApi.c
index 9c8f343..4e1c009 100644
--- a/CORE/MAC/src/pe/pmm/pmmApi.c
+++ b/CORE/MAC/src/pe/pmm/pmmApi.c
@@ -38,7 +38,6 @@
  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  * PERFORMANCE OF THIS SOFTWARE.
  */
-
 /*
  * Airgo Networks, Inc proprietary. All rights reserved.
  * This file pmmApi.cc contains functions related to the API exposed
@@ -641,7 +640,7 @@
     tSirRetStatus   retCode = eSIR_SUCCESS;
     tSirMsgQ msgQ;
     tpEnterBmpsParams pBmpsParams = NULL;
-
+    tANI_U8     i = 0;
     tANI_U32    rssiFilterPeriod = 5;
     tANI_U32    numBeaconPerRssiAverage = 5;
     tANI_U32    bRssiFilterEnable = FALSE;
@@ -669,10 +668,45 @@
     if(wlan_cfgGetInt(pMac, WNI_CFG_RSSI_FILTER_PERIOD, &rssiFilterPeriod) != eSIR_SUCCESS)
         pmmLog(pMac, LOGP, FL("pmmCfg: cfgGet failed for Rssi filter period"));
 
+    // This flag can be overwritten when 11r/CCXEnabled=1 or FastTransition=1
     if(wlan_cfgGetInt(pMac, WNI_CFG_PS_ENABLE_RSSI_MONITOR, &bRssiFilterEnable) != eSIR_SUCCESS)
         pmmLog(pMac, LOGP, FL("pmmCfg: cfgGet failed for Rssi monitor enable flag"));
     pBmpsParams->bRssiFilterEnable = bRssiFilterEnable;
 
+#if  defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX)
+    // If there is a CCX assoc or 11r assoc we need to pick up the rssiFilterPeriod from the
+    // FT config value.
+    if (TRUE != pBmpsParams->bRssiFilterEnable)
+    {
+        for (i = 0; i < pMac->lim.maxBssId; i++)
+        {
+            if (limisFastTransitionRequired(pMac, i))
+            {
+                // We need to override the ini value to enable
+                // FW RSSI Monitoring. Basically if CCX or FT are enabled
+                // then enable FW RSSI Monitoring
+                pBmpsParams->bRssiFilterEnable = TRUE;
+                break;
+            }
+        }
+    }
+#endif
+
+#ifdef FEATURE_WLAN_LFR
+    /* if LFR is enabled, then enabled FW RSSI Monitoring */
+    if (TRUE != pBmpsParams->bRssiFilterEnable)
+    {
+        for (i = 0; i < pMac->lim.maxBssId; i++)
+        {
+            if (limIsFastRoamEnabled(pMac, i))
+            {
+                pBmpsParams->bRssiFilterEnable = TRUE;
+                break;
+            }
+        }
+    }
+#endif
+
     pBmpsParams->rssiFilterPeriod = (tANI_U8)rssiFilterPeriod;
 
     /* The numBeaconPerRssiAverage should be less than the max allowed (default set to 20 in CFG)
@@ -680,7 +714,7 @@
     if(wlan_cfgGetInt(pMac, WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE, &numBeaconPerRssiAverage) != eSIR_SUCCESS)
         pmmLog(pMac, LOGP, FL("pmmCfg: cfgGet failed for num beacon per rssi"));
 
-    pBmpsParams->numBeaconPerRssiAverage = 
+    pBmpsParams->numBeaconPerRssiAverage =
             (tANI_U8)GET_MIN_VALUE((tANI_U8) numBeaconPerRssiAverage, WNI_CFG_NUM_BEACON_PER_RSSI_AVERAGE_STAMAX);
 
     pmmLog (pMac, LOG1,