[automerger skipped] Add SDK check to decide the callback am: 61046affd1 -s ours
am skip reason: Merged-In I3b1e24526c9eccd490cc2ec4cdf6d586dc407d55 with SHA-1 523e13c8bd is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/wpa_supplicant_8/+/26561735
Change-Id: I4f906ac1e84cebde9c74fb0f48776482ea1dacc2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/hostapd/aidl/hostapd.cpp b/hostapd/aidl/hostapd.cpp
index ed77a82..fa0c756 100644
--- a/hostapd/aidl/hostapd.cpp
+++ b/hostapd/aidl/hostapd.cpp
@@ -548,57 +548,96 @@
}
#endif /* CONFIG_IEEE80211BE */
- std::string ht_cap_vht_oper_he_oper_chwidth_as_string;
+ std::string ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string;
switch (iface_params.hwModeParams.maximumChannelBandwidth) {
case ChannelBandwidth::BANDWIDTH_20:
- ht_cap_vht_oper_he_oper_chwidth_as_string = StringPrintf(
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string = StringPrintf(
+#ifdef CONFIG_IEEE80211BE
+ "eht_oper_chwidth=0\n"
+#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_IEEE80211AX
"he_oper_chwidth=0\n"
#endif
- "vht_oper_chwidth=0");
+ "vht_oper_chwidth=0\n"
+ "%s", (band & band6Ghz) ? "op_class=131" : "");
break;
case ChannelBandwidth::BANDWIDTH_40:
- ht_cap_vht_oper_he_oper_chwidth_as_string = StringPrintf(
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string = StringPrintf(
"ht_capab=[HT40+]\n"
+#ifdef CONFIG_IEEE80211BE
+ "eht_oper_chwidth=0\n"
+#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_IEEE80211AX
"he_oper_chwidth=0\n"
#endif
- "vht_oper_chwidth=0");
+ "vht_oper_chwidth=0\n"
+ "%s", (band & band6Ghz) ? "op_class=132" : "");
break;
case ChannelBandwidth::BANDWIDTH_80:
- ht_cap_vht_oper_he_oper_chwidth_as_string = StringPrintf(
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string = StringPrintf(
"ht_capab=[HT40+]\n"
+#ifdef CONFIG_IEEE80211BE
+ "eht_oper_chwidth=%d\n"
+#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_IEEE80211AX
"he_oper_chwidth=%d\n"
#endif
- "vht_oper_chwidth=%d",
+ "vht_oper_chwidth=%d\n"
+ "%s",
+#ifdef CONFIG_IEEE80211BE
+ (iface_params.hwModeParams.enable80211BE && !is_60Ghz_used) ? 1 : 0,
+#endif
#ifdef CONFIG_IEEE80211AX
(iface_params.hwModeParams.enable80211AX && !is_60Ghz_used) ? 1 : 0,
#endif
- iface_params.hwModeParams.enable80211AC ? 1 : 0);
+ iface_params.hwModeParams.enable80211AC ? 1 : 0,
+ (band & band6Ghz) ? "op_class=133" : "");
break;
case ChannelBandwidth::BANDWIDTH_160:
- ht_cap_vht_oper_he_oper_chwidth_as_string = StringPrintf(
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string = StringPrintf(
"ht_capab=[HT40+]\n"
+#ifdef CONFIG_IEEE80211BE
+ "eht_oper_chwidth=%d\n"
+#endif /* CONFIG_IEEE80211BE */
#ifdef CONFIG_IEEE80211AX
"he_oper_chwidth=%d\n"
#endif
- "vht_oper_chwidth=%d",
+ "vht_oper_chwidth=%d\n"
+ "%s",
+#ifdef CONFIG_IEEE80211BE
+ (iface_params.hwModeParams.enable80211BE && !is_60Ghz_used) ? 2 : 0,
+#endif
#ifdef CONFIG_IEEE80211AX
(iface_params.hwModeParams.enable80211AX && !is_60Ghz_used) ? 2 : 0,
#endif
- iface_params.hwModeParams.enable80211AC ? 2 : 0);
+ iface_params.hwModeParams.enable80211AC ? 2 : 0,
+ (band & band6Ghz) ? "op_class=134" : "");
break;
default:
if (!is_2Ghz_band_only && !is_60Ghz_used) {
if (iface_params.hwModeParams.enable80211AC) {
- ht_cap_vht_oper_he_oper_chwidth_as_string =
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string =
"ht_capab=[HT40+]\n"
"vht_oper_chwidth=1\n";
}
+ if (band & band6Ghz) {
+#ifdef CONFIG_IEEE80211BE
+ if (iface_params.hwModeParams.enable80211BE)
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string += "op_class=137\n";
+ else
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string += "op_class=134\n";
+#else /* CONFIG_IEEE80211BE */
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string += "op_class=134\n";
+#endif /* CONFIG_IEEE80211BE */
+ }
#ifdef CONFIG_IEEE80211AX
if (iface_params.hwModeParams.enable80211AX) {
- ht_cap_vht_oper_he_oper_chwidth_as_string += "he_oper_chwidth=1";
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string += "he_oper_chwidth=1\n";
+ }
+#endif
+#ifdef CONFIG_IEEE80211BE
+ if (iface_params.hwModeParams.enable80211BE) {
+ ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string += "eht_oper_chwidth=1";
}
#endif
}
@@ -672,7 +711,7 @@
iface_params.hwModeParams.enable80211AC ? 1 : 0,
he_params_as_string.c_str(),
eht_params_as_string.c_str(),
- hw_mode_as_string.c_str(), ht_cap_vht_oper_he_oper_chwidth_as_string.c_str(),
+ hw_mode_as_string.c_str(), ht_cap_vht_oper_he_oper_eht_oper_chwidth_as_string.c_str(),
nw_params.isHidden ? 1 : 0,
#ifdef CONFIG_INTERWORKING
access_network_params_as_string.c_str(),