Copy config_methods and device_type configuration for AP mode
[libeap.git] / hostapd / driver_i.h
index 9dc77fd..e5c85a8 100644 (file)
@@ -1,7 +1,6 @@
 /*
  * hostapd - internal driver interface wrappers
  * Copyright (c) 2002-2009, Jouni Malinen <j@w1.fi>
- * Copyright (c) 2007-2008, Intel Corporation
  *
  * 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
@@ -64,12 +63,11 @@ hostapd_driver_deinit(struct hostapd_data *hapd)
 }
 
 static inline int
-hostapd_set_ieee8021x(const char *ifname, struct hostapd_data *hapd,
-                     int enabled)
+hostapd_set_ieee8021x(struct hostapd_data *hapd, struct wpa_bss_params *params)
 {
        if (hapd->driver == NULL || hapd->driver->set_ieee8021x == NULL)
                return 0;
-       return hapd->driver->set_ieee8021x(ifname, hapd->drv_priv, enabled);
+       return hapd->driver->set_ieee8021x(hapd->drv_priv, params);
 }
 
 static inline int
@@ -87,11 +85,11 @@ hostapd_set_key(const char *ifname, struct hostapd_data *hapd,
                int set_tx, const u8 *seq, size_t seq_len,
                const u8 *key, size_t key_len)
 {
-       if (hapd->driver == NULL || hapd->driver->hapd_set_key == NULL)
+       if (hapd->driver == NULL || hapd->driver->set_key == NULL)
                return 0;
-       return hapd->driver->hapd_set_key(ifname, hapd->drv_priv, alg, addr,
-                                         key_idx, set_tx, seq, seq_len, key,
-                                         key_len);
+       return hapd->driver->set_key(ifname, hapd->drv_priv, alg, addr,
+                                    key_idx, set_tx, seq, seq_len, key,
+                                    key_len);
 }
 
 static inline int
@@ -105,16 +103,6 @@ hostapd_get_seqnum(const char *ifname, struct hostapd_data *hapd,
 }
 
 static inline int
-hostapd_get_seqnum_igtk(const char *ifname, struct hostapd_data *hapd,
-                       const u8 *addr, int idx, u8 *seq)
-{
-       if (hapd->driver == NULL || hapd->driver->get_seqnum_igtk == NULL)
-               return -1;
-       return hapd->driver->get_seqnum_igtk(ifname, hapd->drv_priv, addr, idx,
-                                            seq);
-}
-
-static inline int
 hostapd_flush(struct hostapd_data *hapd)
 {
        if (hapd->driver == NULL || hapd->driver->flush == NULL)
@@ -216,8 +204,8 @@ hostapd_set_countermeasures(struct hostapd_data *hapd, int enabled)
 static inline int
 hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
                u16 aid, u16 capability, const u8 *supp_rates,
-               size_t supp_rates_len, int flags, u16 listen_interval,
-               const struct ht_cap_ie *ht_capabilities)
+               size_t supp_rates_len, u16 listen_interval,
+               const struct ieee80211_ht_capabilities *ht_capabilities)
 {
        struct hostapd_sta_add_params params;
 
@@ -232,7 +220,6 @@ hostapd_sta_add(const char *ifname, struct hostapd_data *hapd, const u8 *addr,
        params.capability = capability;
        params.supp_rates = supp_rates;
        params.supp_rates_len = supp_rates_len;
-       params.flags = flags;
        params.listen_interval = listen_interval;
        params.ht_capabilities = ht_capabilities;
        return hapd->driver->sta_add(ifname, hapd->drv_priv, &params);
@@ -331,14 +318,6 @@ hostapd_set_beacon(const char *ifname, struct hostapd_data *hapd,
 }
 
 static inline int
-hostapd_set_internal_bridge(struct hostapd_data *hapd, int value)
-{
-       if (hapd->driver == NULL || hapd->driver->set_internal_bridge == NULL)
-               return 0;
-       return hapd->driver->set_internal_bridge(hapd->drv_priv, value);
-}
-
-static inline int
 hostapd_set_cts_protect(struct hostapd_data *hapd, int value)
 {
        if (hapd->driver == NULL || hapd->driver->set_cts_protect == NULL)
@@ -373,22 +352,6 @@ hostapd_set_tx_queue_params(struct hostapd_data *hapd, int queue, int aifs,
 }
 
 static inline int
-hostapd_bss_add(struct hostapd_data *hapd, const char *ifname, const u8 *bssid)
-{
-       if (hapd->driver == NULL || hapd->driver->bss_add == NULL)
-               return 0;
-       return hapd->driver->bss_add(hapd->drv_priv, ifname, bssid);
-}
-
-static inline int
-hostapd_bss_remove(struct hostapd_data *hapd, const char *ifname)
-{
-       if (hapd->driver == NULL || hapd->driver->bss_remove == NULL)
-               return 0;
-       return hapd->driver->bss_remove(hapd->drv_priv, ifname);
-}
-
-static inline int
 hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
                       const u8 *mask)
 {
@@ -398,31 +361,22 @@ hostapd_valid_bss_mask(struct hostapd_data *hapd, const u8 *addr,
 }
 
 static inline int
-hostapd_if_add(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
-              char *ifname, const u8 *addr)
+hostapd_if_add(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+              const char *ifname, const u8 *addr, void *bss_ctx)
 {
        if (hapd->driver == NULL || hapd->driver->if_add == NULL)
                return -1;
        return hapd->driver->if_add(hapd->conf->iface, hapd->drv_priv, type,
-                                   ifname, addr);
-}
-
-static inline int
-hostapd_if_update(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
-                 char *ifname, const u8 *addr)
-{
-       if (hapd->driver == NULL || hapd->driver->if_update == NULL)
-               return -1;
-       return hapd->driver->if_update(hapd->drv_priv, type, ifname, addr);
+                                   ifname, addr, bss_ctx);
 }
 
 static inline int
-hostapd_if_remove(struct hostapd_data *hapd, enum hostapd_driver_if_type type,
-                 char *ifname, const u8 *addr)
+hostapd_if_remove(struct hostapd_data *hapd, enum wpa_driver_if_type type,
+                 const char *ifname)
 {
        if (hapd->driver == NULL || hapd->driver->if_remove == NULL)
                return -1;
-       return hapd->driver->if_remove(hapd->drv_priv, type, ifname, addr);
+       return hapd->driver->if_remove(hapd->drv_priv, type, ifname);
 }
 
 static inline struct hostapd_hw_modes *
@@ -472,7 +426,6 @@ hostapd_set_radius_acl_expire(struct hostapd_data *hapd, const u8 *mac)
        return hapd->driver->set_radius_acl_expire(hapd->drv_priv, mac);
 }
 
-#ifdef CONFIG_IEEE80211N
 static inline int
 hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd,
                      const u8 *ht_capab, size_t ht_capab_len,
@@ -485,7 +438,6 @@ hostapd_set_ht_params(const char *ifname, struct hostapd_data *hapd,
                ifname, hapd->drv_priv, ht_capab, ht_capab_len,
                ht_oper, ht_oper_len);
 }
-#endif /* CONFIG_IEEE80211N */
 
 static inline int
 hostapd_drv_none(struct hostapd_data *hapd)
@@ -513,13 +465,6 @@ hostapd_set_wps_probe_resp_ie(struct hostapd_data *hapd, const u8 *ie,
                                                   hapd->drv_priv, ie, len);
 }
 
-static inline int hostapd_driver_set_mode(struct hostapd_data *hapd, int mode)
-{
-       if (hapd->driver == NULL || hapd->driver->set_mode == NULL)
-               return 0;
-       return hapd->driver->set_mode(hapd->drv_priv, mode);
-}
-
 static inline int hostapd_driver_scan(struct hostapd_data *hapd,
                                      struct wpa_driver_scan_params *params)
 {