From 85eb47e3a9926bb5142609f862a31dcf728f8c9f Mon Sep 17 00:00:00 2001 From: Ilan Peer Date: Tue, 16 Feb 2021 15:23:57 +0200 Subject: [PATCH] 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 --- wpa_supplicant/pasn_supplicant.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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,