diff options
| author | Yun Park <yunp@qca.qualcomm.com> | 2015-01-16 15:15:46 -0800 |
|---|---|---|
| committer | Akash Patel <c_akashp@qca.qualcomm.com> | 2015-01-19 12:36:56 -0800 |
| commit | 6ff42d455b0506690b4867794f7e034ae08958f9 (patch) | |
| tree | e123c85992e13554a184f160e1b5f104cc18f7bb | |
| parent | 797aaf79a58af55dc66d82545f0355c13bed27da (diff) | |
qcacld: check vdev_up before sending set param WMI command
Fix to check if vdev is up or not before sending WMI_VDEV_SET_PARAM_CMDID.
Change-Id: I5beb9a5fd04851114b84a7283a1c2314b23a4958
CRs-Fixed: 773726
| -rw-r--r-- | CORE/SERVICES/WMA/wma.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/CORE/SERVICES/WMA/wma.c b/CORE/SERVICES/WMA/wma.c index 910233f30310..dfbf102c5c0c 100644 --- a/CORE/SERVICES/WMA/wma.c +++ b/CORE/SERVICES/WMA/wma.c @@ -1152,6 +1152,7 @@ wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle, u_int32_t if_id, wmi_vdev_set_param_cmd_fixed_param *cmd; wmi_buf_t buf; u_int16_t len = sizeof(*cmd); + tp_wma_handle wma; buf = wmi_buf_alloc(wmi_handle, len); if (!buf) { @@ -1168,6 +1169,17 @@ wmi_unified_vdev_set_param_send(wmi_unified_t wmi_handle, u_int32_t if_id, cmd->param_value = param_value; WMA_LOGD("Setting vdev %d param = %x, value = %u", if_id, param_id, param_value); + + wma = vos_get_context(VOS_MODULE_ID_WDA, + vos_get_global_context(VOS_MODULE_ID_WDA, NULL)); + + if (!wma->interfaces[if_id].vdev_up) { + WMA_LOGE("%s:vdev %d is not up. Skipping to send set param cmd" + , __func__, if_id); + wmi_buf_free(buf); + return -EINVAL; + } + ret = wmi_unified_cmd_send(wmi_handle, buf, len, WMI_VDEV_SET_PARAM_CMDID); if (ret < 0) { |
