On Tue, Dec 04, 2018 at 04:39:59PM +0900, Jeonghwan Yoon wrote: > diff --git a/wpa_supplicant/dbus/dbus_new.c b/wpa_supplicant/dbus/dbus_new.c > @@ -2108,6 +2108,145 @@ void wpas_dbus_signal_p2p_invitation_received(struct wpa_supplicant *wpa_s, > +#ifdef CONFIG_DPP > +void wpas_dbus_signal_dpp_tx(struct wpa_supplicant *wpa_s, > + const u8 *dst, unsigned int freq, int type) Please intent the second line to start "const" at the same position as "struct" on the first line. > + if (iface == NULL || !wpa_s->dbus_new_path) > + return; !iface is the preferred way of handling check against NULL pointers. > diff --git a/wpa_supplicant/dpp_supplicant.c b/wpa_supplicant/dpp_supplicant.c > @@ -106,6 +106,7 @@ int wpas_dpp_qr_code(struct wpa_supplicant *wpa_s, const char *cmd) > + wpas_notify_dpp_tx(wpa_s, auth->peer_mac_addr, auth->curr_freq, DPP_PA_AUTHENTICATION_RESP); Split long lines to be <= 80 characters (with string constants being an exception). > @@ -1065,6 +1068,7 @@ static void wpas_dpp_rx_auth_req(struct wpa_supplicant *wpa_s, const u8 *src, > if (!r_bootstrap || r_bootstrap_len != SHA256_MAC_LEN) { > wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_FAIL > "Missing or invalid required Responder Bootstrapping Key Hash attribute"); > + wpas_notify_dpp_failed(wpa_s, "Missing or invalid required Responder Bootstrapping Key Hash attribute"); > return; > } This looks inconvenient duplication of strings. Maybe move wpa_msg() call to wpas_notify_dpp_failed() to cover this type of cases? What is the use case for these messages over D-Bus? Many of these are for conformance testing purposes and not necessarily that useful for real world applications.. Not that I'm necessarily against this, but it would be good to understand that lot of the DPP code includes conformance testing functionality that may not really make much sense to expose over D-Bus. > diff --git a/wpa_supplicant/notify.h b/wpa_supplicant/notify.h > - > +#ifdef CONFIG_DPP > +void wpas_notify_dpp_tx(struct wpa_supplicant *wpa_s, const u8 *dst, > + unsigned int freq, int type); > +void wpas_notify_dpp_tx_status(struct wpa_supplicant *wpa_s, const u8 *dst, > + unsigned int freq, const char *res); > +void wpas_notify_dpp_rx(struct wpa_supplicant *wpa_s, const u8 *src, > + unsigned int freq, int type); > +void wpas_notify_dpp_failed(struct wpa_supplicant *wpa_s, const char *res); > +#endif /* CONFIG_DPP */ > #endif /* NOTIFY_H */ No #ifdef CONFIG_DPP around function prototypes in header files. -- Jouni Malinen PGP id EFC895FA _______________________________________________ Hostap mailing list Hostap@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/hostap