]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP2: Clean up CONFIG_DPP2 use with configurator connectivity IE
authorJouni Malinen <jouni@codeaurora.org>
Mon, 11 May 2020 14:30:26 +0000 (17:30 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 11 May 2020 14:30:26 +0000 (17:30 +0300)
Avoid duplicated return statement in CONFIG_DPP2=y builds.

Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/ap/ieee802_11_shared.c

index 113b4ef042758b0e2e1eba2668d773c962a41741..74a837f8b88c60938c67933fe97549b13af74bf2 100644 (file)
@@ -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;
 }