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

Commit 0b6341c6 authored by Kai Shi's avatar Kai Shi
Browse files

Add dtim config optimization HAL API

Test: compilation and halutil test
Bug: 170678227
Change-Id: I4f7535a70e53bd55f02b70867d071c440ad1529f
parent 24dedfeb
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -1630,6 +1630,12 @@ wifi_error WifiLegacyHal::twtClearStats(const std::string& iface_name,
                                                   configId);
}

wifi_error WifiLegacyHal::setDtimConfig(const std::string& iface_name,
                                        uint32_t multiplier) {
    return global_func_table_.wifi_set_dtim_config(getIfaceHandle(iface_name),
                                                   multiplier);
}

void WifiLegacyHal::invalidate() {
    global_handle_ = nullptr;
    iface_name_to_handle_.clear();
+3 −0
Original line number Diff line number Diff line
@@ -690,6 +690,9 @@ class WifiLegacyHal {

    wifi_error twtClearStats(const std::string& iface_name, uint8_t configId);

    wifi_error setDtimConfig(const std::string& iface_name,
                             uint32_t multiplier);

   private:
    // Retrieve interface handles for all the available interfaces.
    wifi_error retrieveIfaceHandles();
+1 −0
Original line number Diff line number Diff line
@@ -158,6 +158,7 @@ bool initHalFuncTableWithStubs(wifi_hal_fn* hal_fn) {
    populateStubFor(&hal_fn->wifi_twt_info_frame_request);
    populateStubFor(&hal_fn->wifi_twt_get_stats);
    populateStubFor(&hal_fn->wifi_twt_clear_stats);
    populateStubFor(&hal_fn->wifi_set_dtim_config);
    return true;
}
}  // namespace legacy_hal