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

Commit 2a391a09 authored by Gabriel Biren's avatar Gabriel Biren
Browse files

Rename getCapabilities to getFeatureSet

in IWifiChip and IWifiStaIface.

Main purpose is to distinguish between
the 2 capability methods in IWifiChip:
 - getCapabilities (renamed here)
 - getWifiChipCapabilities

Bug: 267819850
Test: atest VtsHalWifiChipTargetTest \
            VtsHalWifiStaIfaceTargetTest
Change-Id: I03c15d652d02aef99b219c2d630b69acb4d9e43c
parent 0040f271
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ interface IWifiChip {
  @PropagateAllowBlocking android.hardware.wifi.IWifiApIface getApIface(in String ifname);
  String[] getApIfaceNames();
  android.hardware.wifi.IWifiChip.ChipMode[] getAvailableModes();
  int getCapabilities();
  int getFeatureSet();
  android.hardware.wifi.WifiDebugHostWakeReasonStats getDebugHostWakeReasonStats();
  android.hardware.wifi.WifiDebugRingBufferStatus[] getDebugRingBuffersStatus();
  int getId();
@@ -85,7 +85,7 @@ interface IWifiChip {
  void setMloMode(in android.hardware.wifi.IWifiChip.ChipMloMode mode);
  const int NO_POWER_CAP_CONSTANT = 0x7FFFFFFF;
  @Backing(type="int") @VintfStability
  enum ChipCapabilityMask {
  enum FeatureSetMask {
    SET_TX_POWER_LIMIT = (1 << 0) /* 1 */,
    D2D_RTT = (1 << 1) /* 2 */,
    D2AP_RTT = (1 << 2) /* 4 */,
+2 −2
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ interface IWifiStaIface {
  void enableNdOffload(in boolean enable);
  android.hardware.wifi.StaApfPacketFilterCapabilities getApfPacketFilterCapabilities();
  android.hardware.wifi.StaBackgroundScanCapabilities getBackgroundScanCapabilities();
  int getCapabilities();
  int getFeatureSet();
  android.hardware.wifi.WifiDebugRxPacketFateReport[] getDebugRxPacketFates();
  android.hardware.wifi.WifiDebugTxPacketFateReport[] getDebugTxPacketFates();
  byte[6] getFactoryMacAddress();
@@ -63,7 +63,7 @@ interface IWifiStaIface {
  void stopSendingKeepAlivePackets(in int cmdId);
  void setDtimMultiplier(in int multiplier);
  @Backing(type="int") @VintfStability
  enum StaIfaceCapabilityMask {
  enum FeatureSetMask {
    APF = (1 << 0) /* 1 */,
    BACKGROUND_SCAN = (1 << 1) /* 2 */,
    LINK_LAYER_STATS = (1 << 2) /* 4 */,
+4 −4
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ interface IWifiChip {
     */
    @VintfStability
    @Backing(type="int")
    enum ChipCapabilityMask {
    enum FeatureSetMask {
        /**
         * Set/Reset Tx Power limits.
         */
@@ -582,15 +582,15 @@ interface IWifiChip {
    ChipMode[] getAvailableModes();

    /**
     * Get the capabilities supported by this chip.
     * Get the features supported by this chip.
     *
     * @return Bitset of |ChipCapabilityMask| values.
     * @return Bitset of |FeatureSetMask| values.
     * @throws ServiceSpecificException with one of the following values:
     *         |WifiStatusCode.ERROR_WIFI_CHIP_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     */
    int getCapabilities();
    int getFeatureSet();

    /**
     * API to retrieve the wifi wake up reason stats for debugging.
+4 −4
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ interface IWifiStaIface {
     */
    @VintfStability
    @Backing(type="int")
    enum StaIfaceCapabilityMask {
    enum FeatureSetMask {
        /**
         * Support for APF APIs. APF (Android Packet Filter) is a
         * BPF-like packet filtering bytecode executed by the firmware.
@@ -190,15 +190,15 @@ interface IWifiStaIface {
    StaBackgroundScanCapabilities getBackgroundScanCapabilities();

    /**
     * Get the capabilities supported by this STA iface.
     * Get the features supported by this STA iface.
     *
     * @return Bitset of |StaIfaceCapabilityMask| values.
     * @return Bitset of |FeatureSetMask| values.
     * @throws ServiceSpecificException with one of the following values:
     *         |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
     *         |WifiStatusCode.ERROR_NOT_AVAILABLE|,
     *         |WifiStatusCode.ERROR_UNKNOWN|
     */
    int getCapabilities();
    int getFeatureSet();

    /**
     * API to retrieve the fates of inbound packets.
+4 −4
Original line number Diff line number Diff line
@@ -207,10 +207,10 @@ void stopWifiService(const char* instance_name) {
    }
}

int32_t getChipCapabilities(const std::shared_ptr<IWifiChip>& wifi_chip) {
    int32_t caps = 0;
    if (wifi_chip->getCapabilities(&caps).isOk()) {
        return caps;
int32_t getChipFeatureSet(const std::shared_ptr<IWifiChip>& wifi_chip) {
    int32_t features = 0;
    if (wifi_chip->getFeatureSet(&features).isOk()) {
        return features;
    }
    return 0;
}
Loading