prima: Reduce expiration time of traffic timer during roaming

Currently, traffic timer started for 8secs after successful connection to
allow for key completion and DHCP. As there is no DHCP during roaming,
this delay is not required. So, stop this timer during roaming and start a
timer of minimal duration to allow STA to enter power save immediately
after key completion.

Change-Id: I6c6111fc1aacb524da463914d357710a7f125f4a
CRs-Fixed: 868916
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 9aa5147..3a1bf9f 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -3305,7 +3305,6 @@
                        before the ENTER_BMPS_REQ ensures Listen Interval is
                        regained back to LI * Modulated DTIM */
                     hdd_set_pwrparams(pHddCtx);
-                    pHddStaCtx->hdd_ReassocScenario = VOS_FALSE;
 
                     /* At this point, device should not be in BMPS;
                        if due to unexpected scenario, if we are in BMPS,
@@ -3320,6 +3319,21 @@
                                          eSME_FULL_PWR_NEEDED_BY_HDD);
                     }
                 }
+
+                if ((pHddCtx) &&
+                     FULL_POWER == pmcGetPmcState(pHddCtx->hHal) &&
+                     VOS_TRUE == pHddStaCtx->hdd_ReassocScenario)
+                {
+                    hddLog( LOG1, FL("Device in full power."
+                           "Stop and start traffic timer for roaming"));
+                    pmcStopTrafficTimer(pHddCtx->hHal);
+                    if (pmcStartTrafficTimer(pHddCtx->hHal,
+                        TRAFFIC_TIMER_ROAMING) != eHAL_STATUS_SUCCESS)
+                    {
+                       hddLog(LOGP, FL("Cannot start traffic timer"));
+                    }
+                }
+
                 halStatus = hdd_RoamSetKeyCompleteHandler( pAdapter, pRoamInfo, roamId, roamStatus, roamResult );
                 pHddStaCtx->hdd_ReassocScenario = FALSE;
             }