aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2009-02-07 08:30:32 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:38:48 (GMT)
commit2c4e1f79842722ac701baf8d47c6377ba7cd9b60 (patch)
treee37105208217703bb4483f71f233dcfb0d503ab2 /src
parent23c32ba5fe766f36683369a8530a44028c073f9d (diff)
downloadhostap-06-2c4e1f79842722ac701baf8d47c6377ba7cd9b60.zip
hostap-06-2c4e1f79842722ac701baf8d47c6377ba7cd9b60.tar.gz
hostap-06-2c4e1f79842722ac701baf8d47c6377ba7cd9b60.tar.bz2
Fix privsep build with CONFIG_CLIENT_MLME=y
Add wpa_supplicant_sta_free_hw_features() and wpa_supplicant_sta_rx() for driver wrappers in wpa_priv. (cherry picked from commit 96c7c3072de6699dfbafa81c94af511abb49186a)
Diffstat (limited to 'src')
-rw-r--r--src/common/privsep_commands.h3
-rw-r--r--src/drivers/driver_privsep.c23
2 files changed, 24 insertions, 2 deletions
diff --git a/src/common/privsep_commands.h b/src/common/privsep_commands.h
index be94fb8..f8f9c1b 100644
--- a/src/common/privsep_commands.h
+++ b/src/common/privsep_commands.h
@@ -1,6 +1,6 @@
/*
* WPA Supplicant - privilege separation commands
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
*
* 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
@@ -71,6 +71,7 @@ enum privsep_event {
PRIVSEP_EVENT_STKSTART,
PRIVSEP_EVENT_FT_RESPONSE,
PRIVSEP_EVENT_RX_EAPOL,
+ PRIVSEP_EVENT_STA_RX,
};
#endif /* PRIVSEP_COMMANDS_H */
diff --git a/src/drivers/driver_privsep.c b/src/drivers/driver_privsep.c
index e329a74..9156dfb 100644
--- a/src/drivers/driver_privsep.c
+++ b/src/drivers/driver_privsep.c
@@ -1,6 +1,6 @@
/*
* WPA Supplicant - privilege separated driver interface
- * Copyright (c) 2007, Jouni Malinen <j@w1.fi>
+ * Copyright (c) 2007-2009, Jouni Malinen <j@w1.fi>
*
* 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
@@ -443,6 +443,22 @@ static void wpa_driver_privsep_event_rx_eapol(void *ctx, u8 *buf, size_t len)
}
+static void wpa_driver_privsep_event_sta_rx(void *ctx, u8 *buf, size_t len)
+{
+#ifdef CONFIG_CLIENT_MLME
+ struct ieee80211_rx_status *rx_status;
+
+ if (len < sizeof(*rx_status))
+ return;
+ rx_status = (struct ieee80211_rx_status *) buf;
+ buf += sizeof(*rx_status);
+ len -= sizeof(*rx_status);
+
+ wpa_supplicant_sta_rx(ctx, buf, len, rx_status);
+#endif /* CONFIG_CLIENT_MLME */
+}
+
+
static void wpa_driver_privsep_receive(int sock, void *eloop_ctx,
void *sock_ctx)
{
@@ -518,6 +534,11 @@ static void wpa_driver_privsep_receive(int sock, void *eloop_ctx,
case PRIVSEP_EVENT_RX_EAPOL:
wpa_driver_privsep_event_rx_eapol(drv->ctx, event_buf,
event_len);
+ break;
+ case PRIVSEP_EVENT_STA_RX:
+ wpa_driver_privsep_event_sta_rx(drv->ctx, event_buf,
+ event_len);
+ break;
}
os_free(buf);