aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd
diff options
context:
space:
mode:
authorTed Merrill <ted@atheros.com>2008-01-13 02:04:19 (GMT)
committerJouni Malinen <j@w1.fi>2008-01-13 02:04:19 (GMT)
commit519a9cc2cafb6716fc6601dde74d069244a53dc5 (patch)
tree21346bfb9988780a24f97b019958be516f940d1c /hostapd
parent604f4bc124c794f54b253f27e4dcc4603a24f80b (diff)
downloadhostap-history-519a9cc2cafb6716fc6601dde74d069244a53dc5.zip
hostap-history-519a9cc2cafb6716fc6601dde74d069244a53dc5.tar.gz
hostap-history-519a9cc2cafb6716fc6601dde74d069244a53dc5.tar.bz2
madwifi: Enable delivery of Probe Request frames to userspace
(jm: cleaned up version of the patch from Ted)
Diffstat (limited to 'hostapd')
-rw-r--r--hostapd/driver_madwifi.c28
1 files changed, 27 insertions, 1 deletions
diff --git a/hostapd/driver_madwifi.c b/hostapd/driver_madwifi.c
index 08d0b1a..156d1e4 100644
--- a/hostapd/driver_madwifi.c
+++ b/hostapd/driver_madwifi.c
@@ -79,10 +79,16 @@ static int
set80211priv(struct madwifi_driver_data *drv, int op, void *data, int len)
{
struct iwreq iwr;
+ int do_inline = len < IFNAMSIZ;
memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
- if (len < IFNAMSIZ) {
+#ifdef IEEE80211_IOCTL_FILTERFRAME
+ /* FILTERFRAME must be NOT inline, regardless of size. */
+ if (op == IEEE80211_IOCTL_FILTERFRAME)
+ do_inline = 0;
+#endif /* IEEE80211_IOCTL_FILTERFRAME */
+ if (do_inline) {
/*
* Argument data fits inline; put it there.
*/
@@ -720,6 +726,24 @@ madwifi_sta_disassoc(void *priv, const u8 *addr, int reason_code)
return ret;
}
+static int madwifi_receive_probe_req(void *priv)
+{
+ int ret = 0;
+#ifdef CONFIG_WPS
+#ifdef IEEE80211_IOCTL_FILTERFRAME
+ struct ieee80211req_set_filter filt;
+ struct madwifi_driver_data *drv = priv;
+
+ wpa_printf(MSG_DEBUG, "%s Enter", __func__);
+ filt.app_filterype = IEEE80211_FILTER_TYPE_PROBE_REQ;
+
+ ret = set80211priv(drv, IEEE80211_IOCTL_FILTERFRAME, &filt,
+ sizeof(struct ieee80211req_set_filter));
+#endif /* IEEE80211_IOCTL_FILTERFRAME */
+#endif /* CONFIG_WPS */
+ return ret;
+}
+
static int
madwifi_del_sta(struct madwifi_driver_data *drv, u8 addr[IEEE80211_ADDR_LEN])
{
@@ -1295,6 +1319,8 @@ madwifi_init(struct hostapd_data *hapd)
madwifi_set_iface_flags(drv, 0); /* mark down during setup */
madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
+ madwifi_receive_probe_req(drv);
+
return drv;
bad:
if (drv->sock_xmit != NULL)