#include "driver.h"
#include "sha1.h"
#include "eloop.h"
-#include "ieee802_1x.h"
-#include "sta_info.h"
#include "wpa.h"
-#include "accounting.h"
-#include "radius/radius.h"
#include "l2_packet/l2_packet.h"
-#include "ieee802_11.h"
#include "hw_features.h"
#include "wps_hostapd.h"
+#include "ieee802_11_defs.h"
struct test_client_socket {
hdr = (struct ieee80211_hdr *) buf;
fc = le_to_host16(hdr->frame_control);
- ieee802_11_mgmt_cb(drv->hapd, (u8 *) buf, len, WLAN_FC_GET_STYPE(fc),
+ hostapd_mgmt_tx_cb(drv->hapd, (u8 *) buf, len, WLAN_FC_GET_STYPE(fc),
ret >= 0);
return ret;
struct sockaddr_un *from, socklen_t fromlen)
{
struct test_client_socket *cli;
- struct sta_info *sta;
cli = test_driver_get_cli(drv, from, fromlen);
if (!cli)
return;
- hostapd_logger(drv->hapd, cli->addr, HOSTAPD_MODULE_IEEE80211,
- HOSTAPD_LEVEL_INFO, "disassociated");
-
- sta = ap_get_sta(drv->hapd, cli->addr);
- if (sta != NULL) {
- sta->flags &= ~WLAN_STA_ASSOC;
- wpa_auth_sm_event(sta->wpa_sm, WPA_DISASSOC);
- sta->acct_terminate_cause =
- RADIUS_ACCT_TERMINATE_CAUSE_USER_REQUEST;
- ieee802_1x_notify_port_enabled(sta->eapol_sm, 0);
- ap_free_sta(drv->hapd, sta);
- }
+ hostapd_notif_disassoc(drv->hapd, cli->addr);
}
{
struct test_client_socket *cli;
if (datalen > 14) {
- u8 *proto = data + 2 * ETH_ALEN;
/* Skip Ethernet header */
wpa_printf(MSG_DEBUG, "test_driver: dst=" MACSTR " src="
MACSTR " proto=%04x",
MAC2STR(data), MAC2STR(data + ETH_ALEN),
- WPA_GET_BE16(proto));
+ WPA_GET_BE16(data + 2 * ETH_ALEN));
data += 14;
datalen -= 14;
}
hapd = test_driver_get_hapd(drv, cli->bss);
if (hapd == NULL)
return;
- ieee802_1x_receive(hapd, cli->addr, data, datalen);
+ hostapd_eapol_receive(hapd, cli->addr, data, datalen);
} else {
wpa_printf(MSG_DEBUG, "test_socket: EAPOL from unknown "
"client");
__func__);
return;
}
- ieee802_11_mgmt(drv->hapd, data, datalen, WLAN_FC_GET_STYPE(fc), NULL);
+ hostapd_mgmt_rx(drv->hapd, data, datalen, WLAN_FC_GET_STYPE(fc), NULL);
}