DPP: Move DPP_EVENT_AUTH_SUCCESS to a helper

This event is generated in a couple of places. It'll be easier to extend
the event with additional metadata if it's generated in a single place.

Signed-off-by: Michal Kazior <michal@plume.com>
This commit is contained in:
Michal Kazior 2021-05-11 10:56:16 +00:00 committed by Jouni Malinen
parent d8d2b3a338
commit 2d8974e314
5 changed files with 13 additions and 8 deletions

View file

@ -1906,7 +1906,7 @@ static void wpas_dpp_start_gas_client(struct wpa_supplicant *wpa_s)
static void wpas_dpp_auth_success(struct wpa_supplicant *wpa_s, int initiator)
{
wpa_printf(MSG_DEBUG, "DPP: Authentication succeeded");
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_AUTH_SUCCESS "init=%d", initiator);
dpp_notify_auth_success(wpa_s->dpp_auth, initiator);
#ifdef CONFIG_TESTING_OPTIONS
if (dpp_test == DPP_TEST_STOP_AT_AUTH_CONF) {
wpa_printf(MSG_INFO,
@ -4073,7 +4073,7 @@ wpas_dpp_gas_req_handler(void *ctx, void *resp_ctx, const u8 *sa,
* TX status handler, but since there was no such handler call
* yet, simply send out the event message and proceed with
* exchange. */
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_AUTH_SUCCESS "init=1");
dpp_notify_auth_success(auth, 1);
wpa_s->dpp_auth_ok_on_ack = 0;
}