}
+static int hostapd_set_radius_acl_auth(struct hostapd_data *hapd,
+ const u8 *mac, int accepted,
+ u32 session_timeout)
+{
+ if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
+ return 0;
+ return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
+ session_timeout);
+}
+
+
+static int hostapd_set_radius_acl_expire(struct hostapd_data *hapd,
+ const u8 *mac)
+{
+ if (hapd->driver == NULL ||
+ hapd->driver->set_radius_acl_expire == NULL)
+ return 0;
+ return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
+}
+
+
void hostapd_set_driver_ops(struct hostapd_driver_ops *ops)
{
ops->set_ap_wps_ie = hostapd_set_ap_wps_ie;
ops->sta_clear_stats = hostapd_sta_clear_stats;
ops->set_sta_flags = hostapd_set_sta_flags;
ops->set_drv_ieee8021x = hostapd_set_drv_ieee8021x;
+ ops->set_radius_acl_auth = hostapd_set_radius_acl_auth;
+ ops->set_radius_acl_expire = hostapd_set_radius_acl_expire;
}
}
static inline int
-hostapd_set_radius_acl_auth(struct hostapd_data *hapd, const u8 *mac,
- int accepted, u32 session_timeout)
-{
- if (hapd->driver == NULL || hapd->driver->set_radius_acl_auth == NULL)
- return 0;
- return hapd->driver->set_radius_acl_auth(hapd->drv_priv, mac, accepted,
- session_timeout);
-}
-
-static inline int
-hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
-{
- if (hapd->driver == NULL ||
- hapd->driver->set_radius_acl_expire == NULL)
- return 0;
- return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
-}
-
-static inline int
hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd,
const u8 *ht_capab, size_t ht_capab_len,
const u8 *ht_oper, size_t ht_oper_len)
int (*set_sta_flags)(struct hostapd_data *hapd, struct sta_info *sta);
int (*set_drv_ieee8021x)(struct hostapd_data *hapd, const char *ifname,
int enabled);
+ int (*set_radius_acl_auth)(struct hostapd_data *hapd,
+ const u8 *mac, int accepted,
+ u32 session_timeout);
+ int (*set_radius_acl_expire)(struct hostapd_data *hapd,
+ const u8 *mac);
};
/**
#include "radius/radius.h"
#include "radius/radius_client.h"
#include "eloop.h"
-#ifdef CONFIG_DRIVER_RADIUS_ACL
-#include "driver_i.h"
-#endif /* CONFIG_DRIVER_RADIUS_ACL */
#define RADIUS_ACL_TIMEOUT 30
else
hapd->acl_cache = entry->next;
#ifdef CONFIG_DRIVER_RADIUS_ACL
- hostapd_set_radius_acl_expire(hapd, entry->addr);
+ hapd->drv.set_radius_acl_expire(hapd, entry->addr);
#endif /* CONFIG_DRIVER_RADIUS_ACL */
tmp = entry;
entry = entry->next;
hapd->acl_cache = cache;
#ifdef CONFIG_DRIVER_RADIUS_ACL
- hostapd_set_radius_acl_auth(hapd, query->addr, cache->accepted,
- cache->session_timeout);
+ hapd->drv.set_radius_acl_auth(hapd, query->addr, cache->accepted,
+ cache->session_timeout);
#else /* CONFIG_DRIVER_RADIUS_ACL */
#ifdef NEED_AP_MLME
/* Re-send original authentication frame for 802.11 processing */