aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-05-11 14:30:26 (GMT)
committerJouni Malinen <j@w1.fi>2020-05-11 14:30:26 (GMT)
commit890ae336c0a4ec3daa6a4a2ba1a344d318072261 (patch)
tree2c011b354db9de9bfda7760aa7abb69b516f216f
parent670e1533775703e14450d3a0650fb75811377f08 (diff)
downloadhostap-890ae336c0a4ec3daa6a4a2ba1a344d318072261.zip
hostap-890ae336c0a4ec3daa6a4a2ba1a344d318072261.tar.gz
hostap-890ae336c0a4ec3daa6a4a2ba1a344d318072261.tar.bz2
DPP2: Clean up CONFIG_DPP2 use with configurator connectivity IE
Avoid duplicated return statement in CONFIG_DPP2=y builds. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
-rw-r--r--src/ap/ieee802_11_shared.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ap/ieee802_11_shared.c b/src/ap/ieee802_11_shared.c
index 113b4ef..74a837f 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;
}