aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ibss_rsn.c
diff options
context:
space:
mode:
authorBharat Bhushan <bchakrav@qti.qualcomm.com>2013-06-07 10:07:17 (GMT)
committerJouni Malinen <j@w1.fi>2013-06-07 10:07:17 (GMT)
commit1aef400bf03159d60109ce886943fbd26d88a6c3 (patch)
treed88de9785c4f3ad7bedc7f084eb925e2bb545ced /wpa_supplicant/ibss_rsn.c
parent4abc0424ef4bde2ea4fb1ba1c18619c7bc36eb02 (diff)
downloadhostap-1aef400bf03159d60109ce886943fbd26d88a6c3.zip
hostap-1aef400bf03159d60109ce886943fbd26d88a6c3.tar.gz
hostap-1aef400bf03159d60109ce886943fbd26d88a6c3.tar.bz2
IBSS RSN: Implement disconnect() callback using sta_deauth()
This allows driver wrappers to implement disconnection of IBSS peers in cases operations, e.g., GTK update, fail. Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'wpa_supplicant/ibss_rsn.c')
-rw-r--r--wpa_supplicant/ibss_rsn.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/ibss_rsn.c b/wpa_supplicant/ibss_rsn.c
index 046f181..687c042 100644
--- a/wpa_supplicant/ibss_rsn.c
+++ b/wpa_supplicant/ibss_rsn.c
@@ -296,6 +296,13 @@ static int auth_set_key(void *ctx, int vlan_id, enum wpa_alg alg,
}
+static void ibss_rsn_disconnect(void *ctx, const u8 *addr, u16 reason)
+{
+ struct ibss_rsn *ibss_rsn = ctx;
+ wpa_drv_sta_deauth(ibss_rsn->wpa_s, addr, reason);
+}
+
+
static int auth_for_each_sta(void *ctx, int (*cb)(struct wpa_state_machine *sm,
void *ctx),
void *cb_ctx)
@@ -386,6 +393,7 @@ static int ibss_rsn_auth_init_group(struct ibss_rsn *ibss_rsn,
cb.get_psk = auth_get_psk;
cb.set_key = auth_set_key;
cb.for_each_sta = auth_for_each_sta;
+ cb.disconnect = ibss_rsn_disconnect;
ibss_rsn->auth_group = wpa_init(own_addr, &conf, &cb);
if (ibss_rsn->auth_group == NULL) {