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

Commit b792cda3 authored by Les Lee's avatar Les Lee
Browse files

wifi: Supports new feature flag about Voip mode

ag/25582780 is the vts for this aidl change.

Bug: 295885471
Test: manual test, wifi works normally
Change-Id: I74f8861d43a2a5850dfb3b5b57575858d7f61398
parent 8efe3759
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -97,6 +97,7 @@ interface IWifiChip {
    WIGIG = (1 << 6) /* 64 */,
    SET_AFC_CHANNEL_ALLOWANCE = (1 << 7) /* 128 */,
    T2LM_NEGOTIATION = (1 << 8) /* 256 */,
    SET_VOIP_MODE = (1 << 9) /* 512 */,
  }
  @VintfStability
  parcelable ChipConcurrencyCombinationLimit {
+4 −0
Original line number Diff line number Diff line
@@ -83,6 +83,10 @@ interface IWifiChip {
         * Chip supports Tid-To-Link mapping negotiation.
         */
        T2LM_NEGOTIATION = 1 << 8,
        /**
         * Chip supports voip mode setting.
         */
        SET_VOIP_MODE = 1 << 9,
    }

    /**
+4 −1
Original line number Diff line number Diff line
@@ -59,6 +59,8 @@ IWifiChip::FeatureSetMask convertLegacyChipFeatureToAidl(uint64_t feature) {
            return IWifiChip::FeatureSetMask::P2P_RAND_MAC;
        case WIFI_FEATURE_AFC_CHANNEL:
            return IWifiChip::FeatureSetMask::SET_AFC_CHANNEL_ALLOWANCE;
        case WIFI_FEATURE_SET_VOIP_MODE:
            return IWifiChip::FeatureSetMask::SET_VOIP_MODE;
    };
    CHECK(false) << "Unknown legacy feature: " << feature;
    return {};
@@ -109,7 +111,8 @@ bool convertLegacyChipFeaturesToAidl(uint64_t legacy_feature_set, uint32_t* aidl
                                      WIFI_FEATURE_INFRA_60G,
                                      WIFI_FEATURE_SET_LATENCY_MODE,
                                      WIFI_FEATURE_P2P_RAND_MAC,
                                      WIFI_FEATURE_AFC_CHANNEL};
                                      WIFI_FEATURE_AFC_CHANNEL,
                                      WIFI_FEATURE_SET_VOIP_MODE};
    for (const auto feature : features) {
        if (feature & legacy_feature_set) {
            *aidl_feature_set |= static_cast<uint32_t>(convertLegacyChipFeatureToAidl(feature));