]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
HE: Mask out the beamforming capabilities if they are not configured
authorJohn Crispin <john@phrozen.org>
Mon, 20 May 2019 07:55:11 +0000 (09:55 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 27 May 2019 13:27:41 +0000 (16:27 +0300)
These bits might be set by the capabilities read from the kernel, so
mask them out if beamforming is not enabled in the local configuration.

Signed-off-by: Shashidhar Lakkavalli <slakkavalli@datto.com>
Signed-off-by: John Crispin <john@phrozen.org>
src/ap/ieee802_11_he.c

index d7b2fb7afe03656dd3339f365c9854f6966159ef..168a20d1634b70b67d9755a40af4e81c2c651151 100644 (file)
@@ -42,14 +42,23 @@ u8 * hostapd_eid_he_capab(struct hostapd_data *hapd, u8 *eid)
        if (hapd->iface->conf->he_phy_capab.he_su_beamformer)
                cap->he_phy_capab_info[HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX] |=
                        HE_PHYCAP_SU_BEAMFORMER_CAPAB;
+       else
+               cap->he_phy_capab_info[HE_PHYCAP_SU_BEAMFORMER_CAPAB_IDX] &=
+                       ~HE_PHYCAP_SU_BEAMFORMER_CAPAB;
 
        if (hapd->iface->conf->he_phy_capab.he_su_beamformee)
                cap->he_phy_capab_info[HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX] |=
                        HE_PHYCAP_SU_BEAMFORMEE_CAPAB;
+       else
+               cap->he_phy_capab_info[HE_PHYCAP_SU_BEAMFORMEE_CAPAB_IDX] &=
+                       ~HE_PHYCAP_SU_BEAMFORMEE_CAPAB;
 
        if (hapd->iface->conf->he_phy_capab.he_mu_beamformer)
                cap->he_phy_capab_info[HE_PHYCAP_MU_BEAMFORMER_CAPAB_IDX] |=
                        HE_PHYCAP_MU_BEAMFORMER_CAPAB;
+       else
+               cap->he_phy_capab_info[HE_PHYCAP_MU_BEAMFORMER_CAPAB_IDX] &=
+                       ~HE_PHYCAP_MU_BEAMFORMER_CAPAB;
 
        pos += sizeof(*cap);