Update the scan results immediately after adding the interface
After adding the newly created interface,
request the current scan results from the driver and updates
the local BSS list wpa_s->bss. This is to avoid a full scan
while processing the connect request on the newly created interface.
Bug: 202249262
Test: Ran Nearby hotspot test and confirmed that STA is able to
connect with in 500ms.
Test command is ./testing/mobile/devicewhisperer/tests/nearby/connections/run.sh
E2E_P2P_POINT_TO_POINT_WIFI_HOTSPOT_UPGRADE
Change-Id: I5a74975fcfed7bbbff7a16acbecafd0a6570609d
Merged-In: I5a74975fcfed7bbbff7a16acbecafd0a6570609d
(cherry picked from commit d3bdd9ed62546437d1e717a6e7f718780ae1b537)
diff --git a/wpa_supplicant/hidl/1.4/supplicant.cpp b/wpa_supplicant/hidl/1.4/supplicant.cpp
index 6f4cde6..741a537 100644
--- a/wpa_supplicant/hidl/1.4/supplicant.cpp
+++ b/wpa_supplicant/hidl/1.4/supplicant.cpp
@@ -352,6 +352,10 @@
if (!wpa_s) {
return {{SupplicantStatusCode::FAILURE_UNKNOWN, ""}, {}};
}
+ //Request the current scan results from the driver and updates
+ //the local BSS list wpa_s->bss. This is to avoid a full scan
+ //while processing the connect request on newly created interface.
+ wpa_supplicant_update_scan_results(wpa_s);
}
// The supplicant core creates a corresponding hidl object via
// HidlManager when |wpa_supplicant_add_iface| is called.
diff --git a/wpa_supplicant/hidl/1.4/supplicant.h b/wpa_supplicant/hidl/1.4/supplicant.h
index 2944c50..c2b172c 100644
--- a/wpa_supplicant/hidl/1.4/supplicant.h
+++ b/wpa_supplicant/hidl/1.4/supplicant.h
@@ -23,6 +23,7 @@
#include "utils/includes.h"
#include "utils/wpa_debug.h"
#include "wpa_supplicant_i.h"
+#include "scan.h"
}
namespace android {