aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-01-17 15:31:21 (GMT)
committerJouni Malinen <j@w1.fi>2009-01-17 15:31:21 (GMT)
commit3146b2b961aa70ea1947de3ce6d321f6a84276f6 (patch)
tree70564ea72c57b64284c69498903b837040534362 /wpa_supplicant/ibss_rsn.c
parent8be1844071eea364c3410a74a35ab8f699f0f7e5 (diff)
downloadhostap-3146b2b961aa70ea1947de3ce6d321f6a84276f6.zip
hostap-3146b2b961aa70ea1947de3ce6d321f6a84276f6.tar.gz
hostap-3146b2b961aa70ea1947de3ce6d321f6a84276f6.tar.bz2
IBSS RSN: Added couple of required WPA supplicant callback functions
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index a35fdc5..8329957 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -31,6 +31,13 @@ static void ibss_rsn_free(struct ibss_rsn_peer *peer)
}
+static void supp_set_state(void *ctx, wpa_states state)
+{
+ struct ibss_rsn_peer *peer = ctx;
+ peer->supp_state = state;
+}
+
+
static int supp_ether_send(void *ctx, const u8 *dest, u16 proto, const u8 *buf,
size_t len)
{
@@ -99,6 +106,13 @@ static int supp_set_key(void *ctx, wpa_alg alg,
}
+static void * supp_get_network_ctx(void *ctx)
+{
+ struct ibss_rsn_peer *peer = ctx;
+ return wpa_supplicant_get_ssid(peer->ibss_rsn->wpa_s);
+}
+
+
static int supp_mlme_setprotection(void *ctx, const u8 *addr,
int protection_type, int key_type)
{
@@ -123,10 +137,12 @@ int ibss_rsn_supp_init(struct ibss_rsn_peer *peer, const u8 *own_addr,
return -1;
ctx->ctx = peer;
+ ctx->set_state = supp_set_state;
ctx->ether_send = supp_ether_send;
ctx->get_beacon_ie = supp_get_beacon_ie;
ctx->alloc_eapol = supp_alloc_eapol;
ctx->set_key = supp_set_key;
+ ctx->get_network_ctx = supp_get_network_ctx;
ctx->mlme_setprotection = supp_mlme_setprotection;
ctx->cancel_auth_timeout = supp_cancel_auth_timeout;
peer->supp = wpa_sm_init(ctx);