aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-12-13 19:17:11 (GMT)
committerJouni Malinen <j@w1.fi>2009-12-13 19:17:11 (GMT)
commit1cd973d5015bfe97c2752b3d2fff7765b6cc350c (patch)
tree1e108077abac461b760ecf79f8a5505355682344 /src
parentac7043f265f57264a53ae63a5350f0368dab5a7e (diff)
downloadhostap-1cd973d5015bfe97c2752b3d2fff7765b6cc350c.zip
hostap-1cd973d5015bfe97c2752b3d2fff7765b6cc350c.tar.gz
hostap-1cd973d5015bfe97c2752b3d2fff7765b6cc350c.tar.bz2
Replace hostapd_michael_mic_failure() with generic driver event
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver.h1
-rw-r--r--src/drivers/driver_atheros.c7
-rw-r--r--src/drivers/driver_bsd.c8
-rw-r--r--src/drivers/driver_hostap.c7
-rw-r--r--src/drivers/driver_madwifi.c7
5 files changed, 24 insertions, 6 deletions
diff --git a/src/drivers/driver.h b/src/drivers/driver.h
index f1b86a6..228ce6b 100644
--- a/src/drivers/driver.h
+++ b/src/drivers/driver.h
@@ -1969,7 +1969,6 @@ void hostapd_mgmt_rx(struct hostapd_data *hapd, u8 *buf, size_t len,
u16 stype, struct hostapd_frame_info *fi);
void hostapd_mgmt_tx_cb(struct hostapd_data *hapd, u8 *buf, size_t len,
u16 stype, int ok);
-void hostapd_michael_mic_failure(struct hostapd_data *hapd, const u8 *addr);
struct hostapd_data * hostapd_sta_get_bss(struct hostapd_data *hapd,
const u8 *addr);
void hostapd_probe_req_rx(struct hostapd_data *hapd, const u8 *sa,
diff --git a/src/drivers/driver_atheros.c b/src/drivers/driver_atheros.c
index 0db58e2..8759b01 100644
--- a/src/drivers/driver_atheros.c
+++ b/src/drivers/driver_atheros.c
@@ -807,7 +807,12 @@ madwifi_wireless_event_wireless_custom(struct madwifi_driver_data *drv,
}
pos += 5;
if (hwaddr_aton(pos, addr) == 0) {
- hostapd_michael_mic_failure(drv->hapd, addr);
+ union wpa_event_data data;
+ os_memset(&data, 0, sizeof(data));
+ data.michael_mic_failure.unicast = 1;
+ data.michael_mic_failure.src = addr;
+ wpa_supplicant_event(drv->hapd,
+ EVENT_MICHAEL_MIC_FAILURE, &data);
} else {
wpa_printf(MSG_DEBUG,
"MLME-MICHAELMICFAILURE.indication "
diff --git a/src/drivers/driver_bsd.c b/src/drivers/driver_bsd.c
index aa523d6..c3cbd09 100644
--- a/src/drivers/driver_bsd.c
+++ b/src/drivers/driver_bsd.c
@@ -601,7 +601,6 @@ static void
bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
{
struct bsd_driver_data *drv = ctx;
- struct hostapd_data *hapd = drv->hapd;
char buf[2048];
struct if_announcemsghdr *ifan;
struct rt_msghdr *rtm;
@@ -609,6 +608,7 @@ bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
struct ieee80211_join_event *join;
struct ieee80211_leave_event *leave;
int n;
+ union wpa_event_data data;
n = read(sock, buf, sizeof(buf));
if (n < 0) {
@@ -652,7 +652,11 @@ bsd_wireless_event_receive(int sock, void *ctx, void *sock_ctx)
"Michael MIC failure wireless event: "
"keyix=%u src_addr=" MACSTR, mic->iev_keyix,
MAC2STR(mic->iev_src));
- hostapd_michael_mic_failure(hapd, mic->iev_src);
+ os_memset(&data, 0, sizeof(data));
+ data.michael_mic_failure.unicast = 1;
+ data.michael_mic_failure.src = mic->iev_src;
+ wpa_supplicant_event(drv->hapd,
+ EVENT_MICHAEL_MIC_FAILURE, &data);
break;
}
break;
diff --git a/src/drivers/driver_hostap.c b/src/drivers/driver_hostap.c
index b49f1df..3e37658 100644
--- a/src/drivers/driver_hostap.c
+++ b/src/drivers/driver_hostap.c
@@ -846,7 +846,12 @@ hostapd_wireless_event_wireless_custom(struct hostap_driver_data *drv,
}
pos += 5;
if (hwaddr_aton(pos, addr) == 0) {
- hostapd_michael_mic_failure(drv->hapd, addr);
+ union wpa_event_data data;
+ os_memset(&data, 0, sizeof(data));
+ data.michael_mic_failure.unicast = 1;
+ data.michael_mic_failure.src = addr;
+ wpa_supplicant_event(drv->hapd,
+ EVENT_MICHAEL_MIC_FAILURE, &data);
} else {
wpa_printf(MSG_DEBUG,
"MLME-MICHAELMICFAILURE.indication "
diff --git a/src/drivers/driver_madwifi.c b/src/drivers/driver_madwifi.c
index 3dc46ec..f1c1474 100644
--- a/src/drivers/driver_madwifi.c
+++ b/src/drivers/driver_madwifi.c
@@ -908,7 +908,12 @@ madwifi_wireless_event_wireless_custom(struct madwifi_driver_data *drv,
}
pos += 5;
if (hwaddr_aton(pos, addr) == 0) {
- hostapd_michael_mic_failure(drv->hapd, addr);
+ union wpa_event_data data;
+ os_memset(&data, 0, sizeof(data));
+ data.michael_mic_failure.unicast = 1;
+ data.michael_mic_failure.src = addr;
+ wpa_supplicant_event(drv->hapd,
+ EVENT_MICHAEL_MIC_FAILURE, &data);
} else {
wpa_printf(MSG_DEBUG,
"MLME-MICHAELMICFAILURE.indication "