summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSreelakshmi Konamki <skonam@codeaurora.org>2017-01-02 14:45:04 +0530
committerqcabuildsw <qcabuildsw@localhost>2017-01-04 14:53:39 -0800
commite577ac945f0b8fa44b202b9864905d0accd31c67 (patch)
treedd9527dcd8a577c3a0e78a883b26e9f02ca82d6e
parent54215c894d6dc70dbf0bb12fe7a2b9f33303187b (diff)
qcacld-3.0: Fix to update roc cookie properly
Supplicant can send multiple action frames back to back on STA interface. The current P2P logic is extending the P2P remain on channel timer for each action frame and not updating the roc cookie accordingly. Add changes to update roc cookie properly. Change-Id: Idf8688652447b8b3f528a4e2ade59415a66930f4 CRs-Fixed: 1106511
-rw-r--r--core/hdd/src/wlan_hdd_p2p.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/core/hdd/src/wlan_hdd_p2p.c b/core/hdd/src/wlan_hdd_p2p.c
index 2c882a19a61a..192bb1177359 100644
--- a/core/hdd/src/wlan_hdd_p2p.c
+++ b/core/hdd/src/wlan_hdd_p2p.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012-2016 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2012-2017 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -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 -EINVAL;
+ return 0;
}
if (NULL != cfgState->remain_on_chan_ctx) {
@@ -1553,14 +1553,11 @@ send_frame:
mutex_lock(&cfgState->remain_on_chan_ctx_lock);
- 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;
- }
+ *cookie = (uintptr_t) cfgState->buf;
+ cfgState->action_cookie = *cookie;
+ if (cfgState->remain_on_chan_ctx)
+ cfgState->remain_on_chan_ctx->cookie =
+ cfgState->action_cookie;
mutex_unlock(&cfgState->remain_on_chan_ctx_lock);
}