automake build system
[mech_eap.orig] / wpa_supplicant / tests / test_wpa.c
index 61b6336..7947137 100644 (file)
 
 #include "common.h"
 #include "eloop.h"
-#include "ieee802_11_defs.h"
+#include "common/ieee802_11_defs.h"
 #include "../config.h"
-#include "wpa.h"
-#include "wpa_ie.h"
+#include "rsn_supp/wpa.h"
+#include "rsn_supp/wpa_ie.h"
 #include "../hostapd/wpa.h"
 
 
@@ -60,7 +60,7 @@ static int supp_get_bssid(void *ctx, u8 *bssid)
 }
 
 
-static void supp_set_state(void *ctx, wpa_states state)
+static void supp_set_state(void *ctx, enum wpa_states state)
 {
        wpa_printf(MSG_DEBUG, "SUPP: %s(state=%d)", __func__, state);
 }
@@ -143,7 +143,7 @@ static int supp_get_beacon_ie(void *ctx)
 }
 
 
-static int supp_set_key(void *ctx, wpa_alg alg,
+static int supp_set_key(void *ctx, enum wpa_alg alg,
                        const u8 *addr, int key_idx, int set_tx,
                        const u8 *seq, size_t seq_len,
                        const u8 *key, size_t key_len)
@@ -180,6 +180,7 @@ static int supp_init(struct wpa *wpa)
                return -1;
 
        ctx->ctx = wpa;
+       ctx->msg_ctx = wpa;
        ctx->set_state = supp_set_state;
        ctx->get_bssid = supp_get_bssid;
        ctx->ether_send = supp_ether_send;
@@ -350,7 +351,7 @@ int main(int argc, char *argv[])
        wpa_debug_level = 0;
        wpa_debug_show_keys = 1;
 
-       if (eloop_init(&wpa)) {
+       if (eloop_init()) {
                wpa_printf(MSG_ERROR, "Failed to initialize event loop");
                return -1;
        }