Remove user space client MLME

This code was used only with driver_test.c to allow MLME operations
in hostapd to be tested without having to use a real radio. There
are no plans on extending this to any other use than testing and
mac80211_hwsim has now obsoled the need for this type of testing.
As such, we can drop this code from wpa_supplicant to clean up the
implementation of unnecessary complexity.
This commit is contained in:
Jouni Malinen 2011-10-22 22:45:38 +03:00
parent 745e8aba69
commit 17fbb751e1
14 changed files with 21 additions and 3552 deletions

View file

@ -698,7 +698,7 @@ struct wpa_driver_capa {
#define WPA_DRIVER_FLAGS_DRIVER_IE 0x00000001
/* Driver needs static WEP key setup after association command */
#define WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC 0x00000002
#define WPA_DRIVER_FLAGS_USER_SPACE_MLME 0x00000004
/* unused: 0x00000004 */
/* Driver takes care of RSN 4-way handshake internally; PMK is configured with
* struct wpa_driver_ops::set_key using alg = WPA_ALG_PMK */
#define WPA_DRIVER_FLAGS_4WAY_HANDSHAKE 0x00000008
@ -1307,9 +1307,6 @@ struct wpa_driver_ops {
* @data: IEEE 802.11 management frame with IEEE 802.11 header
* @data_len: Size of the management frame
* Returns: 0 on success, -1 on failure
*
* This function is only needed for drivers that export MLME
* (management frame processing) to wpa_supplicant.
*/
int (*send_mlme)(void *priv, const u8 *data, size_t data_len);

View file

@ -89,7 +89,6 @@ struct wpa_driver_test_data {
int use_associnfo;
u8 assoc_wpa_ie[80];
size_t assoc_wpa_ie_len;
int use_mlme;
int associated;
u8 *probe_req_ie;
size_t probe_req_ie_len;
@ -2394,13 +2393,6 @@ static int wpa_driver_test_set_param(void *priv, const char *param)
drv->use_associnfo = 1;
}
#ifdef CONFIG_CLIENT_MLME
if (os_strstr(param, "use_mlme=1")) {
wpa_printf(MSG_DEBUG, "test_driver: Use internal MLME");
drv->use_mlme = 1;
}
#endif /* CONFIG_CLIENT_MLME */
if (os_strstr(param, "p2p_mgmt=1")) {
wpa_printf(MSG_DEBUG, "test_driver: Use internal P2P "
"management");
@ -2514,8 +2506,6 @@ static int wpa_driver_test_get_capa(void *priv, struct wpa_driver_capa *capa)
capa->auth = WPA_DRIVER_AUTH_OPEN |
WPA_DRIVER_AUTH_SHARED |
WPA_DRIVER_AUTH_LEAP;
if (drv->use_mlme)
capa->flags |= WPA_DRIVER_FLAGS_USER_SPACE_MLME;
if (drv->p2p)
capa->flags |= WPA_DRIVER_FLAGS_P2P_MGMT;
capa->flags |= WPA_DRIVER_FLAGS_AP;

View file

@ -1259,12 +1259,6 @@ OBJS += sme.c
L_CFLAGS += -DCONFIG_SME
endif
ifdef CONFIG_CLIENT_MLME
OBJS += mlme.c
L_CFLAGS += -DCONFIG_CLIENT_MLME
NEED_80211_COMMON=y
endif
ifdef NEED_80211_COMMON
OBJS += src/common/ieee802_11_common.c
endif
@ -1329,7 +1323,7 @@ OBJS += offchannel.c
L_CFLAGS += -DCONFIG_OFFCHANNEL
endif
OBJS_wpa_rm := ctrl_iface.c mlme.c ctrl_iface_unix.c
OBJS_wpa_rm := ctrl_iface.c ctrl_iface_unix.c
OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.c
ifdef CONFIG_AUTHENTICATOR
OBJS_wpa += tests/link_test.c

View file

@ -1234,12 +1234,6 @@ OBJS += sme.o
CFLAGS += -DCONFIG_SME
endif
ifdef CONFIG_CLIENT_MLME
OBJS += mlme.o
CFLAGS += -DCONFIG_CLIENT_MLME
NEED_80211_COMMON=y
endif
ifdef NEED_80211_COMMON
OBJS += ../src/common/ieee802_11_common.o
endif
@ -1304,7 +1298,7 @@ OBJS += offchannel.o
CFLAGS += -DCONFIG_OFFCHANNEL
endif
OBJS_wpa_rm := ctrl_iface.o mlme.o ctrl_iface_unix.o
OBJS_wpa_rm := ctrl_iface.o ctrl_iface_unix.o
OBJS_wpa := $(filter-out $(OBJS_wpa_rm),$(OBJS)) $(OBJS_h) tests/test_wpa.o
ifdef CONFIG_AUTHENTICATOR
OBJS_wpa += tests/link_test.o

View file

@ -114,11 +114,6 @@ CONFIG_DRIVER_NL80211=y
# Driver interface for development testing
#CONFIG_DRIVER_TEST=y
# Include client MLME (management frame processing) for test driver
# This can be used to test MLME operations in hostapd with the test interface.
# space.
#CONFIG_CLIENT_MLME=y
# Driver interface for wired Ethernet drivers
CONFIG_DRIVER_WIRED=y

View file

@ -43,7 +43,6 @@
#include "bgscan.h"
#include "ap.h"
#include "bss.h"
#include "mlme.h"
#include "scan.h"
#include "offchannel.h"
@ -1248,11 +1247,8 @@ static void wpa_supplicant_event_assoc(struct wpa_supplicant *wpa_s,
return;
wpa_supplicant_set_state(wpa_s, WPA_ASSOCIATED);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
os_memcpy(bssid, wpa_s->bssid, ETH_ALEN);
if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) ||
(wpa_drv_get_bssid(wpa_s, bssid) >= 0 &&
os_memcmp(bssid, wpa_s->bssid, ETH_ALEN) != 0)) {
if (wpa_drv_get_bssid(wpa_s, bssid) >= 0 &&
os_memcmp(bssid, wpa_s->bssid, ETH_ALEN) != 0) {
wpa_dbg(wpa_s, MSG_DEBUG, "Associated to a new BSS: BSSID="
MACSTR, MAC2STR(bssid));
random_add_randomness(bssid, ETH_ALEN);
@ -2217,18 +2213,6 @@ void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
data->p2p_sd_resp.tlvs_len);
break;
#endif /* CONFIG_P2P */
#ifdef CONFIG_CLIENT_MLME
case EVENT_MLME_RX: {
struct ieee80211_rx_status rx_status;
os_memset(&rx_status, 0, sizeof(rx_status));
rx_status.freq = data->mlme_rx.freq;
rx_status.channel = data->mlme_rx.channel;
rx_status.ssi = data->mlme_rx.ssi;
ieee80211_sta_rx(wpa_s, data->mlme_rx.buf, data->mlme_rx.len,
&rx_status);
break;
}
#endif /* CONFIG_CLIENT_MLME */
case EVENT_EAPOL_RX:
wpa_supplicant_rx_eapol(wpa_s, data->eapol_rx.src,
data->eapol_rx.data,

File diff suppressed because it is too large Load diff

View file

@ -1,121 +0,0 @@
/*
* WPA Supplicant - Client mode MLME
* Copyright (c) 2003-2007, Jouni Malinen <j@w1.fi>
* Copyright (c) 2004, Instant802 Networks, Inc.
* Copyright (c) 2005-2006, Devicescape Software, Inc.
*
* 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.
*/
#ifndef MLME_H
#define MLME_H
struct wpa_supplicant;
struct ieee80211_rx_status {
int freq;
int channel;
int ssi;
};
#ifdef CONFIG_CLIENT_MLME
int ieee80211_sta_init(struct wpa_supplicant *wpa_s);
void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s);
int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
struct wpa_driver_scan_params *params);
int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s, u16 reason);
int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s, u16 reason);
int ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
struct wpa_driver_associate_params *params);
int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s, u8 *ssid,
size_t *len);
void ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
struct ieee80211_rx_status *rx_status);
struct wpa_scan_results *
ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s);
int ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
const u8 *ies, size_t ies_len);
int ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
const u8 *target_ap,
const u8 *ies, size_t ies_len);
#else /* CONFIG_CLIENT_MLME */
static inline int ieee80211_sta_init(struct wpa_supplicant *wpa_s)
{
return 0;
}
static inline void ieee80211_sta_deinit(struct wpa_supplicant *wpa_s)
{
}
static inline int ieee80211_sta_req_scan(struct wpa_supplicant *wpa_s,
struct wpa_driver_scan_params *params)
{
return -1;
}
static inline int ieee80211_sta_deauthenticate(struct wpa_supplicant *wpa_s,
u16 reason)
{
return -1;
}
static inline int ieee80211_sta_disassociate(struct wpa_supplicant *wpa_s,
u16 reason)
{
return -1;
}
static inline int
ieee80211_sta_associate(struct wpa_supplicant *wpa_s,
struct wpa_driver_associate_params *params)
{
return -1;
}
static inline int ieee80211_sta_get_ssid(struct wpa_supplicant *wpa_s,
u8 *ssid, size_t *len)
{
return -1;
}
static inline void
ieee80211_sta_rx(struct wpa_supplicant *wpa_s, const u8 *buf, size_t len,
struct ieee80211_rx_status *rx_status)
{
}
static inline struct wpa_scan_results *
ieee80211_sta_get_scan_results(struct wpa_supplicant *wpa_s)
{
return NULL;
}
static inline int
ieee80211_sta_update_ft_ies(struct wpa_supplicant *wpa_s, const u8 *md,
const u8 *ies, size_t ies_len)
{
return -1;
}
static inline int
ieee80211_sta_send_ft_action(struct wpa_supplicant *wpa_s, u8 action,
const u8 *target_ap,
const u8 *ies, size_t ies_len)
{
return -1;
}
#endif /* CONFIG_CLIENT_MLME */
#endif /* MLME_H */

View file

@ -30,7 +30,6 @@
#include "ap.h"
#include "config_ssid.h"
#include "config.h"
#include "mlme.h"
#include "notify.h"
#include "scan.h"
#include "bss.h"
@ -145,10 +144,7 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq,
}
wpa_s->scan_res_handler = wpas_p2p_scan_res_handler;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ret = ieee80211_sta_req_scan(wpa_s, &params);
else
ret = wpa_drv_scan(wpa_s, &params);
ret = wpa_drv_scan(wpa_s, &params);
wpabuf_free(ies);
@ -159,27 +155,6 @@ static int wpas_p2p_scan(void *ctx, enum p2p_scan_type type, int freq,
}
#ifdef CONFIG_CLIENT_MLME
static void p2p_rx_action_mlme(void *ctx, const u8 *buf, size_t len, int freq)
{
struct wpa_supplicant *wpa_s = ctx;
const struct ieee80211_mgmt *mgmt;
size_t hdr_len;
if (wpa_s->global->p2p == NULL || wpa_s->global->p2p_disabled)
return;
mgmt = (const struct ieee80211_mgmt *) buf;
hdr_len = (const u8 *) &mgmt->u.action.u.vs_public_action.action - buf;
if (hdr_len > len)
return;
p2p_rx_action(wpa_s->global->p2p, mgmt->da, mgmt->sa, mgmt->bssid,
mgmt->u.action.category,
&mgmt->u.action.u.vs_public_action.action,
len - hdr_len, freq);
}
#endif /* CONFIG_CLIENT_MLME */
static enum wpa_driver_if_type wpas_p2p_if_type(int p2p_group_interface)
{
switch (p2p_group_interface) {
@ -2159,13 +2134,6 @@ int wpas_p2p_init(struct wpa_global *global, struct wpa_supplicant *wpa_s)
if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_CAPABLE))
return 0;
#ifdef CONFIG_CLIENT_MLME
if (!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_P2P_MGMT)) {
wpa_s->mlme.public_action_cb = p2p_rx_action_mlme;
wpa_s->mlme.public_action_cb_ctx = wpa_s;
}
#endif /* CONFIG_CLIENT_MLME */
if (wpa_drv_disable_11b_rates(wpa_s, 1) < 0) {
wpa_printf(MSG_DEBUG, "P2P: Failed to disable 11b rates");
/* Continue anyway; this is not really a fatal error */
@ -2599,10 +2567,7 @@ static void wpas_p2p_join_scan(void *eloop_ctx, void *timeout_ctx)
* the new scan results become available.
*/
wpa_s->scan_res_handler = wpas_p2p_scan_res_join;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ret = ieee80211_sta_req_scan(wpa_s, &params);
else
ret = wpa_drv_scan(wpa_s, &params);
ret = wpa_drv_scan(wpa_s, &params);
wpabuf_free(ies);

View file

@ -20,7 +20,6 @@
#include "config.h"
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "mlme.h"
#include "wps_supplicant.h"
#include "p2p_supplicant.h"
#include "p2p/p2p.h"
@ -200,11 +199,7 @@ int wpa_supplicant_trigger_scan(struct wpa_supplicant *wpa_s,
wpa_supplicant_notify_scanning(wpa_s, 1);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ret = ieee80211_sta_req_scan(wpa_s, params);
else
ret = wpa_drv_scan(wpa_s, params);
ret = wpa_drv_scan(wpa_s, params);
if (ret) {
wpa_supplicant_notify_scanning(wpa_s, 0);
wpas_notify_scan_done(wpa_s, 0);
@ -246,9 +241,6 @@ wpa_supplicant_start_sched_scan(struct wpa_supplicant *wpa_s,
{
int ret;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return -1;
wpa_supplicant_notify_scanning(wpa_s, 1);
ret = wpa_drv_sched_scan(wpa_s, params, interval * 1000);
if (ret)
@ -478,8 +470,7 @@ static void wpa_supplicant_scan(void *eloop_ctx, void *timeout_ctx)
}
#endif /* CONFIG_P2P */
if ((wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) ||
wpa_s->conf->ap_scan == 2)
if (wpa_s->conf->ap_scan == 2)
max_ssids = 1;
else {
max_ssids = wpa_s->max_scan_ssids;
@ -1100,10 +1091,7 @@ wpa_supplicant_get_scan_results(struct wpa_supplicant *wpa_s,
size_t i;
int (*compar)(const void *, const void *) = wpa_scan_result_compar;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
scan_res = ieee80211_sta_get_scan_results(wpa_s);
else
scan_res = wpa_drv_get_scan_results2(wpa_s);
scan_res = wpa_drv_get_scan_results2(wpa_s);
if (scan_res == NULL) {
wpa_dbg(wpa_s, MSG_DEBUG, "Failed to get scan results");
return NULL;

View file

@ -529,8 +529,7 @@ void sme_event_disassoc(struct wpa_supplicant *wpa_s,
union wpa_event_data *data)
{
wpa_dbg(wpa_s, MSG_DEBUG, "SME: Disassociation event received");
if (wpa_s->sme.prev_bssid_set &&
!(wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)) {
if (wpa_s->sme.prev_bssid_set) {
/*
* cfg80211/mac80211 can get into somewhat confused state if
* the AP only disassociates us and leaves us in authenticated

View file

@ -36,7 +36,6 @@
#include "rsn_supp/preauth.h"
#include "rsn_supp/pmksa_cache.h"
#include "common/wpa_ctrl.h"
#include "mlme.h"
#include "common/ieee802_11_defs.h"
#include "p2p/p2p.h"
#include "blacklist.h"
@ -420,8 +419,6 @@ static void wpa_supplicant_cleanup(struct wpa_supplicant *wpa_s)
wpa_supplicant_cancel_scan(wpa_s);
wpa_supplicant_cancel_auth_timeout(wpa_s);
ieee80211_sta_deinit(wpa_s);
wpas_wps_deinit(wpa_s);
wpabuf_free(wpa_s->pending_eapol_rx);
@ -1405,10 +1402,7 @@ void wpa_supplicant_associate(struct wpa_supplicant *wpa_s,
else
params.uapsd = -1;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ret = ieee80211_sta_associate(wpa_s, &params);
else
ret = wpa_drv_associate(wpa_s, &params);
ret = wpa_drv_associate(wpa_s, &params);
if (ret < 0) {
wpa_msg(wpa_s, MSG_INFO, "Association request to the driver "
"failed");
@ -1514,10 +1508,7 @@ void wpa_supplicant_disassociate(struct wpa_supplicant *wpa_s,
u8 *addr = NULL;
if (!is_zero_ether_addr(wpa_s->bssid)) {
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ieee80211_sta_disassociate(wpa_s, reason_code);
else
wpa_drv_disassociate(wpa_s, wpa_s->bssid, reason_code);
wpa_drv_disassociate(wpa_s, wpa_s->bssid, reason_code);
addr = wpa_s->bssid;
}
@ -1539,11 +1530,7 @@ void wpa_supplicant_deauthenticate(struct wpa_supplicant *wpa_s,
u8 *addr = NULL;
if (!is_zero_ether_addr(wpa_s->bssid)) {
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
ieee80211_sta_deauthenticate(wpa_s, reason_code);
else
wpa_drv_deauthenticate(wpa_s, wpa_s->bssid,
reason_code);
wpa_drv_deauthenticate(wpa_s, wpa_s->bssid, reason_code);
addr = wpa_s->bssid;
}
@ -1834,25 +1821,15 @@ struct wpa_ssid * wpa_supplicant_get_ssid(struct wpa_supplicant *wpa_s)
u8 bssid[ETH_ALEN];
int wired;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
if (ieee80211_sta_get_ssid(wpa_s, ssid, &ssid_len)) {
wpa_msg(wpa_s, MSG_WARNING, "Could not read SSID from "
"MLME");
return NULL;
}
} else {
res = wpa_drv_get_ssid(wpa_s, ssid);
if (res < 0) {
wpa_msg(wpa_s, MSG_WARNING, "Could not read SSID from "
"driver");
return NULL;
}
ssid_len = res;
res = wpa_drv_get_ssid(wpa_s, ssid);
if (res < 0) {
wpa_msg(wpa_s, MSG_WARNING, "Could not read SSID from "
"driver");
return NULL;
}
ssid_len = res;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
os_memcpy(bssid, wpa_s->bssid, ETH_ALEN);
else if (wpa_drv_get_bssid(wpa_s, bssid) < 0) {
if (wpa_drv_get_bssid(wpa_s, bssid) < 0) {
wpa_msg(wpa_s, MSG_WARNING, "Could not read BSSID from "
"driver");
return NULL;
@ -2306,10 +2283,6 @@ next_driver:
if (wpa_drv_get_capa(wpa_s, &capa) == 0) {
wpa_s->drv_flags = capa.flags;
if (capa.flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
if (ieee80211_sta_init(wpa_s))
return -1;
}
wpa_s->max_scan_ssids = capa.max_scan_ssids;
wpa_s->max_sched_scan_ssids = capa.max_sched_scan_ssids;
wpa_s->sched_scan_supported = capa.sched_scan_supported;

View file

@ -228,100 +228,6 @@ struct wpa_global {
};
struct wpa_client_mlme {
#ifdef CONFIG_CLIENT_MLME
enum {
IEEE80211_DISABLED, IEEE80211_AUTHENTICATE,
IEEE80211_ASSOCIATE, IEEE80211_ASSOCIATED,
IEEE80211_IBSS_SEARCH, IEEE80211_IBSS_JOINED
} state;
u8 prev_bssid[ETH_ALEN];
u8 ssid[32];
size_t ssid_len;
u16 aid;
u16 ap_capab, capab;
u8 *extra_ie; /* to be added to the end of AssocReq */
size_t extra_ie_len;
u8 *extra_probe_ie; /* to be added to the end of ProbeReq */
size_t extra_probe_ie_len;
enum wpa_key_mgmt key_mgmt;
/* The last AssocReq/Resp IEs */
u8 *assocreq_ies, *assocresp_ies;
size_t assocreq_ies_len, assocresp_ies_len;
int auth_tries, assoc_tries;
unsigned int ssid_set:1;
unsigned int bssid_set:1;
unsigned int prev_bssid_set:1;
unsigned int authenticated:1;
unsigned int associated:1;
unsigned int probereq_poll:1;
unsigned int use_protection:1;
unsigned int create_ibss:1;
unsigned int mixed_cell:1;
unsigned int wmm_enabled:1;
struct os_time last_probe;
unsigned int auth_algs; /* bitfield of allowed auth algs
* (WPA_AUTH_ALG_*) */
int auth_alg; /* currently used IEEE 802.11 authentication algorithm */
int auth_transaction;
struct os_time ibss_join_req;
u8 *probe_resp; /* ProbeResp template for IBSS */
size_t probe_resp_len;
u32 supp_rates_bits;
int wmm_last_param_set;
int sta_scanning;
int scan_hw_mode_idx;
int scan_channel_idx;
enum { SCAN_SET_CHANNEL, SCAN_SEND_PROBE } scan_state;
struct os_time last_scan_completed;
int scan_oper_channel;
int scan_oper_freq;
int scan_oper_phymode;
u8 scan_ssid[32];
size_t scan_ssid_len;
int scan_skip_11b;
int *scan_freqs;
struct ieee80211_sta_bss *sta_bss_list;
#define STA_HASH_SIZE 256
#define STA_HASH(sta) (sta[5])
struct ieee80211_sta_bss *sta_bss_hash[STA_HASH_SIZE];
int cts_protect_erp_frames;
enum hostapd_hw_mode phymode; /* current mode */
struct hostapd_hw_modes *modes;
size_t num_modes;
unsigned int hw_modes; /* bitfield of allowed hardware modes;
* (1 << HOSTAPD_MODE_*) */
int num_curr_rates;
int *curr_rates;
int freq; /* The current frequency in MHz */
int channel; /* The current IEEE 802.11 channel number */
#ifdef CONFIG_IEEE80211R
u8 current_md[6];
u8 *ft_ies;
size_t ft_ies_len;
#endif /* CONFIG_IEEE80211R */
void (*public_action_cb)(void *ctx, const u8 *buf, size_t len,
int freq);
void *public_action_cb_ctx;
#else /* CONFIG_CLIENT_MLME */
int dummy; /* to keep MSVC happy */
#endif /* CONFIG_CLIENT_MLME */
};
enum offchannel_send_action_result {
OFFCHANNEL_SEND_ACTION_SUCCESS /* Frame was send and acknowledged */,
OFFCHANNEL_SEND_ACTION_NO_ACK /* Frame was sent, but not acknowledged
@ -432,7 +338,6 @@ struct wpa_supplicant {
int *next_scan_freqs;
int scan_interval; /* time in sec between scans to find suitable AP */
struct wpa_client_mlme mlme;
unsigned int drv_flags;
int max_scan_ssids;
int max_sched_scan_ssids;

View file

@ -24,7 +24,6 @@
#include "wpa_supplicant_i.h"
#include "driver_i.h"
#include "rsn_supp/pmksa_cache.h"
#include "mlme.h"
#include "sme.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
@ -438,10 +437,6 @@ static void * wpa_supplicant_get_network_ctx(void *wpa_s)
static int wpa_supplicant_get_bssid(void *ctx, u8 *bssid)
{
struct wpa_supplicant *wpa_s = ctx;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
os_memcpy(bssid, wpa_s->bssid, ETH_ALEN);
return 0;
}
return wpa_drv_get_bssid(wpa_s, bssid);
}
@ -489,8 +484,6 @@ static int wpa_supplicant_update_ft_ies(void *ctx, const u8 *md,
const u8 *ies, size_t ies_len)
{
struct wpa_supplicant *wpa_s = ctx;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return ieee80211_sta_update_ft_ies(wpa_s, md, ies, ies_len);
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_SME)
return sme_update_ft_ies(wpa_s, md, ies, ies_len);
return wpa_drv_update_ft_ies(wpa_s, md, ies, ies_len);
@ -502,9 +495,6 @@ static int wpa_supplicant_send_ft_action(void *ctx, u8 action,
const u8 *ies, size_t ies_len)
{
struct wpa_supplicant *wpa_s = ctx;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return ieee80211_sta_send_ft_action(wpa_s, action, target_ap,
ies, ies_len);
return wpa_drv_send_ft_action(wpa_s, action, target_ap, ies, ies_len);
}
@ -515,9 +505,6 @@ static int wpa_supplicant_mark_authenticated(void *ctx, const u8 *target_ap)
struct wpa_driver_auth_params params;
struct wpa_bss *bss;
if (wpa_s->drv_flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME)
return -1;
bss = wpa_bss_get_bssid(wpa_s, target_ap);
if (bss == NULL)
return -1;