summaryrefslogtreecommitdiff
path: root/qcwcn/wifi_hal/common.cpp
diff options
context:
space:
mode:
authorAmarnath Hullur Subramanyam <amarnath@codeaurora.org>2015-08-26 20:30:37 +0530
committerVineeta Srivastava <vsrivastava@google.com>2015-08-26 23:09:12 +0000
commit768f20bb55dc59e6955b2e2cbcaf2e3aecaf9742 (patch)
tree8d7b6b2476a06a6d3a15fc09e21f03bffbe26b6c /qcwcn/wifi_hal/common.cpp
parent67b18ba9e3bada1a306a4f4000a33f34896d8d04 (diff)
downloadwlan-768f20bb55dc59e6955b2e2cbcaf2e3aecaf9742.tar.gz
WiFi-HAL: Update handler if an event is already registered
If an already registered vendor event tries to register for the second time, update the call back function but do not add a new entry to the handlers. Bug: 23483365 Change-Id: I93446721b2e75b768c8f7b40583e7ac7d1e5c282
Diffstat (limited to 'qcwcn/wifi_hal/common.cpp')
-rw-r--r--qcwcn/wifi_hal/common.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/qcwcn/wifi_hal/common.cpp b/qcwcn/wifi_hal/common.cpp
index 0b4592d..89ff67a 100644
--- a/qcwcn/wifi_hal/common.cpp
+++ b/qcwcn/wifi_hal/common.cpp
@@ -68,7 +68,8 @@ wifi_error wifi_register_handler(wifi_handle handle, int cmd, nl_recvmsg_msg_cb_
info->event_cb[i].cb_func = func;
ALOGI("Updated event handler %p for nl_cmd 0x%0x"
" and arg %p", func, cmd, arg);
- result = WIFI_SUCCESS;
+ pthread_mutex_unlock(&info->cb_lock);
+ return WIFI_SUCCESS;
}
}
@@ -106,7 +107,8 @@ wifi_error wifi_register_vendor_handler(wifi_handle handle,
info->event_cb[i].cb_arg = arg;
ALOGI("Updated event handler %p for vendor 0x%0x, subcmd 0x%0x"
" and arg %p", func, id, subcmd, arg);
- result = WIFI_SUCCESS;
+ pthread_mutex_unlock(&info->cb_lock);
+ return WIFI_SUCCESS;
}
}