aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2022-03-08 00:17:48 +0000
committerXin Li <delphij@google.com>2022-03-08 00:17:48 +0000
commitf73f435b936d8053a6eb217a194ddbcbf6cf4ce5 (patch)
tree16592fbd70c7b6540d6725f019757dd5aa2d20a7
parentb22e2a82a3d1699ad6584343dd21c3f425cdb810 (diff)
parent82ccf35e4357e1e214320092b550fa9aa7ed6ea5 (diff)
downloadwpa_supplicant_8-f73f435b936d8053a6eb217a194ddbcbf6cf4ce5.tar.gz
Merge Android 12L
Bug: 222710654 Merged-In: I1d3b32663167d200c4aad5f9fac0b52d3ddde5c2 Change-Id: I6d758b12cbc1de581ccb27680b7b56264a289852
-rw-r--r--hostapd/hidl/1.3/hostapd.cpp10
-rw-r--r--src/ap/drv_callbacks.c3
-rw-r--r--wpa_supplicant/hidl/1.4/supplicant.cpp4
-rw-r--r--wpa_supplicant/hidl/1.4/supplicant.h1
4 files changed, 17 insertions, 1 deletions
diff --git a/hostapd/hidl/1.3/hostapd.cpp b/hostapd/hidl/1.3/hostapd.cpp
index f9d26474..72efd3fe 100644
--- a/hostapd/hidl/1.3/hostapd.cpp
+++ b/hostapd/hidl/1.3/hostapd.cpp
@@ -919,7 +919,15 @@ V1_2::HostapdStatus Hostapd::addSingleAccessPoint(
iface_hapd->own_addr);
}
}
- };
+ else if (os_strncmp(txt, AP_EVENT_DISABLED,
+ strlen(AP_EVENT_DISABLED)) == 0) {
+ // Invoke the failure callback on all registered clients.
+ for (const auto& callback : callbacks_) {
+ callback->onFailure(strlen(iface_hapd->conf->bridge) > 0 ?
+ iface_hapd->conf->bridge : iface_hapd->conf->iface);
+ }
+ }
+ };
// Setup callback
iface_hapd->setup_complete_cb = onAsyncSetupCompleteCb;
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index 53082f53..de517729 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -1673,6 +1673,9 @@ static void hostapd_event_iface_unavailable(struct hostapd_data *hapd)
hostapd_switch_channel_fallback(hapd->iface,
&hapd->cs_freq_params);
}
+
+ // inform framework that interface is unavailable
+ hostapd_disable_iface(hapd->iface);
}
diff --git a/wpa_supplicant/hidl/1.4/supplicant.cpp b/wpa_supplicant/hidl/1.4/supplicant.cpp
index a65b70e7..d8b18bba 100644
--- a/wpa_supplicant/hidl/1.4/supplicant.cpp
+++ b/wpa_supplicant/hidl/1.4/supplicant.cpp
@@ -365,6 +365,10 @@ Supplicant::addInterfaceInternal(const IfaceInfo& iface_info)
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 2944c50b..c2b172c5 100644
--- a/wpa_supplicant/hidl/1.4/supplicant.h
+++ b/wpa_supplicant/hidl/1.4/supplicant.h
@@ -23,6 +23,7 @@ extern "C"
#include "utils/includes.h"
#include "utils/wpa_debug.h"
#include "wpa_supplicant_i.h"
+#include "scan.h"
}
namespace android {