summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSecurityBot AutoMerger <android-nexus-securitybot@system.gserviceaccount.com>2020-02-07 14:21:39 -0800
committerSecurityBot <android-nexus-securitybot@system.gserviceaccount.com>2020-02-07 14:21:40 -0800
commitd427a5666db3a8d1385faed8b4132bb4276eeca6 (patch)
tree5a790c7dd6e64148c44fe81f86c1891fbe6920a7
parent05007d5bba53fbc4472829b39993748c1b165eb2 (diff)
parent5b726ab6296eb7d6b9fd976f3541a1a11faea9a2 (diff)
downloadqcacld-d427a5666db3a8d1385faed8b4132bb4276eeca6.tar.gz
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.c24
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;