Merge "p2p: finetune group join scan process"
diff --git a/src/common/wpa_ctrl.c b/src/common/wpa_ctrl.c
index 8722b19..944b6e3 100644
--- a/src/common/wpa_ctrl.c
+++ b/src/common/wpa_ctrl.c
@@ -11,8 +11,6 @@
#ifdef CONFIG_CTRL_IFACE
#ifdef CONFIG_CTRL_IFACE_UNIX
-#include <sys/stat.h>
-#include <fcntl.h>
#include <sys/un.h>
#include <unistd.h>
#include <fcntl.h>
@@ -143,19 +141,6 @@
return NULL;
}
tries++;
-#ifdef ANDROID
- /* Set client socket file permissions so that bind() creates the client
- * socket with these permissions and there is no need to try to change
- * them with chmod() after bind() which would have potential issues with
- * race conditions. These permissions are needed to make sure the server
- * side (wpa_supplicant or hostapd) can reply to the control interface
- * messages.
- *
- * The lchown() calls below after bind() are also part of the needed
- * operations to allow the response to go through. Those are using the
- * no-deference-symlinks version to avoid races. */
- fchmod(ctrl->s, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
-#endif /* ANDROID */
if (bind(ctrl->s, (struct sockaddr *) &ctrl->local,
sizeof(ctrl->local)) < 0) {
if (errno == EADDRINUSE && tries < 2) {
@@ -175,6 +160,7 @@
#ifdef ANDROID
/* Set group even if we do not have privileges to change owner */
+ chmod(ctrl->local.sun_path, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP);
grp_wifi = getgrnam("wifi");
gid_wifi = grp_wifi ? grp_wifi->gr_gid : 0;
pwd_system = getpwnam("system");
@@ -185,8 +171,8 @@
os_free(ctrl);
return NULL;
}
- lchown(ctrl->local.sun_path, -1, gid_wifi);
- lchown(ctrl->local.sun_path, uid_system, gid_wifi);
+ chown(ctrl->local.sun_path, -1, gid_wifi);
+ chown(ctrl->local.sun_path, uid_system, gid_wifi);
if (os_strncmp(ctrl_path, "@android:", 9) == 0) {
if (socket_local_client_connect(
diff --git a/wpa_supplicant/android.config b/wpa_supplicant/android.config
index feff916..6db380a 100644
--- a/wpa_supplicant/android.config
+++ b/wpa_supplicant/android.config
@@ -553,6 +553,7 @@
CONFIG_SAE=y
# WPA3-Enterprise (SuiteB-192)
+CONFIG_SUITEB=y
CONFIG_SUITEB192=y
include $(wildcard $(LOCAL_PATH)/android_config_*.inc)
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index 2902413..839dea2 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -4862,6 +4862,7 @@
{ INT_RANGE(gas_rand_mac_addr, 0, 2), 0 },
{ INT_RANGE(dpp_config_processing, 0, 2), 0 },
{ INT_RANGE(coloc_intf_reporting, 0, 1), 0 },
+ { INT_RANGE(bss_no_flush_when_down, 0, 1), 0 },
};
#undef FUNC
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index f1d865c..5fcad36 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1539,6 +1539,10 @@
if (config->p2p_interface_random_mac_addr)
fprintf(f, "p2p_interface_random_mac_addr=%d\n",
config->p2p_interface_random_mac_addr);
+ if (config->bss_no_flush_when_down)
+ fprintf(f, "bss_no_flush_when_down=%d\n",
+ config->bss_no_flush_when_down);
+
}
#endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/hidl/1.2/sta_network.cpp b/wpa_supplicant/hidl/1.2/sta_network.cpp
index 780c5a1..1b1ee48 100644
--- a/wpa_supplicant/hidl/1.2/sta_network.cpp
+++ b/wpa_supplicant/hidl/1.2/sta_network.cpp
@@ -1867,7 +1867,7 @@
SupplicantStatus StaNetwork::enableSuiteBEapOpenSslCiphersInternal()
{
struct wpa_ssid *wpa_ssid = retrieveNetworkPtr();
- const char openssl_suiteb_cipher[] = "SUITE_B_192";
+ const char openssl_suiteb_cipher[] = "SUITEB192";
if (setStringKeyFieldAndResetState(
openssl_suiteb_cipher, &(wpa_ssid->eap.openssl_ciphers),