]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
PASN: Correctly set RSNXE bits from AP
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:26:21 +0000 (00:26 +0200)
The capability bit index should not be shifted here as the shifting is
handled later below when building the RSNXE octets.

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

index 045310594b7e8fd0e6676d2980f07a39a60d02a9..a429b5dd484934b49a87d74eda94d05593e2c40e 100644 (file)
@@ -1122,11 +1122,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_data *hapd, u8 *eid, size_t len)
        }
 
        if (hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_LTF)
-               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_LTF - 8);
+               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_LTF);
        if (hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_SEC_RTT)
-               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_RTT - 8);
+               capab |= BIT(WLAN_RSNX_CAPAB_SECURE_RTT);
        if (hapd->iface->drv_flags2 & WPA_DRIVER_FLAGS2_PROT_RANGE_NEG)
-               capab |= BIT(WLAN_RSNX_CAPAB_PROT_RANGE_NEG - 8);
+               capab |= BIT(WLAN_RSNX_CAPAB_PROT_RANGE_NEG);
 
        flen = (capab & 0xff00) ? 2 : 1;
        if (len < 2 + flen || !capab)