]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Correctly set RSNXE bits from STA
authorIlan Peer <ilan.peer@intel.com>
Tue, 16 Feb 2021 13:23:57 +0000 (15:23 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 19 Feb 2021 22:25:10 +0000 (00:25 +0200)
These defines are for the capability bit number, not the binary value
from the bit index. As such, need to use BIT() here to set the bitmap
appropriately.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
wpa_supplicant/pasn_supplicant.c

index 736a6c7d6f96125a25ac89b907cd0d0b775c8d42..4f5ac589b9a1730122c3ff245bd2786bd1d4c598 100644 (file)
@@ -689,11 +689,11 @@ static struct wpabuf * wpas_pasn_build_auth_1(struct wpa_supplicant *wpa_s)
        /* TODO: How to handle protected TWT and SAE H2E? */
        capab = 0;
        if (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF)
-               capab |= WLAN_RSNX_CAPAB_SECURE_LTF;
+               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_LTF);
        if (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_RTT)
-               capab |= WLAN_RSNX_CAPAB_SECURE_RTT;
+               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_RTT);
        if (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_PROT_RANGE_NEG)
-               capab |= WLAN_RSNX_CAPAB_PROT_RANGE_NEG;
+               capab |= BIT(WLAN_RSNX_CAPAB_PROT_RANGE_NEG);
        wpa_pasn_add_rsnxe(buf, capab);
 
        ret = pasn_auth_frame_hash(pasn->akmp, pasn->cipher,