hostapd: Call os_program_{init,deinit}()
[libeap.git] / hostapd / beacon.c
index 52f1da1..1f65323 100644 (file)
@@ -2,8 +2,7 @@
  * hostapd / IEEE 802.11 Management: Beacon and Probe Request/Response
  * Copyright (c) 2002-2004, Instant802 Networks, Inc.
  * Copyright (c) 2005-2006, Devicescape Software, Inc.
- * Copyright (c) 2008, Jouni Malinen <j@w1.fi>
- * Copyright (c) 2007-2008, Intel Corporation
+ * Copyright (c) 2008-2009, Jouni Malinen <j@w1.fi>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -19,6 +18,7 @@
 
 #ifndef CONFIG_NATIVE_WINDOWS
 
+#include "common.h"
 #include "hostapd.h"
 #include "ieee802_11.h"
 #include "wpa.h"
@@ -191,13 +191,14 @@ static u8 * hostapd_eid_wpa(struct hostapd_data *hapd, u8 *eid, size_t len,
 }
 
 
-void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
-                     size_t len)
+void handle_probe_req(struct hostapd_data *hapd,
+                     const struct ieee80211_mgmt *mgmt, size_t len)
 {
        struct ieee80211_mgmt *resp;
        struct ieee802_11_elems elems;
        char *ssid;
-       u8 *pos, *epos, *ie;
+       u8 *pos, *epos;
+       const u8 *ie;
        size_t ssid_len, ie_len;
        struct sta_info *sta = NULL;
 
@@ -301,8 +302,10 @@ void handle_probe_req(struct hostapd_data *hapd, struct ieee80211_mgmt *mgmt,
        /* Wi-Fi Alliance WMM */
        pos = hostapd_eid_wmm(hapd, pos);
 
-       pos = hostapd_eid_ht_capabilities_info(hapd, pos);
+#ifdef CONFIG_IEEE80211N
+       pos = hostapd_eid_ht_capabilities(hapd, pos);
        pos = hostapd_eid_ht_operation(hapd, pos);
+#endif /* CONFIG_IEEE80211N */
 
 #ifdef CONFIG_WPS
        if (hapd->conf->wps_state && hapd->wps_probe_resp_ie) {
@@ -402,7 +405,7 @@ void ieee802_11_set_beacon(struct hostapd_data *hapd)
        if (hapd->iconf->ieee80211n) {
                u8 *ht_capab, *ht_oper;
                ht_capab = tailpos;
-               tailpos = hostapd_eid_ht_capabilities_info(hapd, tailpos);
+               tailpos = hostapd_eid_ht_capabilities(hapd, tailpos);
 
                ht_oper = tailpos;
                tailpos = hostapd_eid_ht_operation(hapd, tailpos);