qcacld-3.0: Set burst duration when using short BI

qcacld-2.0 to qcacld-3.0 propagation

When the DUT connects to an AP whose BI is short, for
example 25ms. Per the fw scan schedule mechanism, the
TBTT scan has high priority. Then the scan issued by
host will be timeout.

To mitigate this issue, enable the burst scan feature
by setting the burst scan duration.

Change-Id: Id28e9d1ec242c205481fb3b7242134b0dae78834
CRs-Fixed: 1109279
diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
index 9ec6ec9..a5c9042 100644
--- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c
+++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c
@@ -79,6 +79,9 @@
 
 #define CONV_MS_TO_US 1024      /* conversion factor from ms to us */
 
+#define BEACON_INTERVAL_THRESHOLD 50  /* in msecs */
+#define STA_BURST_SCAN_DURATION 120   /* in msecs */
+
 /* SME REQ processing function templates */
 static bool __lim_process_sme_sys_ready_ind(tpAniSirGlobal, uint32_t *);
 static bool __lim_process_sme_start_bss_req(tpAniSirGlobal,
@@ -1279,6 +1282,20 @@
 	pScanOffloadReq->scan_adaptive_dwell_mode =
 			pScanReq->scan_adaptive_dwell_mode;
 
+	for (i = 0; i < pMac->lim.maxBssId; i++) {
+		tpPESession session_entry =
+				pe_find_session_by_sme_session_id(pMac, i);
+		if (session_entry &&
+			(eLIM_MLM_LINK_ESTABLISHED_STATE ==
+				session_entry->limMlmState) &&
+			(session_entry->beaconParams.beaconInterval
+				< BEACON_INTERVAL_THRESHOLD)) {
+			pScanOffloadReq->burst_scan_duration =
+						STA_BURST_SCAN_DURATION;
+			break;
+		}
+	}
+
 	/* for normal scan, the value for p2pScanType should be 0
 	   always */
 	if (pScanReq->p2pSearch)