Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1fcee81a authored by Yu Wang's avatar Yu Wang Committed by Madan Koyyalamudi
Browse files

qcacld-3.0: validate vdev id for APF enable command

The vdev id might be invalid when sending WMI_BPF_SET_VDEV_ENABLE_CMDID
to firmware, which will cause assert in firmware.
To fix this issue, validate vdev id before sending the command.

Change-Id: Ie1b60c5eeb6704de963f23d7fef0649c208081a4
CRs-Fixed: 3260462
parent 117cd61f
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4191,6 +4191,9 @@ QDF_STATUS wma_send_apf_enable_cmd(WMA_HANDLE handle, uint8_t vdev_id,
		return QDF_STATUS_E_INVAL;
	}

	if (!wma_is_vdev_valid(vdev_id))
		return QDF_STATUS_E_INVAL;

	if (!WMI_SERVICE_IS_ENABLED(wma->wmi_service_bitmap,
		WMI_SERVICE_BPF_OFFLOAD)) {
		WMA_LOGE(FL("APF cababilities feature bit not enabled"));