summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarrison Lingren <hlingren@google.com>2020-02-05 16:25:07 -0800
committerHarrison Lingren <hlingren@google.com>2020-02-05 16:25:07 -0800
commit16a556518bdff1b2859209100bf8f972af6a9f09 (patch)
tree1551327617dadece9cd84fa7e8d1c1c660d33b41
parent5891b00885f87ec30c4682d9fc83c07ee2003877 (diff)
parentf73885f5965f9bdb3c636d26a71349c2b0f614c7 (diff)
downloadqcacld-16a556518bdff1b2859209100bf8f972af6a9f09.tar.gz
Merge branch 'android-msm-pixel-4.9-qt-security-next' into android-msm-pixel-4.9-qt
APR 2020.1 Bug: 148866250 Change-Id: I7cdf29aa3bf0c15759fc17c849b1844213c85f6c Signed-off-by: Harrison Lingren <hlingren@google.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 6c351e8d13..3ca467f57b 100644
--- a/core/mac/src/pe/rrm/rrm_api.c
+++ b/core/mac/src/pe/rrm/rrm_api.c
@@ -1043,28 +1043,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;
@@ -1146,7 +1148,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;