diff --git a/components/p2p/core/src/wlan_p2p_main.c b/components/p2p/core/src/wlan_p2p_main.c index ce5f9ba47ebf..4c835df29231 100644 --- a/components/p2p/core/src/wlan_p2p_main.c +++ b/components/p2p/core/src/wlan_p2p_main.c @@ -733,12 +733,6 @@ QDF_STATUS p2p_psoc_object_open(struct wlan_objmgr_psoc *soc) qdf_list_create(&p2p_soc_obj->tx_q_roc, MAX_QUEUE_LENGTH); qdf_list_create(&p2p_soc_obj->tx_q_ack, MAX_QUEUE_LENGTH); - status = qdf_event_create(&p2p_soc_obj->cancel_roc_done); - if (status != QDF_STATUS_SUCCESS) { - p2p_err("failed to create cancel roc done event"); - goto fail_cancel_roc; - } - status = qdf_event_create(&p2p_soc_obj->cleanup_roc_done); if (status != QDF_STATUS_SUCCESS) { p2p_err("failed to create cleanup roc done event"); @@ -763,9 +757,6 @@ fail_cleanup_tx: qdf_event_destroy(&p2p_soc_obj->cleanup_roc_done); fail_cleanup_roc: - qdf_event_destroy(&p2p_soc_obj->cancel_roc_done); - -fail_cancel_roc: qdf_list_destroy(&p2p_soc_obj->tx_q_ack); qdf_list_destroy(&p2p_soc_obj->tx_q_roc); qdf_list_destroy(&p2p_soc_obj->roc_q); @@ -793,7 +784,6 @@ QDF_STATUS p2p_psoc_object_close(struct wlan_objmgr_psoc *soc) qdf_runtime_lock_deinit(&p2p_soc_obj->roc_runtime_lock); qdf_event_destroy(&p2p_soc_obj->cleanup_tx_done); qdf_event_destroy(&p2p_soc_obj->cleanup_roc_done); - qdf_event_destroy(&p2p_soc_obj->cancel_roc_done); qdf_list_destroy(&p2p_soc_obj->tx_q_ack); qdf_list_destroy(&p2p_soc_obj->tx_q_roc); qdf_list_destroy(&p2p_soc_obj->roc_q); diff --git a/components/p2p/core/src/wlan_p2p_main.h b/components/p2p/core/src/wlan_p2p_main.h index eaa277f50ad6..1336cf42d341 100644 --- a/components/p2p/core/src/wlan_p2p_main.h +++ b/components/p2p/core/src/wlan_p2p_main.h @@ -231,7 +231,6 @@ struct p2p_soc_priv_obj { qdf_list_t tx_q_ack; wlan_scan_requester scan_req_id; struct p2p_start_param *start_param; - qdf_event_t cancel_roc_done; qdf_event_t cleanup_roc_done; qdf_event_t cleanup_tx_done; qdf_runtime_lock_t roc_runtime_lock; diff --git a/components/p2p/core/src/wlan_p2p_roc.c b/components/p2p/core/src/wlan_p2p_roc.c index 3435780a2c87..6f2ecec503fc 100644 --- a/components/p2p/core/src/wlan_p2p_roc.c +++ b/components/p2p/core/src/wlan_p2p_roc.c @@ -298,7 +298,7 @@ static QDF_STATUS p2p_execute_cancel_roc_req( p2p_debug("p2p execute cancel roc req"); roc_ctx->roc_state = ROC_STATE_CANCEL_IN_PROG; - qdf_event_reset(&p2p_soc_obj->cancel_roc_done); + status = qdf_mc_timer_stop_sync(&roc_ctx->roc_timer); if (status != QDF_STATUS_SUCCESS) p2p_err("Failed to stop roc timer, roc %pK", roc_ctx); @@ -310,7 +310,6 @@ static QDF_STATUS p2p_execute_cancel_roc_req( qdf_mc_timer_destroy(&roc_ctx->roc_timer); p2p_mgmt_rx_ops(p2p_soc_obj->soc, false); p2p_destroy_roc_ctx(roc_ctx, true, true); - qdf_event_set(&p2p_soc_obj->cancel_roc_done); return status; } @@ -543,7 +542,7 @@ static QDF_STATUS p2p_process_scan_complete_evt( ROC_EVENT_COMPLETED); p2p_destroy_roc_ctx(roc_ctx, false, true); - qdf_event_set(&p2p_soc_obj->cancel_roc_done); + qdf_event_set(&p2p_soc_obj->cleanup_roc_done); size = qdf_list_size(&p2p_soc_obj->roc_q); @@ -742,6 +741,7 @@ QDF_STATUS p2p_process_cleanup_roc_queue( struct p2p_cleanup_param *param) { uint32_t vdev_id; + uint8_t count = 0; QDF_STATUS status, ret; struct p2p_roc_context *roc_ctx; qdf_list_node_t *p_node; @@ -805,14 +805,13 @@ QDF_STATUS p2p_process_cleanup_roc_queue( ROC_STATE_CANCEL_IN_PROG) p2p_execute_cancel_roc_req(roc_ctx); - ret = qdf_wait_single_event( - &p2p_soc_obj->cancel_roc_done, - P2P_WAIT_CANCEL_ROC); - p2p_debug("RoC cancellation done, return:%d", ret); + count++; } } - qdf_event_set(&p2p_soc_obj->cleanup_roc_done); + p2p_debug("count %d", count); + if (!count) + qdf_event_set(&p2p_soc_obj->cleanup_roc_done); return QDF_STATUS_SUCCESS; }