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

Commit e9901a3a authored by Les Lee's avatar Les Lee Committed by Automerger Merge Worker
Browse files

Merge "wifi: Update active iface when bridged AP instance down" into sc-dev am: e85f040d

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15044620

Change-Id: I492e5f7cd83eff1179b5b7cd9ed8d3aa6514cea7
parents 19983a94 e85f040d
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -1059,7 +1059,8 @@ WifiStatus WifiChip::removeIfaceInstanceFromBridgedApIfaceInternal(
    // Requires to remove one of the instance in bridge mode
    for (auto const& it : br_ifaces_ap_instances_) {
        if (it.first == ifname) {
            for (auto const& iface : it.second) {
            std::vector<std::string> ap_instances = it.second;
            for (auto const& iface : ap_instances) {
                if (iface == ifInstanceName) {
                    if (!iface_util_->removeIfaceFromBridge(it.first, iface)) {
                        LOG(ERROR)
@@ -1075,13 +1076,20 @@ WifiStatus WifiChip::removeIfaceInstanceFromBridgedApIfaceInternal(
                                   << " " << legacyErrorToString(legacy_status);
                        return createWifiStatusFromLegacyError(legacy_status);
                    }
                    ap_instances.erase(
                        std::remove(ap_instances.begin(), ap_instances.end(),
                                    ifInstanceName),
                        ap_instances.end());
                    br_ifaces_ap_instances_[ifname] = ap_instances;
                    break;
                }
            }
            break;
        }
    }
    br_ifaces_ap_instances_.erase(ifInstanceName);
    iface->removeInstance(ifInstanceName);
    setActiveWlanIfaceNameProperty(getFirstActiveWlanIfaceName());

    return createWifiStatus(WifiStatusCode::SUCCESS);
}