summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--wifi/1.3/default/wifi_chip.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp
index e9991dcee..0d33ae6e2 100644
--- a/wifi/1.3/default/wifi_chip.cpp
+++ b/wifi/1.3/default/wifi_chip.cpp
@@ -107,6 +107,12 @@ std::string getP2pIfaceName() {
return buffer.data();
}
+std::string getApIfaceName() {
+ std::array<char, PROPERTY_VALUE_MAX> buffer;
+ property_get("persist.vendor.wifi.softap.interface", buffer.data(), "");
+ return buffer.data();
+}
+
void setActiveWlanIfaceNameProperty(const std::string& ifname) {
auto res = property_set(kActiveWlanIfaceNameProperty, ifname.data());
if (res != 0) {
@@ -805,7 +811,9 @@ std::pair<WifiStatus, sp<IWifiApIface>> WifiChip::createApIfaceInternal() {
if (!canCurrentModeSupportIfaceOfTypeWithCurrentIfaces(IfaceType::AP)) {
return {createWifiStatus(WifiStatusCode::ERROR_NOT_AVAILABLE), {}};
}
- std::string ifname = allocateApIfaceName();
+ std::string ifname = getApIfaceName();
+ if (ifname.empty())
+ ifname = allocateApIfaceName();
sp<WifiApIface> iface =
new WifiApIface(ifname, legacy_hal_, iface_util_, feature_flags_);
ap_ifaces_.push_back(iface);