| From 4e8197027a7b86f6cf5f1d2d9095e30281693319 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 035/126] mtk: hostapd: Add HE capabilities check |
| |
| --- |
| 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 400c50988..2a2832cd4 100644 |
| --- a/src/ap/hw_features.c |
| +++ b/src/ap/hw_features.c |
| @@ -722,6 +722,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.18.0 |
| |