Browse Source

qcacld-3.0: Dont send beacon report on invalid measure duration

When measurement duration is given as 0 in beacon report request
driver should not send any beacon report in response and set
refused bit in action frame. Add this condition to beacon report
request processing.

Change-Id: I280824565aa5cda765151acbb67ab0d6574853d7
CRs-fixed: 2481166
Manikandan Mohan 5 years ago
parent
commit
f70120a83b
1 changed files with 7 additions and 0 deletions
  1. 7 0
      core/mac/src/pe/rrm/rrm_api.c

+ 7 - 0
core/mac/src/pe/rrm/rrm_api.c

@@ -524,6 +524,13 @@ rrm_process_beacon_report_req(struct mac_context *mac,
 	pe_info("maxDuration = %d sign = %d maxMeasduration = %d measDuration = %d",
 		maxDuration, sign, maxMeasduration, measDuration);
 
+	if (measDuration == 0 &&
+	    pBeaconReq->measurement_request.Beacon.meas_mode !=
+	    eSIR_BEACON_TABLE) {
+		pe_err("Invalid measurement duration");
+		return eRRM_REFUSED;
+	}
+
 	if (maxMeasduration < measDuration) {
 		if (pBeaconReq->durationMandatory) {
 			pe_err("Dropping the request: duration mandatory and maxduration > measduration");