Merge "set ieee80211w to optional in hostapd config"
diff --git a/hostapd/Android.mk b/hostapd/Android.mk
index 8449d16..54548aa 100644
--- a/hostapd/Android.mk
+++ b/hostapd/Android.mk
@@ -42,6 +42,10 @@
L_CFLAGS += -DANDROID_LIB_STUB
endif
+ifeq ($(BOARD_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL),true)
+L_CFLAGS += -DENABLE_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL
+endif
+
# Use Android specific directory for control interface sockets
L_CFLAGS += -DCONFIG_CTRL_IFACE_CLIENT_DIR=\"/data/vendor/wifi/hostapd/sockets\"
L_CFLAGS += -DCONFIG_CTRL_IFACE_DIR=\"/data/vendor/wifi/hostapd/ctrl\"
diff --git a/hostapd/aidl/hostapd.cpp b/hostapd/aidl/hostapd.cpp
index bbfd174..c24e4f7 100644
--- a/hostapd/aidl/hostapd.cpp
+++ b/hostapd/aidl/hostapd.cpp
@@ -356,6 +356,9 @@
encryption_config_as_string = StringPrintf(
"wpa=2\n"
"rsn_pairwise=%s\n"
+#ifdef ENABLE_HOSTAPD_CONFIG_80211W_MFP_OPTIONAL
+ "ieee80211w=1\n"
+#endif
"wpa_passphrase=%s",
is_60Ghz_band_only ? "GCMP" : "CCMP",
nw_params.passphrase.c_str());