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

Commit 2888bf2e authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "wifi: Two AP instances use the same interface name"

parents 919dc4be 3ba02e05
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1926,9 +1926,10 @@ uint32_t WifiChip::startIdxOfApIface() {
// concurrent STA and not dual AP, else start with idx 0.
std::string WifiChip::allocateApIfaceName() {
    // Check if we have a dedicated iface for AP.
    std::vector<std::string> ifnames = getPredefinedApIfaceNames(false);
    if (!ifnames.empty()) {
        return ifnames[0];
    std::vector<std::string> ifnames = getPredefinedApIfaceNames(true);
    for (auto const& ifname : ifnames) {
        if (findUsingName(ap_ifaces_, ifname)) continue;
        return ifname;
    }
    return allocateApOrStaIfaceName(IfaceType::AP, startIdxOfApIface());
}