Merge "wifi: report generation 11BE based on EHT capabilities" into main
diff --git a/apex/Android.bp b/apex/Android.bp
new file mode 100644
index 0000000..5fca381
--- /dev/null
+++ b/apex/Android.bp
@@ -0,0 +1,36 @@
+prebuilt_etc {
+ name: "wpa_supplicant.conf.prebuilt",
+ src: ":wpa_supplicant_template.conf",
+ filename: "wpa_supplicant.conf",
+ relative_install_path: "wifi",
+ installable: false,
+}
+
+apex {
+ name: "com.android.hardware.wpa_supplicant",
+ manifest: "apex_manifest.json",
+ file_contexts: "file_contexts",
+ // TODO: b/363080108 - Replace placeholder key with release key
+ key: "com.android.hardware.key",
+ certificate: ":com.android.hardware.certificate",
+ updatable: false,
+ vendor: true,
+
+ enabled: select(soong_config_variable("wpa_supplicant_8", "wpa_build_hostapd"), {
+ true: true,
+ default: false,
+ }),
+ binaries: [
+ "wpa_supplicant",
+ "hostapd",
+ ],
+ prebuilts: [
+ "com.android.hardware.wpa_supplicant.rc",
+ "com.android.hardware.hostapd.rc",
+ "wpa_supplicant.conf.prebuilt",
+ ],
+ vintf_fragment_modules: [
+ "android.hardware.wifi.hostapd.xml",
+ "android.hardware.wifi.supplicant.xml",
+ ],
+}
diff --git a/apex/apex_manifest.json b/apex/apex_manifest.json
new file mode 100644
index 0000000..58b0640
--- /dev/null
+++ b/apex/apex_manifest.json
@@ -0,0 +1,4 @@
+{
+ "name": "com.android.hardware.wpa_supplicant",
+ "version": 1
+}
\ No newline at end of file
diff --git a/apex/file_contexts b/apex/file_contexts
new file mode 100644
index 0000000..64599d6
--- /dev/null
+++ b/apex/file_contexts
@@ -0,0 +1,4 @@
+(/.*)? u:object_r:vendor_file:s0
+/etc(/.*)? u:object_r:vendor_configs_file:s0
+/bin/hw/wpa_supplicant u:object_r:hal_wifi_supplicant_default_exec:s0
+/bin/hw/hostapd u:object_r:hal_wifi_hostapd_default_exec:s0
\ No newline at end of file
diff --git a/hostapd/Android.bp b/hostapd/Android.bp
index 533a917..4753644 100644
--- a/hostapd/Android.bp
+++ b/hostapd/Android.bp
@@ -743,3 +743,16 @@
}
// End of non-cuttlefish section
+
+genrule {
+ name: "com.android.hardware.hostapd.rc-gen",
+ srcs: ["hostapd.android.rc"],
+ out: ["com.android.hardware.hostapd.rc"],
+ cmd: "sed -E 's@/vendor/bin@/apex/com.android.hardware.wpa_supplicant/bin@' $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "com.android.hardware.hostapd.rc",
+ src: ":com.android.hardware.hostapd.rc-gen",
+ installable: false,
+}
diff --git a/hostapd/aidl/hostapd.cpp b/hostapd/aidl/hostapd.cpp
index 658e3e2..745fab8 100644
--- a/hostapd/aidl/hostapd.cpp
+++ b/hostapd/aidl/hostapd.cpp
@@ -881,7 +881,7 @@
"%s\n"
"interface=%s\n"
"driver=nl80211\n"
- "ctrl_interface=/data/vendor/wifi/hostapd/ctrl_%s\n"
+ "ctrl_interface=/data/vendor/wifi/hostapd/ctrl\n"
// ssid2 signals to hostapd that the value is not a literal value
// for use as a SSID. In this case, we're giving it a hex
// std::string and hostapd needs to expect that.
@@ -907,7 +907,6 @@
"%s\n",
sanitized_overlay.c_str(),
iface_params.usesMlo ? br_name.c_str() : iface_params.name.c_str(),
- iface_params.name.c_str(),
ssid_as_string.c_str(),
channel_config_as_string.c_str(),
iface_params.hwModeParams.enable80211N ? 1 : 0,
diff --git a/wpa_supplicant/Android.bp b/wpa_supplicant/Android.bp
index 2aa7530..ea97188 100644
--- a/wpa_supplicant/Android.bp
+++ b/wpa_supplicant/Android.bp
@@ -913,6 +913,12 @@
}) + select(soong_config_variable("wpa_supplicant_8", "wifi_brcm_open_source_multi_akm"), {
true: ["-DWIFI_BRCM_OPEN_SOURCE_MULTI_AKM"],
default: [],
+ }) + select(soong_config_variable("wpa_supplicant_8", "wpa_supplicant_11ax"), {
+ true: ["-DCONFIG_IEEE80211AX"],
+ default: [],
+ }) + select(soong_config_variable("wpa_supplicant_8", "wpa_supplicant_11be"), {
+ true: ["-DCONFIG_IEEE80211BE"],
+ default: [],
}),
arch: {
arm: {
@@ -1521,3 +1527,16 @@
}
// End of non-cuttlefish section
+
+genrule {
+ name: "com.android.hardware.wpa_supplicant.rc-gen",
+ srcs: ["aidl/vendor/android.hardware.wifi.supplicant-service.rc"],
+ out: ["com.android.hardware.wpa_supplicant.rc"],
+ cmd: "sed -E 's@/vendor/bin@/apex/com.android.hardware.wpa_supplicant/bin@' $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "com.android.hardware.wpa_supplicant.rc",
+ src: ":com.android.hardware.wpa_supplicant.rc-gen",
+ installable: false,
+}