diff options
| author | TreeHugger Robot <treehugger-gerrit@google.com> | 2019-03-05 01:44:56 +0000 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-03-05 01:44:56 +0000 |
| commit | 6f058fb3edab6436870b039c9793bae4d69d615b (patch) | |
| tree | d7da4cc28a325c6bc585f259c36e4d9ffeeefa28 /wifi | |
| parent | 48be47cd0b44f9df0bded5e3b921bd22317ef5f8 (diff) | |
| parent | 5b3334648bb1decf51d46cf1a05dc2924b22619e (diff) | |
| download | android_hardware_interfaces-6f058fb3edab6436870b039c9793bae4d69d615b.tar.gz android_hardware_interfaces-6f058fb3edab6436870b039c9793bae4d69d615b.tar.bz2 android_hardware_interfaces-6f058fb3edab6436870b039c9793bae4d69d615b.zip | |
Merge "wifi(implementation): Fix spammy log"
Diffstat (limited to 'wifi')
| -rw-r--r-- | wifi/1.3/default/wifi_chip.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/wifi/1.3/default/wifi_chip.cpp b/wifi/1.3/default/wifi_chip.cpp index 906f14a1c..727aac534 100644 --- a/wifi/1.3/default/wifi_chip.cpp +++ b/wifi/1.3/default/wifi_chip.cpp @@ -86,16 +86,15 @@ std::string getWlanIfaceName(unsigned idx) { } std::array<char, PROPERTY_VALUE_MAX> buffer; - std::string propName = "wifi.interface." + std::to_string(idx); - auto res = property_get(propName.c_str(), buffer.data(), nullptr); - if (res > 0) return buffer.data(); - if (idx == 0 || idx == 1) { const char* altPropName = (idx == 0) ? "wifi.interface" : "wifi.concurrent.interface"; - res = property_get(altPropName, buffer.data(), nullptr); + auto res = property_get(altPropName, buffer.data(), nullptr); if (res > 0) return buffer.data(); } + std::string propName = "wifi.interface." + std::to_string(idx); + auto res = property_get(propName.c_str(), buffer.data(), nullptr); + if (res > 0) return buffer.data(); return "wlan" + std::to_string(idx); } |
