mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-04 01:34:07 +00:00
Merge "IWifi: Validate dedicated NAN discovery interface." into rvc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
ecec92b7fd
@@ -19,6 +19,7 @@
|
||||
#include <android-base/logging.h>
|
||||
#include <android-base/unique_fd.h>
|
||||
#include <cutils/properties.h>
|
||||
#include <net/if.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/sysmacros.h>
|
||||
|
||||
@@ -885,7 +886,7 @@ std::pair<WifiStatus, sp<IWifiNanIface>> WifiChip::createNanIfaceInternal() {
|
||||
}
|
||||
bool is_dedicated_iface = true;
|
||||
std::string ifname = getNanIfaceName();
|
||||
if (ifname.empty()) {
|
||||
if (ifname.empty() || if_nametoindex(ifname.c_str())) {
|
||||
// Use the first shared STA iface (wlan0) if a dedicated aware iface is
|
||||
// not defined.
|
||||
ifname = getFirstActiveWlanIfaceName();
|
||||
|
||||
Reference in New Issue
Block a user