From: Xi Chen Date: Wed, 16 Mar 2011 14:27:08 +0000 (+0200) Subject: IBSS RSN: Add supp_get_state handler X-Git-Tag: hostap-1-bp~482 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f385833bda47890e35f87d0d91493509910c07f3;p=thirdparty%2Fhostap.git IBSS RSN: Add supp_get_state handler --- diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c index 4792ef6c1..ae3d196d1 100644 --- a/wpa_supplicant/ibss_rsn.c +++ b/wpa_supplicant/ibss_rsn.c @@ -39,6 +39,13 @@ static void supp_set_state(void *ctx, enum wpa_states state) } +static enum wpa_states supp_get_state(void *ctx) +{ + struct ibss_rsn_peer *peer = ctx; + return peer->supp_state; +} + + static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf, size_t len) { @@ -171,6 +178,7 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr, ctx->ctx = peer; ctx->msg_ctx = peer->ibss_rsn->wpa_s; ctx->set_state = supp_set_state; + ctx->get_state = supp_get_state; ctx->ether_send = supp_ether_send; ctx->get_beacon_ie = supp_get_beacon_ie; ctx->alloc_eapol = supp_alloc_eapol;