aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorXi Chen <Xi.Chen2@Atheros.com>2011-03-16 14:28:32 (GMT)
committerJouni Malinen <j@w1.fi>2011-03-16 14:28:32 (GMT)
commit92ac6376c47e58c7cc7fac32dd061dbe06f8a524 (patch)
tree77db4020e695b44150df8a669ddcd729b410ffca /wpa_supplicant/ibss_rsn.c
parentf385833bda47890e35f87d0d91493509910c07f3 (diff)
downloadhostap-92ac6376c47e58c7cc7fac32dd061dbe06f8a524.zip
hostap-92ac6376c47e58c7cc7fac32dd061dbe06f8a524.tar.gz
hostap-92ac6376c47e58c7cc7fac32dd061dbe06f8a524.tar.bz2
IBSS RSN: Add for_each_sta handler for authenticator
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index ae3d196..38292c7 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -299,6 +299,24 @@ static int auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg,
}
+static int auth_for_each_sta(void *ctx, int (*cb)(struct wpa_state_machine *sm,
+ void *ctx),
+ void *cb_ctx)
+{
+ struct ibss_rsn *ibss_rsn = ctx;
+ struct ibss_rsn_peer *peer;
+
+ wpa_printf(MSG_DEBUG, "AUTH: for_each_sta");
+
+ for (peer = ibss_rsn->peers; peer; peer = peer->next) {
+ if (peer->auth && cb(peer->auth, cb_ctx))
+ return 1;
+ }
+
+ return 0;
+}
+
+
static int ibss_rsn_auth_init_group(struct ibss_rsn *ibss_rsn,
const u8 *own_addr)
{
@@ -321,6 +339,7 @@ static int ibss_rsn_auth_init_group(struct ibss_rsn *ibss_rsn,
cb.send_eapol = auth_send_eapol;
cb.get_psk = auth_get_psk;
cb.set_key = auth_set_key;
+ cb.for_each_sta = auth_for_each_sta;
ibss_rsn->init_in_progress = 1;
ibss_rsn->auth_group = wpa_init(own_addr, &conf, &cb);