wlan: Set home away time depending on scan channel max time

Home away time is default value is set to 3 (minimum value)
and this value is modified based on the scan channel max time.
Home away time should be atleast sum of twice the RF switching time
and scan channel max time

Change-Id: I6740c81582e10ea50d82f3f14504987093f87ae5
CRs-Fixed: 505463
diff --git a/CORE/SME/src/csr/csrApiRoam.c b/CORE/SME/src/csr/csrApiRoam.c
index 5edde86..b8e2453 100644
--- a/CORE/SME/src/csr/csrApiRoam.c
+++ b/CORE/SME/src/csr/csrApiRoam.c
@@ -1748,6 +1748,8 @@
         pParam->nRoamPrefer5GHz = pMac->roam.configParam.nRoamPrefer5GHz;
         pParam->nRoamIntraBand = pMac->roam.configParam.nRoamIntraBand;
         pParam->isWESModeEnabled = pMac->roam.configParam.isWESModeEnabled;
+        pParam->nProbes = pMac->roam.configParam.nProbes;
+        pParam->nRoamScanHomeAwayTime = pMac->roam.configParam.nRoamScanHomeAwayTime;
 #endif
 #ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
         pParam->isRoamOffloadScanEnabled = pMac->roam.configParam.isRoamOffloadScanEnabled;
@@ -14820,7 +14822,6 @@
    tCsrRoamSession *pSession;
    tANI_U8 i,num_channels = 0, ucDot11Mode;
    tANI_U8 *ChannelList = NULL;
-   tANI_U8  MaxDwellPeriod;
    tANI_U32 sessionId;
    eHalStatus status = eHAL_STATUS_SUCCESS;
    tpCsrChannelInfo    currChannelListInfo;
@@ -15006,21 +15007,8 @@
             pMac->roam.roamSession[sessionId].connectedProfile.MDID.mobilityDomain;
     pRequestBuf->nProbes = pMac->roam.configParam.nProbes;
 
-    /*Max Dwell Period is calculated here to ensure that,
-     * Home Away Time is atleast equal to (MaxDwellPeriod +
-     * (2*SRF)), where SRF is the RF Switching time.The RF
-     * switching time is considered twice to consider the
-     * time to go off channel and return to the home channel.*/
-    MaxDwellPeriod = pRequestBuf->NeighborScanChannelMaxTime/pRequestBuf->nProbes;
-    if(MaxDwellPeriod < 1)
-       MaxDwellPeriod = 1;
-    if(pMac->roam.configParam.nRoamScanHomeAwayTime <
-            (MaxDwellPeriod + (2 * SIR_ROAM_SCAN_CHANNEL_SWITCH_TIME)))
-    {
-       pRequestBuf->HomeAwayTime = MaxDwellPeriod + (2 * SIR_ROAM_SCAN_CHANNEL_SWITCH_TIME);
-    } else {
     pRequestBuf->HomeAwayTime = pMac->roam.configParam.nRoamScanHomeAwayTime;
-    }
+
    /*Prepare a probe request for 2.4GHz band and one for 5GHz band*/
     ucDot11Mode = (tANI_U8) csrTranslateToWNICfgDot11Mode(pMac,
                                                            csrFindBestPhyMode( pMac, pMac->roam.configParam.phyMode ));