diff options
author | Vulupala Shashank Reddy <vulupa@codeaurora.org> | 2019-10-25 16:55:52 +0530 |
---|---|---|
committer | Isaac Chiou <isaacchiou@google.com> | 2020-01-06 12:05:05 +0800 |
commit | 51436d3defb983cbbd8b61a70104f6e82998f218 (patch) | |
tree | ddf03b46f590c3c4b997cbd6798d3638835217ba | |
parent | 88de4bddbf8af01150c5f780de856c32453adf0a (diff) | |
download | qcacld-51436d3defb983cbbd8b61a70104f6e82998f218.tar.gz |
qcacld-3.0: Takecare to stop and down vdev in monitor mode
In monitor mode there is no disconnect, so vdev stop and down is
not handled. Make sure to stop and down the vdev before vdev delete.
Bug: 142158571
Change-Id: I25f5a0e01deda8f2e16e102113b10f32e89b3e38
CRs-Fixed: 2357047
Signed-off-by: Isaac Chiou <isaacchiou@google.com>
-rw-r--r-- | core/wma/src/wma_dev_if.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/core/wma/src/wma_dev_if.c b/core/wma/src/wma_dev_if.c index c094a04b25..fcf691d60f 100644 --- a/core/wma/src/wma_dev_if.c +++ b/core/wma/src/wma_dev_if.c @@ -578,6 +578,29 @@ wma_ol_txrx_vdev_detach(tp_wma_handle wma_handle, iface->is_vdev_valid = false; } +/* + * wma_handle_monitor_mode_vdev_detach() - Stop and down monitor mode vdev + * @wma_handle: wma handle + * @vdev_id: used to get wma interface txrx node + * + * Monitor mode is unconneted mode, so do explicit vdev stop and down + * + * Return: None + */ +static void wma_handle_monitor_mode_vdev_detach(tp_wma_handle wma, + uint8_t vdev_id) +{ + if (wma_send_vdev_stop_to_fw(wma, vdev_id)) { + WMA_LOGE("%s: %d Failed to send vdev stop", __func__, __LINE__); + wma_remove_vdev_req(wma, vdev_id, + WMA_TARGET_REQ_TYPE_VDEV_STOP); + } + + if (wma_send_vdev_down_to_fw(wma, vdev_id) != QDF_STATUS_SUCCESS) + WMA_LOGE("Failed to send vdev down cmd: vdev %d", vdev_id); +} + + static QDF_STATUS wma_handle_vdev_detach(tp_wma_handle wma_handle, struct del_sta_self_params *del_sta_self_req_param, uint8_t generate_rsp) @@ -587,6 +610,9 @@ static QDF_STATUS wma_handle_vdev_detach(tp_wma_handle wma_handle, struct wma_txrx_node *iface = &wma_handle->interfaces[vdev_id]; struct wma_target_req *msg = NULL; + if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE) + wma_handle_monitor_mode_vdev_detach(wma_handle, vdev_id); + status = wmi_unified_vdev_delete_send(wma_handle->wmi_handle, vdev_id); if (QDF_IS_STATUS_ERROR(status)) { WMA_LOGE("Unable to remove an interface"); @@ -1906,6 +1932,10 @@ int wma_vdev_stop_resp_handler(void *handle, uint8_t *cmd_param_info, return -EINVAL; } + /* Ignore stop_response in Monitor mode */ + if (cds_get_conparam() == QDF_GLOBAL_MONITOR_MODE) + return QDF_STATUS_SUCCESS; + iface = &wma->interfaces[resp_event->vdev_id]; /* vdev in stopped state, no more waiting for key */ |