Merge "prima: Enhancement to RRM measurement" into wlan-driver.lnx.1.0-dev.1.0
diff --git a/CORE/MAC/src/cfg/cfgApi.c b/CORE/MAC/src/cfg/cfgApi.c
index cd76522..9047d3a 100644
--- a/CORE/MAC/src/cfg/cfgApi.c
+++ b/CORE/MAC/src/cfg/cfgApi.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -1055,7 +1055,7 @@
         return eSIR_FAILURE;
       }
 #if defined WLAN_VOWIFI_DEBUG
-      PELOGE(cfgLog( pMac, LOGE, "RRM = %d",val );)
+      PELOGE(cfgLog( pMac, LOG1, "RRM = %d",val );)
 #endif
       if (val)
         pCapInfo->rrm = 1;
diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c
index 2c5276c..d4f33e9 100644
--- a/CORE/SME/src/rrm/sme_rrm.c
+++ b/CORE/SME/src/rrm/sme_rrm.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2014, 2016 The Linux Foundation. All rights reserved.
  *
  * Previously licensed under the ISC license by Qualcomm Atheros, Inc.
  *
@@ -520,6 +520,8 @@
 #endif
    }
 
+   smsLog(pMac, LOG1, FL("RRM Measurement Done %d"), measurementDone);
+
    if (NULL == pResult)
    {
       // no scan results
@@ -596,22 +598,24 @@
     * whether to send a report or not.
     */
 
+   if (counter || measurementDone) {
 #if defined(FEATURE_WLAN_ESE_UPLOAD)
-   if (eRRM_MSG_SOURCE_ESE_UPLOAD == pSmeRrmContext->msgSource)
-   {
-       status = sme_EseSendBeaconReqScanResults(pMac,
+       if (eRRM_MSG_SOURCE_ESE_UPLOAD == pSmeRrmContext->msgSource)
+       {
+           status = sme_EseSendBeaconReqScanResults(pMac,
                                                 sessionId,
                                                 chanList[0],
                                                 pScanResultsArr,
                                                 measurementDone,
                                                 counter);
-   }
-   else
+       }
+       else
 #endif /*FEATURE_WLAN_ESE_UPLOAD*/
-       status = sme_RrmSendBeaconReportXmitInd( pMac,
+           status = sme_RrmSendBeaconReportXmitInd( pMac,
                                                 pScanResultsArr,
                                                 measurementDone,
                                                 counter);
+   }
 
    sme_ScanResultPurge(pMac, pResult);