FT: Add driver wrappers for FT with driver-based MLME/SME
This commit is contained in:
parent
24f6497c34
commit
a52eba0f44
4 changed files with 113 additions and 1 deletions
|
@ -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,
|
int hostapd_sta_add(struct hostapd_data *hapd,
|
||||||
const u8 *addr, u16 aid, u16 capability,
|
const u8 *addr, u16 aid, u16 capability,
|
||||||
const u8 *supp_rates, size_t supp_rates_len,
|
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)
|
int hostapd_set_privacy(struct hostapd_data *hapd, int enabled)
|
||||||
{
|
{
|
||||||
if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
|
if (hapd->driver == NULL || hapd->driver->set_privacy == NULL)
|
||||||
|
|
|
@ -103,6 +103,14 @@ int hostapd_drv_sta_deauth(struct hostapd_data *hapd,
|
||||||
const u8 *addr, int reason);
|
const u8 *addr, int reason);
|
||||||
int hostapd_drv_sta_disassoc(struct hostapd_data *hapd,
|
int hostapd_drv_sta_disassoc(struct hostapd_data *hapd,
|
||||||
const u8 *addr, int reason);
|
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"
|
#include "drivers/driver.h"
|
||||||
|
|
|
@ -2397,6 +2397,65 @@ struct wpa_driver_ops {
|
||||||
*/
|
*/
|
||||||
void (*set_rekey_info)(void *priv, const u8 *kek, const u8 *kck,
|
void (*set_rekey_info)(void *priv, const u8 *kek, const u8 *kck,
|
||||||
const u8 *replay_ctr);
|
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 {
|
struct auth_info {
|
||||||
u8 peer[ETH_ALEN];
|
u8 peer[ETH_ALEN];
|
||||||
|
u8 bssid[ETH_ALEN];
|
||||||
u16 auth_type;
|
u16 auth_type;
|
||||||
|
u16 auth_transaction;
|
||||||
u16 status_code;
|
u16 status_code;
|
||||||
const u8 *ies;
|
const u8 *ies;
|
||||||
size_t ies_len;
|
size_t ies_len;
|
||||||
|
|
|
@ -3327,5 +3327,9 @@ const struct wpa_driver_ops wpa_driver_ndis_ops = {
|
||||||
NULL /* p2p_invite */,
|
NULL /* p2p_invite */,
|
||||||
NULL /* send_tdls_mgmt */,
|
NULL /* send_tdls_mgmt */,
|
||||||
NULL /* tdls_oper */,
|
NULL /* tdls_oper */,
|
||||||
NULL /* signal_poll */
|
NULL /* signal_poll */,
|
||||||
|
NULL /* sta_assoc */,
|
||||||
|
NULL /* sta_auth */,
|
||||||
|
NULL /* add_tspec */,
|
||||||
|
NULL /* add_sta_node */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue