aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2010-01-03 16:22:22 (GMT)
committerJouni Malinen <j@w1.fi>2010-01-03 16:22:22 (GMT)
commit1d041bec843d55cd6be7be61ba83ddf96c5e2368 (patch)
tree608ecefa4b3841616c3f14edd28df707ec9c3616 /src/ap
parenta8e0505bf0576ec014149130544a849b3d46e23d (diff)
downloadhostap-1d041bec843d55cd6be7be61ba83ddf96c5e2368.zip
hostap-1d041bec843d55cd6be7be61ba83ddf96c5e2368.tar.gz
hostap-1d041bec843d55cd6be7be61ba83ddf96c5e2368.tar.bz2
Use generic driver event notification for AP mode assoc/disassoc
Diffstat (limited to 'src/ap')
-rw-r--r--src/ap/drv_callbacks.c13
-rw-r--r--src/ap/hostapd.h5
2 files changed, 18 insertions, 0 deletions
diff --git a/src/ap/drv_callbacks.c b/src/ap/drv_callbacks.c
index b03a541..61ca690 100644
--- a/src/ap/drv_callbacks.c
+++ b/src/ap/drv_callbacks.c
@@ -397,6 +397,19 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->eapol_rx.data,
data->eapol_rx.data_len);
break;
+ case EVENT_ASSOC:
+ hostapd_notif_assoc(hapd, data->assoc_info.addr,
+ data->assoc_info.req_ies,
+ data->assoc_info.req_ies_len);
+ break;
+ case EVENT_DISASSOC:
+ if (data)
+ hostapd_notif_disassoc(hapd, data->disassoc_info.addr);
+ break;
+ case EVENT_DEAUTH:
+ if (data)
+ hostapd_notif_disassoc(hapd, data->deauth_info.addr);
+ break;
default:
wpa_printf(MSG_DEBUG, "Unknown event %d", event);
break;
diff --git a/src/ap/hostapd.h b/src/ap/hostapd.h
index 86676ff..7c6b0b7 100644
--- a/src/ap/hostapd.h
+++ b/src/ap/hostapd.h
@@ -260,4 +260,9 @@ int hostapd_register_probereq_cb(struct hostapd_data *hapd,
void *ctx);
void hostapd_prune_associations(struct hostapd_data *hapd, const u8 *addr);
+/* drv_callbacks.c (TODO: move to somewhere else?) */
+int hostapd_notif_assoc(struct hostapd_data *hapd, const u8 *addr,
+ const u8 *ie, size_t ielen);
+void hostapd_notif_disassoc(struct hostapd_data *hapd, const u8 *addr);
+
#endif /* HOSTAPD_H */