developer | 27057f8 | 2023-07-10 17:23:13 +0800 | [diff] [blame] | 1 | From bb2459cc960ea017702c11e19cf3dbef4df599b8 Mon Sep 17 00:00:00 2001 |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 2 | From: MeiChia Chiu <meichia.chiu@mediatek.com> |
developer | 27057f8 | 2023-07-10 17:23:13 +0800 | [diff] [blame] | 3 | Date: Fri, 9 Jun 2023 09:03:05 +0800 |
| 4 | Subject: [PATCH 32/32] hostapd: mtk: Add HE capabilities check |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 5 | |
| 6 | Add HE capabilities check. |
| 7 | Since "HE capabilities" check has been removed by driver, |
| 8 | add the support for "HE capabilities" check in hostapd. |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 9 | --- |
developer | 27057f8 | 2023-07-10 17:23:13 +0800 | [diff] [blame] | 10 | src/ap/hw_features.c | 26 ++++++++++++++++++++++++++ |
| 11 | 1 file changed, 26 insertions(+) |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 12 | |
| 13 | diff --git a/src/ap/hw_features.c b/src/ap/hw_features.c |
developer | 27057f8 | 2023-07-10 17:23:13 +0800 | [diff] [blame] | 14 | index 828b9261b..991af2c45 100644 |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 15 | --- a/src/ap/hw_features.c |
| 16 | +++ b/src/ap/hw_features.c |
| 17 | @@ -680,6 +680,32 @@ static int ieee80211ac_supported_vht_capab(struct hostapd_iface *iface) |
| 18 | #ifdef CONFIG_IEEE80211AX |
| 19 | static int ieee80211ax_supported_he_capab(struct hostapd_iface *iface) |
| 20 | { |
| 21 | + struct hostapd_hw_modes *mode = iface->current_mode; |
| 22 | + struct he_capabilities *he_cap = &mode->he_capab[IEEE80211_MODE_AP]; |
| 23 | + struct hostapd_config *conf = iface->conf; |
| 24 | + |
| 25 | +#define HE_CAP_CHECK(hw_cap, field, phy_idx, cfg_cap) \ |
| 26 | + do { \ |
| 27 | + if (cfg_cap && !(hw_cap[phy_idx] & field)) { \ |
| 28 | + wpa_printf(MSG_ERROR, "Driver does not support configured" \ |
| 29 | + " HE capability [%s]", #field); \ |
| 30 | + return 0; \ |
| 31 | + } \ |
| 32 | + } while (0) |
| 33 | + |
| 34 | + HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_LDPC_CODING_IN_PAYLOAD, |
| 35 | + HE_PHYCAP_LDPC_CODING_IN_PAYLOAD_IDX, |
| 36 | + conf->he_phy_capab.he_ldpc); |
| 37 | + HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_SU_BEAMFORMER_CAPAB, |
| 38 | + HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX, |
| 39 | + conf->he_phy_capab.he_su_beamformer); |
| 40 | + HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_SU_BEAMFORMEE_CAPAB, |
| 41 | + HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX, |
| 42 | + conf->he_phy_capab.he_su_beamformee); |
| 43 | + HE_CAP_CHECK(he_cap->phy_cap, HE_PHYCAP_MU_BEAMFORMER_CAPAB, |
| 44 | + HE_PHYCAP_MU_BEAMFORMER_CAPAB_IDX, |
| 45 | + conf->he_phy_capab.he_mu_beamformer); |
| 46 | + |
| 47 | return 1; |
| 48 | } |
| 49 | #endif /* CONFIG_IEEE80211AX */ |
| 50 | -- |
developer | 27057f8 | 2023-07-10 17:23:13 +0800 | [diff] [blame] | 51 | 2.39.2 |
developer | ec5af76 | 2023-06-13 11:04:21 +0800 | [diff] [blame] | 52 | |