From 8a42648625bbfc5fab743366cb2002e4daaf572d Mon Sep 17 00:00:00 2001 From: Ganesh Kondabattini Date: Sun, 8 Jan 2017 20:05:12 +0530 Subject: Revert "qcacld-3.0: Fix to update roc cookie properly" This reverts commit Idf8688652447b8b3f528a4e2ade59415a66930f4. This change is creating mismatch between the cookies of roc req and roc expired event. CRs-Fixed: 1108767 Change-Id: Ie248de1a3e78716c34c5dd8575e8fdf80f3c811d --- core/hdd/src/wlan_hdd_p2p.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c index e6066b5d274f..30b0180f8398 100644 --- a/core/hdd/src/wlan_hdd_p2p.c +++ b/core/hdd/src/wlan_hdd_p2p.c @@ -1130,7 +1130,7 @@ __wlan_hdd_cfg80211_cancel_remain_on_channel(struct wiphy *wiphy, (cfgState->remain_on_chan_ctx->cookie != cookie)) { mutex_unlock(&cfgState->remain_on_chan_ctx_lock); hdd_err("No Remain on channel pending with specified cookie value"); - return 0; + return -EINVAL; } if (NULL != cfgState->remain_on_chan_ctx) { @@ -1553,11 +1553,14 @@ send_frame: mutex_lock(&cfgState->remain_on_chan_ctx_lock); - *cookie = (uintptr_t) cfgState->buf; - cfgState->action_cookie = *cookie; - if (cfgState->remain_on_chan_ctx) - cfgState->remain_on_chan_ctx->cookie = - cfgState->action_cookie; + if (cfgState->remain_on_chan_ctx) { + cfgState->action_cookie = + cfgState->remain_on_chan_ctx->cookie; + *cookie = cfgState->action_cookie; + } else { + *cookie = (uintptr_t) cfgState->buf; + cfgState->action_cookie = *cookie; + } mutex_unlock(&cfgState->remain_on_chan_ctx_lock); } -- cgit v1.2.3