diff options
author | Jerry Lee <jerrylee@broadcom.com> | 2015-07-13 13:42:21 -0700 |
---|---|---|
committer | xinhe <xinhe@google.com> | 2015-07-15 17:23:36 -0700 |
commit | 370ad50a5f1dd907de8f4d201f73eb7139f79dd4 (patch) | |
tree | edce3a1d375c00213fae5b25af547db2fac7982c /service | |
parent | 98c49c031b5f0d6d28068aa738d32f952ea6c8cf (diff) | |
download | frameworks_opt_net_wifi-370ad50a5f1dd907de8f4d201f73eb7139f79dd4.tar.gz frameworks_opt_net_wifi-370ad50a5f1dd907de8f4d201f73eb7139f79dd4.tar.bz2 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')
-rw-r--r-- | service/jni/com_android_server_wifi_WifiNative.cpp | 21 | ||||
-rw-r--r-- | service/jni/wifi_hal_stub.h | 1 | ||||
-rw-r--r-- | service/lib/wifi_hal_stub.cpp | 4 |
3 files changed, 24 insertions, 2 deletions
diff --git a/service/jni/com_android_server_wifi_WifiNative.cpp b/service/jni/com_android_server_wifi_WifiNative.cpp index 6019f85..f7d3ca0 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 e76b2b8..bd00947 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, diff --git a/service/lib/wifi_hal_stub.cpp b/service/lib/wifi_hal_stub.cpp index 2e642de..65770f3 100644 --- a/service/lib/wifi_hal_stub.cpp +++ b/service/lib/wifi_hal_stub.cpp @@ -170,6 +170,10 @@ wifi_error wifi_set_alert_handler_stub(wifi_request_id id, wifi_interface_handle return WIFI_ERROR_NOT_SUPPORTED; } +wifi_error wifi_reset_alert_handler_stub(wifi_request_id id, wifi_interface_handle iface) { + return WIFI_ERROR_NOT_SUPPORTED; +} + wifi_error wifi_get_firmware_version_stub( wifi_interface_handle iface, char *buffer, int buffer_size) { return WIFI_ERROR_NOT_SUPPORTED; |