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