aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-04-03 16:37:21 (GMT)
committerJouni Malinen <j@w1.fi>2010-04-04 05:14:14 (GMT)
commit0823031750afbf4ea087a86d73c095fb99ea4d0c (patch)
tree1502e7b58755c10b0226ac01d0761bac6f2e4c4b
parentade07077ece86513da28b88011e3a4e203c2456b (diff)
downloadhostap-0823031750afbf4ea087a86d73c095fb99ea4d0c.zip
hostap-0823031750afbf4ea087a86d73c095fb99ea4d0c.tar.gz
hostap-0823031750afbf4ea087a86d73c095fb99ea4d0c.tar.bz2
Fix Windows compilation issues with AP mode code
-rw-r--r--src/ap/ap_config.h2
-rw-r--r--src/ap/ieee802_11_auth.c4
-rw-r--r--src/ap/sta_info.c2
-rw-r--r--src/ap/wpa_auth.c4
-rw-r--r--src/eap_server/eap_server_wsc.c18
5 files changed, 12 insertions, 18 deletions
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index 3ddec9d..ce3085f 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -234,7 +234,9 @@ struct hostapd_bss_config {
#endif /* CONFIG_IEEE80211R */
char *ctrl_interface; /* directory for UNIX domain sockets */
+#ifndef CONFIG_NATIVE_WINDOWS
gid_t ctrl_interface_gid;
+#endif /* CONFIG_NATIVE_WINDOWS */
int ctrl_interface_gid_set;
char *ca_cert;
diff --git a/src/ap/ieee802_11_auth.c b/src/ap/ieee802_11_auth.c
index a3b4fdc..dec56d1 100644
--- a/src/ap/ieee802_11_auth.c
+++ b/src/ap/ieee802_11_auth.c
@@ -19,8 +19,6 @@
#include "utils/includes.h"
-#ifndef CONFIG_NATIVE_WINDOWS
-
#include "utils/common.h"
#include "utils/eloop.h"
#include "radius/radius.h"
@@ -524,5 +522,3 @@ void hostapd_acl_deinit(struct hostapd_data *hapd)
hostapd_acl_query_free(prev);
}
}
-
-#endif /* CONFIG_NATIVE_WINDOWS */
diff --git a/src/ap/sta_info.c b/src/ap/sta_info.c
index 7ac5d50..b410a7b 100644
--- a/src/ap/sta_info.c
+++ b/src/ap/sta_info.c
@@ -288,6 +288,7 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
if (sta->timeout_next == STA_NULLFUNC &&
(sta->flags & WLAN_STA_ASSOC)) {
+#ifndef CONFIG_NATIVE_WINDOWS
/* send data frame to poll STA and check whether this frame
* is ACKed */
struct ieee80211_hdr hdr;
@@ -295,7 +296,6 @@ void ap_handle_timer(void *eloop_ctx, void *timeout_ctx)
wpa_printf(MSG_DEBUG, " Polling STA with data frame");
sta->flags |= WLAN_STA_PENDING_POLL;
-#ifndef CONFIG_NATIVE_WINDOWS
os_memset(&hdr, 0, sizeof(hdr));
if (hapd->driver &&
os_strcmp(hapd->driver->name, "hostap") == 0) {
diff --git a/src/ap/wpa_auth.c b/src/ap/wpa_auth.c
index 12290dd..7e32051 100644
--- a/src/ap/wpa_auth.c
+++ b/src/ap/wpa_auth.c
@@ -14,8 +14,6 @@
#include "utils/includes.h"
-#ifndef CONFIG_NATIVE_WINDOWS
-
#include "utils/common.h"
#include "utils/eloop.h"
#include "utils/state_machine.h"
@@ -2480,5 +2478,3 @@ int wpa_auth_sta_set_vlan(struct wpa_state_machine *sm, int vlan_id)
sm->group = group;
return 0;
}
-
-#endif /* CONFIG_NATIVE_WINDOWS */
diff --git a/src/eap_server/eap_server_wsc.c b/src/eap_server/eap_server_wsc.c
index 0345cdc..b6c0df4 100644
--- a/src/eap_server/eap_server_wsc.c
+++ b/src/eap_server/eap_server_wsc.c
@@ -22,7 +22,7 @@
struct eap_wsc_data {
- enum { START, MSG, FRAG_ACK, WAIT_FRAG_ACK, DONE, FAIL } state;
+ enum { START, MESG, FRAG_ACK, WAIT_FRAG_ACK, DONE, FAIL } state;
int registrar;
struct wpabuf *in_buf;
struct wpabuf *out_buf;
@@ -40,8 +40,8 @@ static const char * eap_wsc_state_txt(int state)
switch (state) {
case START:
return "START";
- case MSG:
- return "MSG";
+ case MESG:
+ return "MESG";
case FRAG_ACK:
return "FRAG_ACK";
case WAIT_FRAG_ACK:
@@ -104,7 +104,7 @@ static void * eap_wsc_init(struct eap_sm *sm)
data = os_zalloc(sizeof(*data));
if (data == NULL)
return NULL;
- data->state = registrar ? START : MSG;
+ data->state = registrar ? START : MESG;
data->registrar = registrar;
os_memset(&cfg, 0, sizeof(cfg));
@@ -217,7 +217,7 @@ static struct wpabuf * eap_wsc_build_msg(struct eap_wsc_data *data, u8 id)
wpabuf_free(data->out_buf);
data->out_buf = NULL;
data->out_used = 0;
- eap_wsc_state(data, MSG);
+ eap_wsc_state(data, MESG);
} else {
wpa_printf(MSG_DEBUG, "EAP-WSC: Sending out %lu bytes "
"(%lu more to send)", (unsigned long) send_len,
@@ -237,7 +237,7 @@ static struct wpabuf * eap_wsc_buildReq(struct eap_sm *sm, void *priv, u8 id)
switch (data->state) {
case START:
return eap_wsc_build_start(sm, data, id);
- case MSG:
+ case MESG:
if (data->out_buf == NULL) {
data->out_buf = wps_get_msg(data->wps,
&data->out_op_code);
@@ -390,7 +390,7 @@ static void eap_wsc_process(struct eap_sm *sm, void *priv,
return;
}
wpa_printf(MSG_DEBUG, "EAP-WSC: Fragment acknowledged");
- eap_wsc_state(data, MSG);
+ eap_wsc_state(data, MESG);
return;
}
@@ -432,14 +432,14 @@ static void eap_wsc_process(struct eap_sm *sm, void *priv,
eap_wsc_state(data, FAIL);
break;
case WPS_CONTINUE:
- eap_wsc_state(data, MSG);
+ eap_wsc_state(data, MESG);
break;
case WPS_FAILURE:
wpa_printf(MSG_DEBUG, "EAP-WSC: WPS processing failed");
eap_wsc_state(data, FAIL);
break;
case WPS_PENDING:
- eap_wsc_state(data, MSG);
+ eap_wsc_state(data, MESG);
sm->method_pending = METHOD_PENDING_WAIT;
eloop_cancel_timeout(eap_wsc_ext_reg_timeout, sm, data);
eloop_register_timeout(5, 0, eap_wsc_ext_reg_timeout,