[rdkb][common][bsp][Refactor and sync wifi from openwrt]
[Description]
ac60b1ff [MAC80211][misc][Add Filogic 880/860/830/820/630 Release Information]
7eb946a0 [MAC80211][WiFi7][hostapd][sync hostapd patches]
91638fc9 [MAC80211][WiFi7][mac80211][sync backports code]
8e45746b [MAC80211][WiFi7][mt76][sync mt76 patches]
1c564afa [MAC80211][WiFi7][mt76][Add Eagle BE19000 ifem default bin]
[Release-log]
Change-Id: I1d4218d3b1211700acb5937fe310cbd0bf219968
diff --git a/recipes-wifi/hostapd/files/patches-2.10.3/0053-mtk-hostapd-Add-HE-capabilities-check.patch b/recipes-wifi/hostapd/files/patches-2.10.3/0053-mtk-hostapd-Add-HE-capabilities-check.patch
new file mode 100644
index 0000000..c9fc8b7
--- /dev/null
+++ b/recipes-wifi/hostapd/files/patches-2.10.3/0053-mtk-hostapd-Add-HE-capabilities-check.patch
@@ -0,0 +1,52 @@
+From 2dd00ec0a8231bd8c6893f9517875ad94022f9b2 Mon Sep 17 00:00:00 2001
+From: MeiChia Chiu <meichia.chiu@mediatek.com>
+Date: Fri, 9 Jun 2023 09:03:05 +0800
+Subject: [PATCH 053/104] mtk: hostapd: Add HE capabilities check
+
+Add HE capabilities check.
+Since "HE capabilities" check has been removed by driver,
+add the support for "HE capabilities" check in hostapd.
+---
+ src/ap/hw_features.c | 26 ++++++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c
+index 672e43a10..a35c5974a 100644
+--- a/src/ap/hw_features.c
++++ b/src/ap/hw_features.c
+@@ -709,6 +709,32 @@ static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface)
+ #ifdef CONFIG_IEEE80211AX
+ static int ieee80211ax_supported_he_capab(struct hostapd_iface *iface)
+ {
++ struct hostapd_hw_modes *mode = iface->current_mode;
++ struct he_capabilities *he_cap = &mode->he_capab[IEEE80211_MODE_AP];
++ struct hostapd_config *conf = iface->conf;
++
++#define HE_CAP_CHECK(hw_cap, field, phy_idx, cfg_cap) \
++ do { \
++ if (cfg_cap && !(hw_cap[phy_idx] & field)) { \
++ wpa_printf(MSG_ERROR, "Driver does not support configured" \
++ " HE capability [%s]", #field); \
++ return 0; \
++ } \
++ } while (0)
++
++ HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_LDPC_CODING_IN_PAYLOAD,
++ HE_PHYCAP_LDPC_CODING_IN_PAYLOAD_IDX,
++ conf->he_phy_capab.he_ldpc);
++ HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_SU_BEAMFORMER_CAPAB,
++ HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX,
++ conf->he_phy_capab.he_su_beamformer);
++ HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_SU_BEAMFORMEE_CAPAB,
++ HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX,
++ conf->he_phy_capab.he_su_beamformee);
++ HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_MU_BEAMFORMER_CAPAB,
++ HE_PHYCAP_MU_BEAMFORMER_CAPAB_IDX,
++ conf->he_phy_capab.he_mu_beamformer);
++
+ return 1;
+ }
+ #endif /* CONFIG_IEEE80211AX */
+--
+2.39.2
+