summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Zhang <paulz@codeaurora.org>2017-01-23 21:42:25 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-31 21:43:44 -0800
commitfc9be1ce6180cd23d541babc525c4a77f85054f2 (patch)
treed53f11ca9f943de92a8b8076e0c93bba8527d94b
parent124b686ccdb82d6e20b9c523213521dacfffb68a (diff)
qcacld-2.0: Set burst duration when using short BI
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/sirApi.h1
-rw-r--r--CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c15
-rw-r--r--CORE/SERVICES/WMA/wma.c10
3 files changed, 23 insertions, 3 deletions
diff --git a/CORE/MAC/inc/sirApi.h b/CORE/MAC/inc/sirApi.h
index 1e5acbf90b20..dcf95a9fd012 100644
--- a/CORE/MAC/inc/sirApi.h
+++ b/CORE/MAC/inc/sirApi.h
@@ -4580,6 +4580,7 @@ typedef struct sSirScanOffloadReq {
tANI_U16 uIEFieldLen;
tANI_U16 uIEFieldOffset;
+ uint32_t burst_scan_duration;
uint32_t enable_scan_randomization;
uint8_t mac_addr[VOS_MAC_ADDR_SIZE];
uint8_t mac_addr_mask[VOS_MAC_ADDR_SIZE];
diff --git a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
index 84a733d59034..5bd3baf325bb 100644
--- a/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
+++ b/CORE/MAC/src/pe/lim/limProcessSmeReqMessages.c
@@ -82,6 +82,10 @@
#define DEFAULT_PASSIVE_MAX_CHANNEL_TIME 110 // in msecs
#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 void __limProcessSmeStartReq(tpAniSirGlobal, tANI_U32 *);
static tANI_BOOLEAN __limProcessSmeSysReadyInd(tpAniSirGlobal, tANI_U32 *);
@@ -1315,7 +1319,16 @@ static eHalStatus limSendHalStartScanOffloadReq(tpAniSirGlobal pMac,
pScanOffloadReq->min_rest_time= pScanReq->min_rest_time;
pScanOffloadReq->idle_time= pScanReq->idle_time;
-
+ for (i = 0; i < pMac->lim.maxBssId; i++) {
+ tpPESession session_entry = peFindSessionBySessionId(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/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c
index 698e823cbc8f..f961b489dc4c 100644
--- a/CORE/SERVICES/WMA/wma.c
+++ b/CORE/SERVICES/WMA/wma.c
@@ -10610,8 +10610,14 @@ VOS_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);