From: Ilan Peer Date: Tue, 16 Feb 2021 13:23:57 +0000 (+0200) Subject: PASN: Correctly set RSNXE bits from STA X-Git-Tag: hostap_2_10~548 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85eb47e3a9926bb5142609f862a31dcf728f8c9f;p=thirdparty%2Fhostap.git PASN: Correctly set RSNXE bits from STA 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 Signed-off-by: Andrei Otcheretianski --- diff --git a/wpa_supplicant/pasn_supplicant.c b/wpa_supplicant/pasn_supplicant.c index 736a6c7d6..4f5ac589b 100644 --- a/wpa_supplicant/pasn_supplicant.c +++ b/wpa_supplicant/pasn_supplicant.c @@ -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,