mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-02 20:24:19 +00:00
wifi: Invoke failure callbacks
Invoke the failure callbacks for |requestChipDebugInfo|, |requestDriverDebugDump| and |requestFirmwareDebugDump| methods. Bug: 32014425 Test: Compiles Change-Id: I49b8ae93fe846df6d9663b10d2a70eb89bd00931
This commit is contained in:
@@ -113,6 +113,11 @@ Return<void> WifiChip::requestChipDebugInfo() {
|
||||
if (ret.first != WIFI_SUCCESS) {
|
||||
LOG(ERROR) << "Failed to get driver version: "
|
||||
<< LegacyErrorToString(ret.first);
|
||||
FailureReason reason = CreateFailureReasonLegacyError(
|
||||
ret.first, " failed to get driver version");
|
||||
for (const auto& callback : callbacks_) {
|
||||
callback->onChipDebugInfoFailure(reason);
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
result.driverDescription = ret.second.c_str();
|
||||
@@ -121,6 +126,11 @@ Return<void> WifiChip::requestChipDebugInfo() {
|
||||
if (ret.first != WIFI_SUCCESS) {
|
||||
LOG(ERROR) << "Failed to get firmware version: "
|
||||
<< LegacyErrorToString(ret.first);
|
||||
FailureReason reason = CreateFailureReasonLegacyError(
|
||||
ret.first, " failed to get firmware version");
|
||||
for (const auto& callback : callbacks_) {
|
||||
callback->onChipDebugInfoFailure(reason);
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
result.firmwareDescription = ret.second.c_str();
|
||||
@@ -140,6 +150,10 @@ Return<void> WifiChip::requestDriverDebugDump() {
|
||||
if (ret.first != WIFI_SUCCESS) {
|
||||
LOG(ERROR) << "Failed to get driver debug dump: "
|
||||
<< LegacyErrorToString(ret.first);
|
||||
FailureReason reason = CreateFailureReasonLegacyError(ret.first, "");
|
||||
for (const auto& callback : callbacks_) {
|
||||
callback->onDriverDebugDumpFailure(reason);
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
@@ -162,6 +176,10 @@ Return<void> WifiChip::requestFirmwareDebugDump() {
|
||||
if (ret.first != WIFI_SUCCESS) {
|
||||
LOG(ERROR) << "Failed to get firmware debug dump: "
|
||||
<< LegacyErrorToString(ret.first);
|
||||
FailureReason reason = CreateFailureReasonLegacyError(ret.first, "");
|
||||
for (const auto& callback : callbacks_) {
|
||||
callback->onFirmwareDebugDumpFailure(reason);
|
||||
}
|
||||
return Void();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user