wlan: prima: fixing regressions in 11k bcnrpt code

The measurement type and duration differ for various
channels only in the case of CCX/ESE, for the normal
beacon report case they are the same for all the
channels being measured. Hence in this case there
is no need here to maintain measurement duration and
type in an array. Instead we could check if it is a
11k request and access only the contents at index 0.
This will avoid the changes in driver to populate
the array always.

Change-Id: I1b9cc9b66dc302c3ff092aa5e14a932b41b3e1e4
CRs-Fixed: 626721
diff --git a/CORE/SME/src/rrm/sme_rrm.c b/CORE/SME/src/rrm/sme_rrm.c
index 5b4ece6..7f8d638 100644
--- a/CORE/SME/src/rrm/sme_rrm.c
+++ b/CORE/SME/src/rrm/sme_rrm.c
@@ -689,7 +689,12 @@
    if ((pSmeRrmContext->currentIndex) >= pSmeRrmContext->channelList.numOfChannels)
        return status;
 
-   scanType = pSmeRrmContext->measMode[pSmeRrmContext->currentIndex];
+   if( eRRM_MSG_SOURCE_ESE_UPLOAD == pSmeRrmContext->msgSource ||
+       eRRM_MSG_SOURCE_LEGACY_ESE == pSmeRrmContext->msgSource )
+       scanType = pSmeRrmContext->measMode[pSmeRrmContext->currentIndex];
+   else
+       scanType = pSmeRrmContext->measMode[0];
+
    if ((eSIR_ACTIVE_SCAN == scanType) || (eSIR_PASSIVE_SCAN == scanType))
    {
 #if defined WLAN_VOWIFI_DEBUG
@@ -724,7 +729,12 @@
 
        /* set min and max channel time */
        scanRequest.minChnTime = 0; //pSmeRrmContext->duration; Dont use min timeout.
-       scanRequest.maxChnTime = pSmeRrmContext->duration[pSmeRrmContext->currentIndex];
+       if( eRRM_MSG_SOURCE_ESE_UPLOAD == pSmeRrmContext->msgSource ||
+           eRRM_MSG_SOURCE_LEGACY_ESE == pSmeRrmContext->msgSource )
+          scanRequest.maxChnTime = pSmeRrmContext->duration[pSmeRrmContext->currentIndex];
+       else
+          scanRequest.maxChnTime = pSmeRrmContext->duration[0];
+
        smsLog( pMac, LOG1, "Scan Type(%d) Max Dwell Time(%d)", scanRequest.scanType,
                   scanRequest.maxChnTime );
 
@@ -888,8 +898,8 @@
 
    pSmeRrmContext->token = pBeaconReq->uDialogToken;
    pSmeRrmContext->regClass = pBeaconReq->channelInfo.regulatoryClass;
-         pSmeRrmContext->randnIntvl = VOS_MAX( pBeaconReq->randomizationInterval, pSmeRrmContext->rrmConfig.maxRandnInterval );
-         pSmeRrmContext->currentIndex = 0;
+   pSmeRrmContext->randnIntvl = VOS_MAX( pBeaconReq->randomizationInterval, pSmeRrmContext->rrmConfig.maxRandnInterval );
+   pSmeRrmContext->currentIndex = 0;
    pSmeRrmContext->msgSource = pBeaconReq->msgSource;
    vos_mem_copy((tANI_U8*)&pSmeRrmContext->measMode, (tANI_U8*)&pBeaconReq->fMeasurementtype, SIR_ESE_MAX_MEAS_IE_REQS);
    vos_mem_copy((tANI_U8*)&pSmeRrmContext->duration, (tANI_U8*)&pBeaconReq->measurementDuration, SIR_ESE_MAX_MEAS_IE_REQS);