From: Jouni Malinen Date: Sun, 11 Apr 2010 16:59:33 +0000 (+0300) Subject: Add registerable callback for wpa_supplicant AP mode completion X-Git-Tag: hostap_0_7_2~46 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=libeap.git;a=commitdiff_plain;h=4b768ed0b2437397a6f2ed1a1e06710188fe76d7 Add registerable callback for wpa_supplicant AP mode completion --- diff --git a/wpa_supplicant/ap.c b/wpa_supplicant/ap.c index ff07d60..fe26305 100644 --- a/wpa_supplicant/ap.c +++ b/wpa_supplicant/ap.c @@ -225,6 +225,10 @@ int wpa_supplicant_create_ap(struct wpa_supplicant *wpa_s, os_memcpy(wpa_s->bssid, wpa_s->own_addr, ETH_ALEN); wpa_supplicant_set_state(wpa_s, WPA_COMPLETED); + if (wpa_s->ap_configured_cb) + wpa_s->ap_configured_cb(wpa_s->ap_configured_cb_ctx, + wpa_s->ap_configured_cb_data); + return 0; } diff --git a/wpa_supplicant/wpa_supplicant_i.h b/wpa_supplicant/wpa_supplicant_i.h index d7fc884..e6b2883 100644 --- a/wpa_supplicant/wpa_supplicant_i.h +++ b/wpa_supplicant/wpa_supplicant_i.h @@ -424,6 +424,9 @@ struct wpa_supplicant { #ifdef CONFIG_AP struct hostapd_iface *ap_iface; + void (*ap_configured_cb)(void *ctx, void *data); + void *ap_configured_cb_ctx; + void *ap_configured_cb_data; #endif /* CONFIG_AP */ struct wpa_ssid *bgscan_ssid;