summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zhang <paulz@codeaurora.org>2017-02-20 15:28:59 +0800
committerqcabuildsw <qcabuildsw@localhost>2017-02-28 11:47:31 -0800
commitaaa2f5cec7ec1e5a3cd8e989069d6b43ccfdbe64 (patch)
tree5ae6b35cfa8bd94ebafdd723a2fcbb6542713060
parent75c470094cb07d3ad94fab6cbfa6f4526ce1adc4 (diff)
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
-rw-r--r--core/mac/inc/sir_api.h1
-rw-r--r--core/mac/src/pe/lim/lim_process_sme_req_messages.c17
-rw-r--r--core/wma/src/wma_scan_roam.c10
3 files changed, 26 insertions, 2 deletions
diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h
index 0e808e2519a6..91eef977dfc9 100644
--- a/core/mac/inc/sir_api.h
+++ b/core/mac/inc/sir_api.h
@@ -3793,6 +3793,7 @@ typedef struct sSirScanOffloadReq {
uint16_t uIEFieldLen;
uint16_t uIEFieldOffset;
+ uint32_t burst_scan_duration;
/* mac address randomization attributes */
bool enable_scan_randomization;
uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
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 382605aaaf2a..afc3e1dbd99b 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, tpSirMsgQ pMsg);
@@ -1296,6 +1299,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)
diff --git a/core/wma/src/wma_scan_roam.c b/core/wma/src/wma_scan_roam.c
index 05297745abd0..c68fd02c7df1 100644
--- a/core/wma/src/wma_scan_roam.c
+++ b/core/wma/src/wma_scan_roam.c
@@ -358,8 +358,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);