qcacmn: Indicate roc event to up layer for idle roc request

It won't indicate roc event to up layer for idle roc request, which
casue p2p listen command pending.

Change-Id: I7a1c3c83411c63b790db1500a283d062dd87d63b
CRs-Fixed: 2298546
This commit is contained in:
Wu Gao 2018-08-14 17:06:12 +08:00 • committed by nshrivas
commit f3ea89016b
2 changed files with 8 additions and 7 deletions

View file

@ -1900,6 +1900,11 @@ QDF_STATUS p2p_process_mgmt_tx_cancel(
struct p2p_roc_context *cur_roc_ctx;
struct cancel_roc_context cancel_roc;
if (!cancel_tx || !(cancel_tx->cookie)) {
p2p_info("invalid cancel info");
return QDF_STATUS_SUCCESS;
}
p2p_debug("cookie:0x%llx", cancel_tx->cookie);
cur_tx_ctx = p2p_find_tx_ctx(cancel_tx->p2p_soc_obj,

View file

@ -233,7 +233,8 @@ static QDF_STATUS p2p_destroy_roc_ctx(struct p2p_roc_context *roc_ctx,
p2p_soc_obj, roc_ctx, up_layer_event, in_roc_queue);
if (up_layer_event) {
p2p_send_roc_event(roc_ctx, ROC_EVENT_READY_ON_CHAN);
if (roc_ctx->roc_state < ROC_STATE_ON_CHAN)
p2p_send_roc_event(roc_ctx, ROC_EVENT_READY_ON_CHAN);
p2p_send_roc_event(roc_ctx, ROC_EVENT_COMPLETED);
}
@ -864,12 +865,7 @@ QDF_STATUS p2p_process_cancel_roc_req(
}
if (curr_roc_ctx->roc_state == ROC_STATE_IDLE) {
status = qdf_list_remove_node(&p2p_soc_obj->roc_q,
(qdf_list_node_t *)curr_roc_ctx);
if (status == QDF_STATUS_SUCCESS)
qdf_mem_free(curr_roc_ctx);
else
p2p_err("Failed to remove roc req, status %d", status);
status = p2p_destroy_roc_ctx(curr_roc_ctx, true, true);
} else if (curr_roc_ctx->roc_state ==
ROC_STATE_CANCEL_IN_PROG) {
p2p_debug("Receive cancel roc req when roc req is canceling, cookie %llx",