]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
FT: Add driver wrappers for FT with driver-based MLME/SME
authorShan Palanisamy <Shan.Palanisamy@Atheros.com>
Thu, 29 Sep 2011 21:05:29 +0000 (00:05 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 29 Sep 2011 21:05:29 +0000 (00:05 +0300)
src/ap/ap_drv_ops.c
src/ap/ap_drv_ops.h
src/drivers/driver.h
src/drivers/driver_ndis.c

index 2860b57f57b426501290e679e527867615e3d034..9751b290849b7c090e371b921ba96a3a848288cc 100644 (file)
@@ -332,6 +332,35 @@ int hostapd_set_wds_sta(struct hostapd_data *hapd, const u8 *addr, int aid,
 }
 
 
+int hostapd_add_sta_node(struct hostapd_data *hapd, const u8 *addr,
+                        u16 auth_alg)
+{
+       if (hapd->driver == NULL || hapd->driver->add_sta_node == NULL)
+               return 0;
+       return hapd->driver->add_sta_node(hapd->drv_priv, addr, auth_alg);
+}
+
+
+int hostapd_sta_auth(struct hostapd_data *hapd, const u8 *addr,
+                    u16 seq, u16 status, const u8 *ie, size_t len)
+{
+       if (hapd->driver == NULL || hapd->driver->sta_auth == NULL)
+               return 0;
+       return hapd->driver->sta_auth(hapd->drv_priv, hapd->own_addr, addr,
+                                     seq, status, ie, len);
+}
+
+
+int hostapd_sta_assoc(struct hostapd_data *hapd, const u8 *addr,
+                     int reassoc, u16 status, const u8 *ie, size_t len)
+{
+       if (hapd->driver == NULL || hapd->driver->sta_assoc == NULL)
+               return 0;
+       return hapd->driver->sta_assoc(hapd->drv_priv, hapd->own_addr, addr,
+                                      reassoc, status, ie, len);
+}
+
+
 int hostapd_sta_add(struct hostapd_data *hapd,
                    const u8 *addr, u16 aid, u16 capability,
                    const u8 *supp_rates, size_t supp_rates_len,
@@ -359,6 +388,16 @@ int hostapd_sta_add(struct hostapd_data *hapd,
 }
 
 
+int hostapd_add_tspec(struct hostapd_data *hapd, const u8 *addr,
+                     u8 *tspec_ie, size_t tspec_ielen)
+{
+       if (hapd->driver == NULL || hapd->driver->add_tspec == NULL)
+               return 0;
+       return hapd->driver->add_tspec(hapd->drv_priv, addr, tspec_ie,
+                                      tspec_ielen);
+}
+
+
 int hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
 {
        if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
index 115099d13859e4298895464206917650b4730084..f27069589e3618313427efe9357f758895e7dfcc 100644 (file)
@@ -103,6 +103,14 @@ int hostapd_drv_sta_deauth(struct hostapd_data *hapd,
                           const u8 *addr, int reason);
 int hostapd_drv_sta_disassoc(struct hostapd_data *hapd,
                             const u8 *addr, int reason);
+int hostapd_add_sta_node(struct hostapd_data *hapd, const u8 *addr,
+                        u16 auth_alg);
+int hostapd_sta_auth(struct hostapd_data *hapd, const u8 *addr,
+                    u16 seq, u16 status, const u8 *ie, size_t len);
+int hostapd_sta_assoc(struct hostapd_data *hapd, const u8 *addr,
+                     int reassoc, u16 status, const u8 *ie, size_t len);
+int hostapd_add_tspec(struct hostapd_data *hapd, const u8 *addr,
+                     u8 *tspec_ie, size_t tspec_ielen);
 
 
 #include "drivers/driver.h"
index 1a5fe05ce81b11ab6813543eb7eb734178c6b2ef..f51df4eaee35893271c44bf61fc5b5ebe01475b8 100644 (file)
@@ -2397,6 +2397,65 @@ struct wpa_driver_ops {
         */
        void (*set_rekey_info)(void *priv, const u8 *kek, const u8 *kck,
                               const u8 *replay_ctr);
+
+       /**
+        * sta_assoc - Station association indication
+        * @priv: Private driver interface data
+        * @own_addr: Source address and BSSID for association frame
+        * @addr: MAC address of the station to associate
+        * @reassoc: flag to indicate re-association
+        * @status: association response status code
+        * @ie: assoc response ie buffer
+        * @len: ie buffer length
+        * Returns: 0 on success, -1 on failure
+        *
+        * This function indicates the driver to send (Re)Association
+        * Response frame to the station.
+        */
+        int (*sta_assoc)(void *priv, const u8 *own_addr, const u8 *addr,
+                         int reassoc, u16 status, const u8 *ie, size_t len);
+
+       /**
+        * sta_auth - Station authentication indication
+        * @priv: Private driver interface data
+        * @own_addr: Source address and BSSID for authentication frame
+        * @addr: MAC address of the station to associate
+        * @seq: authentication sequence number
+        * @status: authentication response status code
+        * @ie: authentication frame ie buffer
+        * @len: ie buffer length
+        *
+        * This function indicates the driver to send Authentication frame
+        * to the station.
+        */
+        int (*sta_auth)(void *priv, const u8 *own_addr, const u8 *addr,
+                        u16 seq, u16 status, const u8 *ie, size_t len);
+
+       /**
+        * add_tspec - Add traffic stream
+        * @priv: Private driver interface data
+        * @addr: MAC address of the station to associate
+        * @tspec_ie: tspec ie buffer
+        * @tspec_ielen: tspec ie length
+        * Returns: 0 on success, -1 on failure
+        *
+        * This function adds the traffic steam for the station
+        * and fills the medium_time in tspec_ie.
+        */
+        int (*add_tspec)(void *priv, const u8 *addr, u8 *tspec_ie,
+                         size_t tspec_ielen);
+
+       /**
+        * add_sta_node - Add a station node in the driver
+        * @priv: Private driver interface data
+        * @addr: MAC address of the station to add
+        * @auth_alg: authentication algorithm used by the station
+        * Returns: 0 on success, -1 on failure
+        *
+        * This function adds the station node in the driver, when
+        * the station gets added by FT-over-DS.
+        */
+       int (*add_sta_node)(void *priv, const u8 *addr, u16 auth_alg);
 };
 
 
@@ -3033,7 +3092,9 @@ union wpa_event_data {
         */
        struct auth_info {
                u8 peer[ETH_ALEN];
+               u8 bssid[ETH_ALEN];
                u16 auth_type;
+               u16 auth_transaction;
                u16 status_code;
                const u8 *ies;
                size_t ies_len;
index da39429da7015e0a3ba1a7b4bc0685b221a82a5d..19db3e1ece36737234592ab88c68a51c115e37cb 100644 (file)
@@ -3327,5 +3327,9 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = {
        NULL /* p2p_invite */,
        NULL /* send_tdls_mgmt */,
        NULL /* tdls_oper */,
-       NULL /* signal_poll */
+       NULL /* signal_poll */,
+       NULL /* sta_assoc */,
+       NULL /* sta_auth */,
+       NULL /* add_tspec */,
+       NULL /* add_sta_node */
 };