summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormanwhl <normanwhl@google.com>2022-06-15 10:27:54 +0000
committerNorman Liu <normanwhl@google.com>2022-06-15 10:45:02 +0000
commit8b5332e4e8024ae3b84295d843cbcfeb9a587c0f (patch)
tree433c3478a7f4c90faa08750fafa34d10036d3eba
parent2aced7af8071128d5824702dd35488c91131650d (diff)
downloadwlan-8b5332e4e8024ae3b84295d843cbcfeb9a587c0f.tar.gz
Do not callback on_subsystem_restart when trigger subsystem restart error
Bug: 235028872 Test: run cts --include-filter "CtsWifiTestCases android.net.wifi.cts.WifiManagerTest#testRestartWifiSubsystem" Change-Id: I2e86505b2fd306f64c6248f3ef612837f54694bb
-rwxr-xr-xsynadhd/wifi_hal/wifi_logger.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/synadhd/wifi_hal/wifi_logger.cpp b/synadhd/wifi_hal/wifi_logger.cpp
index 5743086..b531838 100755
--- a/synadhd/wifi_hal/wifi_logger.cpp
+++ b/synadhd/wifi_hal/wifi_logger.cpp
@@ -2063,12 +2063,14 @@ wifi_error wifi_trigger_subsystem_restart(wifi_handle handle)
strncpy(error_str, "WIFI_SUCCESS", sizeof(error_str));
exit:
- if (info->restart_handler.on_subsystem_restart) {
- ALOGI("Trigger ssr handler registered handler:%p",
- info->restart_handler.on_subsystem_restart);
- (info->restart_handler.on_subsystem_restart)(error_str);
- } else {
- ALOGI("No trigger ssr handler registered");
+ if (result == WIFI_SUCCESS) {
+ if (info->restart_handler.on_subsystem_restart) {
+ ALOGI("Trigger ssr handler registered handler:%p",
+ info->restart_handler.on_subsystem_restart);
+ (info->restart_handler.on_subsystem_restart)(error_str);
+ } else {
+ ALOGI("No trigger ssr handler registered");
+ }
}
return result;