瀏覽代碼

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
Yu Wang 2 年之前
父節點
當前提交
6814538c08
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      core/wma/src/wma_features.c

+ 3 - 0
core/wma/src/wma_features.c

@@ -4152,6 +4152,9 @@ QDF_STATUS wma_send_apf_enable_cmd(WMA_HANDLE handle, uint8_t vdev_id,
 	tp_wma_handle wma = (tp_wma_handle) handle;
 	struct wmi_unified *wmi_handle;
 
+	if (!wma_is_vdev_valid(vdev_id))
+		return QDF_STATUS_E_INVAL;
+
 	if (wma_validate_handle(wma))
 		return QDF_STATUS_E_INVAL;