From 890ae336c0a4ec3daa6a4a2ba1a344d318072261 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 11 May 2020 17:30:26 +0300 Subject: [PATCH] DPP2: Clean up CONFIG_DPP2 use with configurator connectivity IE Avoid duplicated return statement in CONFIG_DPP2=y builds. Signed-off-by: Jouni Malinen --- src/ap/ieee802_11_shared.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c index 113b4ef04..74a837f8b 100644 --- a/src/ap/ieee802_11_shared.c +++ b/src/ap/ieee802_11_shared.c @@ -886,9 +886,9 @@ size_t hostapd_eid_dpp_cc_len(struct hostapd_data *hapd) u8 * hostapd_eid_dpp_cc(struct hostapd_data *hapd, u8 *eid, size_t len) { -#ifdef CONFIG_DPP2 u8 *pos = eid; +#ifdef CONFIG_DPP2 if (!hapd->conf->dpp_configurator_connectivity || len < 6) return pos; @@ -897,10 +897,9 @@ u8 * hostapd_eid_dpp_cc(struct hostapd_data *hapd, u8 *eid, size_t len) WPA_PUT_BE24(pos, OUI_WFA); pos += 3; *pos++ = DPP_CC_OUI_TYPE; +#endif /* CONFIG_DPP2 */ return pos; -#endif /* CONFIG_DPP2 */ - return eid; }