diff options
-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; |