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

Commit e45012e4 authored by Shuibing Dai's avatar Shuibing Dai Committed by Android (Google) Code Review
Browse files

Merge "Move setScanMode to legacy HAL"

parents 8c202cc6 50274f76
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1766,6 +1766,10 @@ wifi_error WifiLegacyHal::twtClearStats(const std::string& iface_name, uint8_t c
    return global_func_table_.wifi_twt_clear_stats(getIfaceHandle(iface_name), configId);
}

wifi_error WifiLegacyHal::setScanMode(const std::string& iface_name, bool enable) {
    return global_func_table_.wifi_set_scan_mode(iface_name.c_str(), enable);
}

wifi_error WifiLegacyHal::setDtimConfig(const std::string& iface_name, uint32_t multiplier) {
    return global_func_table_.wifi_set_dtim_config(getIfaceHandle(iface_name), multiplier);
}
+2 −0
Original line number Diff line number Diff line
@@ -741,6 +741,8 @@ class WifiLegacyHal {

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

    wifi_error setScanMode(const std::string& iface_name, bool enable);

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

    // Retrieve the list of usable channels in the requested bands
+1 −0
Original line number Diff line number Diff line
@@ -175,6 +175,7 @@ bool initHalFuncTableWithStubs(wifi_hal_fn* hal_fn) {
    populateStubFor(&hal_fn->wifi_enable_sta_channel_for_peer_network);
    populateStubFor(&hal_fn->wifi_nan_suspend_request);
    populateStubFor(&hal_fn->wifi_nan_resume_request);
    populateStubFor(&hal_fn->wifi_set_scan_mode);
    return true;
}

+2 −3
Original line number Diff line number Diff line
@@ -561,9 +561,8 @@ std::pair<std::array<uint8_t, 6>, ndk::ScopedAStatus> WifiStaIface::getFactoryMa
}

ndk::ScopedAStatus WifiStaIface::setScanModeInternal(bool enable) {
    // OEM's need to implement this on their devices if needed.
    LOG(WARNING) << "setScanModeInternal(" << enable << ") not supported";
    return createWifiStatus(WifiStatusCode::ERROR_NOT_SUPPORTED);
    legacy_hal::wifi_error legacy_status = legacy_hal_.lock()->setScanMode(ifname_, enable);
    return createWifiStatusFromLegacyError(legacy_status);
}

ndk::ScopedAStatus WifiStaIface::setDtimMultiplierInternal(const int multiplier) {