diff options
| author | Padma, Santhosh Kumar <skpadma@codeaurora.org> | 2018-02-05 16:21:31 +0530 |
|---|---|---|
| committer | snandini <snandini@codeaurora.org> | 2018-02-05 07:57:21 -0800 |
| commit | 9dfd6a0f60ec55fa75a9db648e2330cdc0c256a4 (patch) | |
| tree | dbe03b84cbac937e22cd2df964ce5371de71fb12 | |
| parent | 96f8cba0a075ce03a1674459b09778eae9199624 (diff) | |
qcacld-3.0: Fix stack corruption in beacon table mode
qcacld-2.0 to qcacld-3.0 propagation
Currently driver sends beacon report for each channel recursively
in beacon table mode. There is a chance that variables on stack
can exceed allocated stack size which can lead to corruption of
stack. Remove unnecessary variables which are not required for
beacon table mode to fix this issue.
Change-Id: I9aa35e7da916f5d4c6380862d292b44c254c9334
CRs-Fixed: 2184037
| -rw-r--r-- | core/sme/src/rrm/sme_rrm.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/core/sme/src/rrm/sme_rrm.c b/core/sme/src/rrm/sme_rrm.c index cf59e8107e53..38b756042902 100644 --- a/core/sme/src/rrm/sme_rrm.c +++ b/core/sme/src/rrm/sme_rrm.c @@ -642,14 +642,10 @@ static QDF_STATUS sme_rrm_scan_request_callback(tHalHandle halHandle, */ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) { - /* Issue scan request. */ - tCsrScanRequest scan_req; QDF_STATUS status = QDF_STATUS_SUCCESS; tpRrmSMEContext sme_rrm_ctx = &mac_ctx->rrm.rrmSmeContext; - uint32_t session_id, scan_req_id; - uint32_t max_chan_time; + uint32_t session_id; tSirScanType scan_type; - uint64_t current_time; status = csr_roam_get_session_id_from_bssid(mac_ctx, &sme_rrm_ctx->sessionBssId, &session_id); @@ -674,6 +670,11 @@ static QDF_STATUS sme_rrm_issue_scan_req(tpAniSirGlobal mac_ctx) if ((eSIR_ACTIVE_SCAN == scan_type) || (eSIR_PASSIVE_SCAN == scan_type)) { + tCsrScanRequest scan_req; + uint32_t scan_req_id; + uint32_t max_chan_time; + uint64_t current_time; + qdf_mem_zero(&scan_req, sizeof(scan_req)); /* set scan_type, active or passive */ scan_req.bcnRptReqScan = true; |
