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
This commit is contained in:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user