diff options
author | James Mattis <jmattis@google.com> | 2019-05-24 23:21:37 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-05-24 23:21:37 +0000 |
commit | 87592de6f2c3fccbcaf3705e909b78bd435f2aa7 (patch) | |
tree | e1bb30db571d2cdf8f8dcc25217d96dcfa0af611 /wifi/1.3/default/wifi_chip.cpp | |
parent | 4ae7dd19ba63d02a2508331a5cb4ea270ec14277 (diff) | |
parent | d2e4c074659dd731c2fac443f104fdf2df339cbb (diff) | |
download | android_hardware_interfaces-87592de6f2c3fccbcaf3705e909b78bd435f2aa7.tar.gz android_hardware_interfaces-87592de6f2c3fccbcaf3705e909b78bd435f2aa7.tar.bz2 android_hardware_interfaces-87592de6f2c3fccbcaf3705e909b78bd435f2aa7.zip |
Merge "Fix so that dual access points (AP) works." into qt-dev
Diffstat (limited to 'wifi/1.3/default/wifi_chip.cpp')
-rw-r--r-- | wifi/1.3/default/wifi_chip.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp index 6c2fd678d..e9991dcee 100644 --- a/wifi/1.3/default/wifi_chip.cpp +++ b/wifi/1.3/default/wifi_chip.cpp @@ -1463,6 +1463,13 @@ bool WifiChip::isStaApConcurrencyAllowedInCurrentMode() { return canCurrentModeSupportIfaceCombo(req_iface_combo); } +bool WifiChip::isDualApAllowedInCurrentMode() { + // Check if we can support atleast 1 STA & 1 AP concurrently. + std::map<IfaceType, size_t> req_iface_combo; + req_iface_combo[IfaceType::AP] = 2; + return canCurrentModeSupportIfaceCombo(req_iface_combo); +} + std::string WifiChip::getFirstActiveWlanIfaceName() { if (sta_ifaces_.size() > 0) return sta_ifaces_[0]->getName(); if (ap_ifaces_.size() > 0) return ap_ifaces_[0]->getName(); @@ -1488,10 +1495,12 @@ std::string WifiChip::allocateApOrStaIfaceName(uint32_t start_idx) { } // AP iface names start with idx 1 for modes supporting -// concurrent STA, else start with idx 0. +// concurrent STA and not dual AP, else start with idx 0. std::string WifiChip::allocateApIfaceName() { - return allocateApOrStaIfaceName( - isStaApConcurrencyAllowedInCurrentMode() ? 1 : 0); + return allocateApOrStaIfaceName((isStaApConcurrencyAllowedInCurrentMode() && + !isDualApAllowedInCurrentMode()) + ? 1 + : 0); } // STA iface names start with idx 0. |