aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wpa_auth_glue.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2012-08-25 09:43:27 (GMT)
committerJouni Malinen <j@w1.fi>2012-08-25 10:47:05 (GMT)
commit3776ac73b28f988db4bbb6c7e61e9ad8b28cd15e (patch)
tree4db1fbb7500e54556a60854378654a241e7f0f3e /src/ap/wpa_auth_glue.c
parent27b80b5b4cfa0f675722545f9e796c508af1eafb (diff)
downloadhostap-3776ac73b28f988db4bbb6c7e61e9ad8b28cd15e.zip
hostap-3776ac73b28f988db4bbb6c7e61e9ad8b28cd15e.tar.gz
hostap-3776ac73b28f988db4bbb6c7e61e9ad8b28cd15e.tar.bz2
Move hostapd global callback functions into hapd_interfaces
These function pointers are going to be the same for each interface so there is no need to keep them in struct hostapd_iface. Moving them to struct hapd_interfaces makes it easier to add interfaces at run time. Signed-hostap: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/ap/wpa_auth_glue.c')
-rw-r--r--src/ap/wpa_auth_glue.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/ap/wpa_auth_glue.c b/src/ap/wpa_auth_glue.c
index edcdf60..bdc89e4 100644
--- a/src/ap/wpa_auth_glue.c
+++ b/src/ap/wpa_auth_glue.c
@@ -303,12 +303,13 @@ static int hostapd_wpa_auth_for_each_auth(
{
struct hostapd_data *hapd = ctx;
struct wpa_auth_iface_iter_data data;
- if (hapd->iface->for_each_interface == NULL)
+ if (hapd->iface->interfaces == NULL ||
+ hapd->iface->interfaces->for_each_interface == NULL)
return -1;
data.cb = cb;
data.cb_ctx = cb_ctx;
- return hapd->iface->for_each_interface(hapd->iface->interfaces,
- wpa_auth_iface_iter, &data);
+ return hapd->iface->interfaces->for_each_interface(
+ hapd->iface->interfaces, wpa_auth_iface_iter, &data);
}
@@ -360,16 +361,17 @@ static int hostapd_wpa_auth_send_ether(void *ctx, const u8 *dst, u16 proto,
int ret;
#ifdef CONFIG_IEEE80211R
- if (proto == ETH_P_RRB && hapd->iface->for_each_interface) {
+ if (proto == ETH_P_RRB && hapd->iface->interfaces &&
+ hapd->iface->interfaces->for_each_interface) {
int res;
struct wpa_auth_ft_iface_iter_data idata;
idata.src_hapd = hapd;
idata.dst = dst;
idata.data = data;
idata.data_len = data_len;
- res = hapd->iface->for_each_interface(hapd->iface->interfaces,
- hostapd_wpa_auth_ft_iter,
- &idata);
+ res = hapd->iface->interfaces->for_each_interface(
+ hapd->iface->interfaces, hostapd_wpa_auth_ft_iter,
+ &idata);
if (res == 1)
return data_len;
}