From: Jouni Malinen Date: Sat, 19 Mar 2011 09:39:51 +0000 (+0200) Subject: WPS: Move P2P extension generation for WSC IE in Beacon frames X-Git-Tag: hostap-1-bp~470 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3cb52fb909acf0c34da5b7a571bbb1e3214dc1c;p=thirdparty%2Fhostap.git WPS: Move P2P extension generation for WSC IE in Beacon frames This cleans up debug log by keeping the WSC IE attributes for Beacon frames before starting to build the Probe Response frame. --- diff --git a/src/wps/wps_registrar.c b/src/wps/wps_registrar.c index 58a17ad7d..dbaf99357 100644 --- a/src/wps/wps_registrar.c +++ b/src/wps/wps_registrar.c @@ -1144,6 +1144,15 @@ static int wps_set_ie(struct wps_registrar *reg) return -1; } +#ifdef CONFIG_P2P + if (wps_build_dev_name(®->wps->dev, beacon) || + wps_build_primary_dev_type(®->wps->dev, beacon)) { + wpabuf_free(beacon); + wpabuf_free(probe); + return -1; + } +#endif /* CONFIG_P2P */ + wpa_printf(MSG_DEBUG, "WPS: Build Probe Response IEs"); if (wps_build_version(probe) || @@ -1164,15 +1173,6 @@ static int wps_set_ie(struct wps_registrar *reg) return -1; } -#ifdef CONFIG_P2P - if (wps_build_dev_name(®->wps->dev, beacon) || - wps_build_primary_dev_type(®->wps->dev, beacon)) { - wpabuf_free(beacon); - wpabuf_free(probe); - return -1; - } -#endif /* CONFIG_P2P */ - beacon = wps_ie_encapsulate(beacon); probe = wps_ie_encapsulate(probe);