From aa94752cc6c8ced9975fd418a4f74cbdc0b0ee18 Mon Sep 17 00:00:00 2001 From: Ganesh Kondabattini Date: Mon, 9 Jan 2017 13:26:15 +0530 Subject: Revert "qcacld-2.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 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c index 931346ecd522..4ec8cc05267c 100644 --- a/CORE/HDD/src/wlan_hdd_p2p.c +++ b/CORE/HDD/src/wlan_hdd_p2p.c @@ -2260,12 +2260,16 @@ int __wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev, vos_mem_copy( cfgState->buf, buf, len); 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