diff options
author | SecurityBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com> | 2020-02-07 14:21:39 -0800 |
---|---|---|
committer | SecurityBot <android-nexus-securitybot@system.gserviceaccount.com> | 2020-02-07 14:21:40 -0800 |
commit | d427a5666db3a8d1385faed8b4132bb4276eeca6 (patch) | |
tree | 5a790c7dd6e64148c44fe81f86c1891fbe6920a7 | |
parent | 05007d5bba53fbc4472829b39993748c1b165eb2 (diff) | |
parent | 5b726ab6296eb7d6b9fd976f3541a1a11faea9a2 (diff) | |
download | qcacld-d427a5666db3a8d1385faed8b4132bb4276eeca6.tar.gz |
Merge android-msm-pixel-4.9-qt-qpr1 into android-msm-pixel-4.9-qt-qpr2android-10.0.0_r0.62android-10.0.0_r0.61android-10.0.0_r0.54android-10.0.0_r0.52android-msm-crosshatch-4.9-android10-qpr2android-msm-bonito-4.9-android10-qpr2
SBMerger: 284775313
Change-Id: Ib1be65dca032e096e4a648254bc294e1940bf83b
Signed-off-by: SecurityBot <android-nexus-securitybot@system.gserviceaccount.com>
-rw-r--r-- | core/mac/src/pe/rrm/rrm_api.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/core/mac/src/pe/rrm/rrm_api.c b/core/mac/src/pe/rrm/rrm_api.c index a1f2586feb..5854929c25 100644 --- a/core/mac/src/pe/rrm/rrm_api.c +++ b/core/mac/src/pe/rrm/rrm_api.c @@ -1054,28 +1054,30 @@ tSirRetStatus rrm_process_beacon_req(tpAniSirGlobal mac_ctx, tSirMacAddr peer, */ static tSirRetStatus update_rrm_report(tpAniSirGlobal mac_ctx, - tpSirMacRadioMeasureReport report, + tpSirMacRadioMeasureReport *report, tDot11fRadioMeasurementRequest *rrm_req, uint8_t *num_report, int index) { - if (report == NULL) { + tpSirMacRadioMeasureReport rrm_report; + + if (!*report) { /* * Allocate memory to send reports for * any subsequent requests. */ - report = qdf_mem_malloc(sizeof(*report) * + *report = qdf_mem_malloc(sizeof(tSirMacRadioMeasureReport) * (rrm_req->num_MeasurementRequest - index)); - if (NULL == report) { - pe_err("Unable to allocate memory during RRM Req processing"); + if (!*report) { + pe_err("Fail to alloc mem during RRM Req processing"); return eSIR_MEM_ALLOC_FAILED; } - pe_debug("rrm beacon type incapable of %d report", - *num_report); + pe_debug("rrm beacon type incapable of %d report", *num_report); } - report[*num_report].incapable = 1; - report[*num_report].type = + rrm_report = *report; + rrm_report[*num_report].incapable = 1; + rrm_report[*num_report].type = rrm_req->MeasurementRequest[index].measurement_type; - report[*num_report].token = + rrm_report[*num_report].token = rrm_req->MeasurementRequest[index].measurement_token; (*num_report)++; return eSIR_SUCCESS; @@ -1157,7 +1159,7 @@ rrm_process_radio_measurement_request(tpAniSirGlobal mac_ctx, break; default: /* Send a report with incapabale bit set. */ - status = update_rrm_report(mac_ctx, report, rrm_req, + status = update_rrm_report(mac_ctx, &report, rrm_req, &num_report, i); if (eSIR_SUCCESS != status) return status; |