Remove the GPL notification from files contributed by Jouni Malinen
[mech_eap.git] / src / ap / ap_drv_ops.c
index 77d4909..d07cc6b 100644 (file)
@@ -2,14 +2,8 @@
  * hostapd - Driver operations
  * Copyright (c) 2009-2010, 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
- * published by the Free Software Foundation.
- *
- * Alternatively, this software may be distributed under the terms of BSD
- * license.
- *
- * See README and COPYING for more details.
+ * This software may be distributed under the terms of the BSD license.
+ * See README for more details.
  */
 
 #include "utils/includes.h"
@@ -47,11 +41,25 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,
                               struct wpabuf **assocresp_ret)
 {
        struct wpabuf *beacon = NULL, *proberesp = NULL, *assocresp = NULL;
-       u8 buf[100], *pos;
+       u8 buf[200], *pos;
 
        *beacon_ret = *proberesp_ret = *assocresp_ret = NULL;
 
        pos = buf;
+       pos = hostapd_eid_time_adv(hapd, pos);
+       if (pos != buf) {
+               if (wpabuf_resize(&beacon, pos - buf) != 0)
+                       goto fail;
+               wpabuf_put_data(beacon, buf, pos - buf);
+       }
+       pos = hostapd_eid_time_zone(hapd, pos);
+       if (pos != buf) {
+               if (wpabuf_resize(&proberesp, pos - buf) != 0)
+                       goto fail;
+               wpabuf_put_data(proberesp, buf, pos - buf);
+       }
+
+       pos = buf;
        pos = hostapd_eid_ext_capab(hapd, pos);
        if (pos != buf) {
                if (wpabuf_resize(&assocresp, pos - buf) != 0)
@@ -59,6 +67,8 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,
                wpabuf_put_data(assocresp, buf, pos - buf);
        }
        pos = hostapd_eid_interworking(hapd, pos);
+       pos = hostapd_eid_adv_proto(hapd, pos);
+       pos = hostapd_eid_roaming_consortium(hapd, pos);
        if (pos != buf) {
                if (wpabuf_resize(&beacon, pos - buf) != 0)
                        goto fail;
@@ -92,10 +102,10 @@ int hostapd_build_ap_extra_ies(struct hostapd_data *hapd,
        }
 
        if (hapd->p2p_probe_resp_ie) {
-               if (wpabuf_resize(&beacon, wpabuf_len(hapd->p2p_probe_resp_ie))
-                   < 0)
+               if (wpabuf_resize(&proberesp,
+                                 wpabuf_len(hapd->p2p_probe_resp_ie)) < 0)
                        goto fail;
-               wpabuf_put_buf(beacon, hapd->p2p_probe_resp_ie);
+               wpabuf_put_buf(proberesp, hapd->p2p_probe_resp_ie);
        }
 #endif /* CONFIG_P2P */
 
@@ -302,7 +312,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
                    const u8 *supp_rates, size_t supp_rates_len,
                    u16 listen_interval,
                    const struct ieee80211_ht_capabilities *ht_capab,
-                   u32 flags)
+                   u32 flags, u8 qosinfo)
 {
        struct hostapd_sta_add_params params;
 
@@ -320,6 +330,7 @@ int hostapd_sta_add(struct hostapd_data *hapd,
        params.listen_interval = listen_interval;
        params.ht_capabilities = ht_capab;
        params.flags = hostapd_sta_flags_to_drv(flags);
+       params.qosinfo = qosinfo;
        return hapd->driver->sta_add(hapd->drv_priv, &params);
 }
 
@@ -459,16 +470,6 @@ int hostapd_sta_set_flags(struct hostapd_data *hapd, u8 *addr,
 }
 
 
-int hostapd_set_rate_sets(struct hostapd_data *hapd, int *supp_rates,
-                         int *basic_rates, int mode)
-{
-       if (hapd->driver == NULL || hapd->driver->set_rate_sets == NULL)
-               return 0;
-       return hapd->driver->set_rate_sets(hapd->drv_priv, supp_rates,
-                                          basic_rates, mode);
-}
-
-
 int hostapd_set_country(struct hostapd_data *hapd, const char *country)
 {
        if (hapd->driver == NULL ||
@@ -488,15 +489,6 @@ int hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
 }
 
 
-int hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
-                          const u8 *mask)
-{
-       if (hapd->driver == NULL || hapd->driver->valid_bss_mask == NULL)
-               return 1;
-       return hapd->driver->valid_bss_mask(hapd->drv_priv, addr, mask);
-}
-
-
 struct hostapd_hw_modes *
 hostapd_get_hw_feature_data(struct hostapd_data *hapd, u16 *num_modes,
                            u16 *flags)
@@ -566,11 +558,11 @@ int hostapd_drv_set_key(const char *ifname, struct hostapd_data *hapd,
 
 
 int hostapd_drv_send_mlme(struct hostapd_data *hapd,
-                         const void *msg, size_t len)
+                         const void *msg, size_t len, int noack)
 {
        if (hapd->driver == NULL || hapd->driver->send_mlme == NULL)
                return 0;
-       return hapd->driver->send_mlme(hapd->drv_priv, msg, len);
+       return hapd->driver->send_mlme(hapd->drv_priv, msg, len, noack);
 }