diff options
| author | Naveen Rawat <naveenrawat@codeaurora.org> | 2017-01-05 15:50:52 -0800 |
|---|---|---|
| committer | qcabuildsw <qcabuildsw@localhost> | 2017-01-09 14:27:06 -0800 |
| commit | d912dd1c94d9f9af9e0144953c1fe4bd6bb3fd80 (patch) | |
| tree | 2ec6258596542eafa0df18b1392d38e45849cd6c | |
| parent | e5be8c0a4897f50d1b77d1b04d43f3a770bac1a5 (diff) | |
qcacld-3.0: Check if VDEV is valid before sending SET_IE to firmware
Check VDEV validity before sending WMI_VDEV_SET_IE_CMDID to firmware.
Change-Id: I3f6dfb69398df0c91097a3a0242343428c702029
CRs-Fixed: 1108037
| -rw-r--r-- | core/wma/src/wma_features.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index 406ca237726f..6556f04ac095 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -7845,6 +7845,7 @@ int wma_fw_mem_dump_event_handler(void *handle, u_int8_t *cmd_param_info, QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, struct vdev_ie_info *ie_info) { + struct wma_txrx_node *interface; struct vdev_ie_info_param cmd = {0}; int ret; @@ -7859,6 +7860,17 @@ QDF_STATUS wma_process_set_ie_info(tp_wma_handle wma, return QDF_STATUS_E_INVAL; } + if (ie_info->vdev_id >= wma->max_bssid) { + WMA_LOGE(FL("Invalid vdev_id: %d"), ie_info->vdev_id); + return QDF_STATUS_E_INVAL; + } + + interface = &wma->interfaces[ie_info->vdev_id]; + if (!interface->is_vdev_valid) { + WMA_LOGE(FL("vdev_id: %d is not active"), ie_info->vdev_id); + return QDF_STATUS_E_INVAL; + } + cmd.vdev_id = ie_info->vdev_id; cmd.ie_id = ie_info->ie_id; cmd.length = ie_info->length; |
