Add registerable callback for wpa_supplicant AP mode completion
authorJouni Malinen <jouni.malinen@atheros.com>
Sun, 11 Apr 2010 16:59:33 +0000 (19:59 +0300)
committerJouni Malinen <j@w1.fi>
Sun, 11 Apr 2010 16:59:33 +0000 (19:59 +0300)
wpa_supplicant/ap.c
wpa_supplicant/wpa_supplicant_i.h

index ff07d60..fe26305 100644 (file)
@@ -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;
 }
 
index d7fc884..e6b2883 100644 (file)
@@ -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;