Interworking: Add GAS server support for AP mode

This adds GAS/ANQP implementation into hostapd. This commit brings in
the basic GAS/ANQP functionality, but only the ANQP Capability List
element is supported.

For testing purposes, hostapd control interface SET command can be used
to set the gas_frag_limit parameter dynamically.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jay Katabathuni 2012-02-26 22:34:19 +02:00 committed by Jouni Malinen
parent fb80e86e7d
commit dca30c3fb7
10 changed files with 722 additions and 1 deletions

View file

@ -30,6 +30,7 @@
#include "ap_drv_ops.h"
#include "ap_config.h"
#include "p2p_hostapd.h"
#include "gas_serv.h"
static int hostapd_flush_old_stations(struct hostapd_data *hapd);
@ -262,6 +263,10 @@ static void hostapd_free_hapd_data(struct hostapd_data *hapd)
#endif /* CONFIG_P2P */
wpabuf_free(hapd->time_adv);
#ifdef CONFIG_INTERWORKING
gas_serv_deinit(hapd);
#endif /* CONFIG_INTERWORKING */
}
@ -653,6 +658,13 @@ static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
return -1;
}
#ifdef CONFIG_INTERWORKING
if (gas_serv_init(hapd)) {
wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1;
}
#endif /* CONFIG_INTERWORKING */
if (hapd->iface->ctrl_iface_init &&
hapd->iface->ctrl_iface_init(hapd)) {
wpa_printf(MSG_ERROR, "Failed to setup control interface");