From f3dfe42c7e3c56ced5fa2c4ed73e5eb247df170a Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 15 Feb 2021 23:48:04 +0200 Subject: [PATCH] Clean up RSN parameter setting for PASN Set conf.force_kdk_derivation within the same if block as all the other parameters. This is used only if ssid is not NULL, so no need to have any special handling for this parameter. Signed-off-by: Jouni Malinen --- wpa_supplicant/wpas_glue.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/wpas_glue.c b/wpa_supplicant/wpas_glue.c index 34e8b7a01..345c87d35 100644 --- a/wpa_supplicant/wpas_glue.c +++ b/wpa_supplicant/wpas_glue.c @@ -1477,11 +1477,12 @@ void wpa_supplicant_rsn_supp_set_config(struct wpa_supplicant *wpa_s, (wpa_s->drv_flags2 & WPA_DRIVER_FLAGS2_BEACON_PROTECTION_CLIENT)) conf.beacon_prot = ssid->beacon_prot; - } + #ifdef CONFIG_PASN #ifdef CONFIG_TESTING_OPTIONS - conf.force_kdk_derivation = wpa_s->conf->force_kdk_derivation; + conf.force_kdk_derivation = wpa_s->conf->force_kdk_derivation; #endif /* CONFIG_TESTING_OPTIONS */ -#endif /* CONFIG_PASN*/ +#endif /* CONFIG_PASN */ + } wpa_sm_set_config(wpa_s->wpa, ssid ? &conf : NULL); }