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

Commit 810771c3 authored by Gabriel Biren's avatar Gabriel Biren
Browse files

Remove deprecated method getValidFrequenciesForBand

from IWifiApIface and IWifiStaIface.

Bug: 267819850
Test: atest VtsHalWifiStaIfaceTargetTest \
            VtsHalWifiApIfaceTargetTest
Change-Id: I369d72e3eff9283552822a92b26ce0f4fb35fedf
parent 95342882
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ interface IWifiApIface {
  String[] getBridgedInstances();
  byte[6] getFactoryMacAddress();
  void setCountryCode(in byte[2] code);
  int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
  void resetToFactoryMacAddress();
  void setMacAddress(in byte[6] mac);
}
+0 −1
Original line number Diff line number Diff line
@@ -47,7 +47,6 @@ interface IWifiStaIface {
  byte[6] getFactoryMacAddress();
  android.hardware.wifi.StaLinkLayerStats getLinkLayerStats();
  android.hardware.wifi.StaRoamingCapabilities getRoamingCapabilities();
  int[] getValidFrequenciesForBand(in android.hardware.wifi.WifiBand band);
  void installApfPacketFilter(in byte[] program);
  byte[] readApfPacketFilterData();
  void registerEventCallback(in android.hardware.wifi.IWifiStaIfaceEventCallback callback);
+0 −14
Original line number Diff line number Diff line
@@ -67,20 +67,6 @@ interface IWifiApIface {
     */
    void setCountryCode(in byte[2] code);

    /**
     * Used to query the list of valid frequencies (depending on country code set)
     * for the provided band.
     *
     * @param band Band for which the frequency list is being generated.
     * @return Vector of valid frequencies for the provided band.
     * @throws ServiceSpecificException with one of the following values:
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     */
    int[] getValidFrequenciesForBand(in WifiBand band);

    /**
     * Reset all of the AP interfaces' MAC address to the factory MAC address.
     *
+0 −16
Original line number Diff line number Diff line
@@ -287,22 +287,6 @@ interface IWifiStaIface {
     */
    StaRoamingCapabilities getRoamingCapabilities();

    /**
     * Used to query the list of valid frequencies (depending on the country
     * code set) for the provided band. These channels may be specified in the
     * |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
     * request.
     *
     * @param band Band for which the frequency list is being generated.
     * @return Vector of valid frequencies for the provided band.
     * @throws ServiceSpecificException with one of the following values:
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_SUPPORTED|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     */
    int[] getValidFrequenciesForBand(in WifiBand band);

    /**
     * Installs an APF program on this iface, replacing an existing
     * program if present.
+0 −18
Original line number Diff line number Diff line
@@ -64,12 +64,6 @@ ndk::ScopedAStatus WifiApIface::setCountryCode(const std::array<uint8_t, 2>& in_
                           &WifiApIface::setCountryCodeInternal, in_code);
}

ndk::ScopedAStatus WifiApIface::getValidFrequenciesForBand(WifiBand in_band,
                                                           std::vector<int32_t>* _aidl_return) {
    return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
                           &WifiApIface::getValidFrequenciesForBandInternal, _aidl_return, in_band);
}

ndk::ScopedAStatus WifiApIface::setMacAddress(const std::array<uint8_t, 6>& in_mac) {
    return validateAndCall(this, WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
                           &WifiApIface::setMacAddressInternal, in_mac);
@@ -101,18 +95,6 @@ ndk::ScopedAStatus WifiApIface::setCountryCodeInternal(const std::array<uint8_t,
    return createWifiStatusFromLegacyError(legacy_status);
}

std::pair<std::vector<int32_t>, ndk::ScopedAStatus> WifiApIface::getValidFrequenciesForBandInternal(
        WifiBand band) {
    static_assert(sizeof(WifiChannelWidthInMhz) == sizeof(int32_t), "Size mismatch");
    legacy_hal::wifi_error legacy_status;
    std::vector<uint32_t> valid_frequencies;
    std::tie(legacy_status, valid_frequencies) = legacy_hal_.lock()->getValidFrequenciesForBand(
            instances_.size() > 0 ? instances_[0] : ifname_,
            aidl_struct_util::convertAidlWifiBandToLegacy(band));
    return {std::vector<int32_t>(valid_frequencies.begin(), valid_frequencies.end()),
            createWifiStatusFromLegacyError(legacy_status)};
}

ndk::ScopedAStatus WifiApIface::setMacAddressInternal(const std::array<uint8_t, 6>& mac) {
    // Support random MAC up to 2 interfaces
    if (instances_.size() == 2) {
Loading