Ver Fonte

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
Paul Zhang há 8 anos atrás
pai
commit
d2315479ae

+ 1 - 0
core/mac/inc/sir_api.h

@@ -3492,6 +3492,7 @@ typedef struct sSirScanOffloadReq {
 	enum wmi_dwelltime_adaptive_mode scan_adaptive_dwell_mode;
 	uint16_t uIEFieldLen;
 	uint16_t uIEFieldOffset;
+	uint32_t burst_scan_duration;
 	tSirChannelList channelList;
 	/*-----------------------------
 	  sSirScanOffloadReq....

+ 17 - 0
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 @@ static QDF_STATUS lim_send_hal_start_scan_offload_req(tpAniSirGlobal pMac,
 	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)

+ 8 - 2
core/wma/src/wma_scan_roam.c

@@ -366,8 +366,14 @@ QDF_STATUS wma_get_buf_start_scan_cmd(tp_wma_handle wma_handle,
 			}
 			if (wma_is_sta_active(wma_handle) ||
 			    wma_is_p2p_cli_active(wma_handle)) {
-				/* Typical background scan. Disable burst scan for now. */
-				cmd->burst_duration = 0;
+				if (scan_req->burst_scan_duration)
+					cmd->burst_duration =
+						scan_req->burst_scan_duration;
+				else
+					/* Typical background scan.
+					 * Disable burst scan for now.
+					 */
+					cmd->burst_duration = 0;
 				break;
 			}
 		} while (0);