Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 48229382 authored by Ahmed ElArabawy's avatar Ahmed ElArabawy
Browse files

Add an api call to check if legacy hal is started

This commit adds a public api call for legacy hal to check if it is
successfully started.
This is to be used by callers of legacy hal to make sure not to request
functionality while legacy hal (and hence all interfaces) are not
started.

Bug: 112205428
Test: Manual
Change-Id: I5183d01811e35edb3149cfb3784067c68b40e46d
parent bdc179bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -424,6 +424,8 @@ wifi_error WifiLegacyHal::stop(
    return WIFI_SUCCESS;
}

bool WifiLegacyHal::isStarted() { return is_started_; }

std::pair<wifi_error, std::string> WifiLegacyHal::getDriverVersion(
    const std::string& iface_name) {
    std::array<char, kMaxVersionStringLength> buffer;
+2 −0
Original line number Diff line number Diff line
@@ -181,6 +181,8 @@ class WifiLegacyHal {
    // using a predefined timeout.
    virtual wifi_error stop(std::unique_lock<std::recursive_mutex>* lock,
                            const std::function<void()>& on_complete_callback);
    // Checks if legacy HAL has successfully started
    bool isStarted();
    // Wrappers for all the functions in the legacy HAL function table.
    std::pair<wifi_error, std::string> getDriverVersion(
        const std::string& iface_name);