summaryrefslogtreecommitdiffstats
path: root/service/jni
diff options
context:
space:
mode:
authorJerry Lee <jerrylee@broadcom.com>2015-07-13 13:42:21 -0700
committerxinhe <xinhe@google.com>2015-07-15 17:23:36 -0700
commit370ad50a5f1dd907de8f4d201f73eb7139f79dd4 (patch)
treeedce3a1d375c00213fae5b25af547db2fac7982c /service/jni
parent98c49c031b5f0d6d28068aa738d32f952ea6c8cf (diff)
downloadandroid_frameworks_opt_net_wifi-370ad50a5f1dd907de8f4d201f73eb7139f79dd4.tar.gz
android_frameworks_opt_net_wifi-370ad50a5f1dd907de8f4d201f73eb7139f79dd4.tar.bz2
android_frameworks_opt_net_wifi-370ad50a5f1dd907de8f4d201f73eb7139f79dd4.zip
Clean up bad command implementation
b/22349265 Change-Id: I3d5e0e3c6d06a86f9c59b00754bfc9e5677fe9e7 Signed-off-by: Jerry Lee <jerrylee@broadcom.com>
Diffstat (limited to 'service/jni')
-rw-r--r--service/jni/com_android_server_wifi_WifiNative.cpp21
-rw-r--r--service/jni/wifi_hal_stub.h1
2 files changed, 20 insertions, 2 deletions
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp
index 6019f8543..f7d3ca009 100644
--- a/service/jni/com_android_server_wifi_WifiNative.cpp
+++ b/service/jni/com_android_server_wifi_WifiNative.cpp
@@ -82,6 +82,7 @@ int init_wifi_hal_func_table(wifi_hal_fn *hal_fn) {
hal_fn->wifi_set_log_handler = wifi_set_log_handler_stub;
hal_fn->wifi_reset_log_handler = wifi_reset_log_handler_stub;
hal_fn->wifi_set_alert_handler = wifi_set_alert_handler_stub;
+ hal_fn->wifi_reset_alert_handler = wifi_reset_alert_handler_stub;
hal_fn->wifi_get_firmware_version = wifi_get_firmware_version_stub;
hal_fn->wifi_get_ring_buffers_status = wifi_get_ring_buffers_status_stub;
hal_fn->wifi_get_logger_supported_feature_set = wifi_get_logger_supported_feature_set_stub;
@@ -1789,10 +1790,26 @@ static jboolean android_net_wifi_set_log_handler(JNIEnv *env, jclass cls, jint i
static jboolean android_net_wifi_reset_log_handler(JNIEnv *env, jclass cls, jint iface, jint id) {
wifi_interface_handle handle = getIfaceHandle(env, cls, iface);
+
+ //reset alter handler
+ ALOGD("android_net_wifi_reset_alert_handler = %p", handle);
+ int result = hal_fn.wifi_reset_alert_handler(id, handle);
+ if (result != WIFI_SUCCESS) {
+ ALOGE(" Fail to reset alert handler");
+ return false;
+ }
+
+ //reset log handler
ALOGD("android_net_wifi_reset_log_handler = %p", handle);
- int result = hal_fn.wifi_reset_log_handler(id,handle);
- return result == WIFI_SUCCESS;
+ result = hal_fn.wifi_reset_log_handler(id, handle);
+ if (result != WIFI_SUCCESS) {
+ ALOGE("Fail to reset logging handler");
+ return false;
+ }
+
+ return true;
}
+
// ----------------------------------------------------------------------------
// ePno framework
// ----------------------------------------------------------------------------
diff --git a/service/jni/wifi_hal_stub.h b/service/jni/wifi_hal_stub.h
index e76b2b8d2..bd00947c9 100644
--- a/service/jni/wifi_hal_stub.h
+++ b/service/jni/wifi_hal_stub.h
@@ -79,6 +79,7 @@ wifi_error wifi_set_log_handler_stub(wifi_request_id id, wifi_interface_handle i
wifi_error wifi_reset_log_handler_stub(wifi_request_id id, wifi_interface_handle iface);
wifi_error wifi_set_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface,
wifi_alert_handler handler);
+wifi_error wifi_reset_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface);
wifi_error wifi_get_firmware_version_stub(wifi_interface_handle iface, char *buffer,
int buffer_size);
wifi_error wifi_get_ring_buffers_status_stub(wifi_interface_handle iface,