aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2009-02-18 10:49:25 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-18 10:49:25 (GMT)
commitd173df5232b420e8e41d3fbd9750f34f75daa758 (patch)
tree81962e23d58d3c16772bff1e41a220e141123a9c /src
parent8807377fe4846533af65f7706c1f901828d8e952 (diff)
downloadhostap-d173df5232b420e8e41d3fbd9750f34f75daa758.zip
hostap-d173df5232b420e8e41d3fbd9750f34f75daa758.tar.gz
hostap-d173df5232b420e8e41d3fbd9750f34f75daa758.tar.bz2
nl80211: Use per-scan request WPS IE
Replace the global set probe request IEs mechanism with a new nl80211 option for specifying vendor IEs for each scan request.
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_nl80211.c42
1 files changed, 8 insertions, 34 deletions
diff --git a/src/drivers/driver_nl80211.c b/src/drivers/driver_nl80211.c
index 0650979..b75c10e 100644
--- a/src/drivers/driver_nl80211.c
+++ b/src/drivers/driver_nl80211.c
@@ -1120,36 +1120,6 @@ nla_put_failure:
}
-static int wpa_driver_nl80211_set_probe_req_ie(void *priv, const u8 *ies,
- size_t ies_len)
-{
- struct wpa_driver_nl80211_data *drv = priv;
- struct nl_msg *msg;
- int ret = -1;
-
- msg = nlmsg_alloc();
- if (!msg)
- return -ENOMEM;
-
- genlmsg_put(msg, 0, 0, genl_family_get_id(drv->nl80211), 0, 0,
- NL80211_CMD_SET_MGMT_EXTRA_IE, 0);
-
- NLA_PUT_U8(msg, NL80211_ATTR_MGMT_SUBTYPE, 4 /* ProbeReq */);
- if (ies)
- NLA_PUT(msg, NL80211_ATTR_IE, ies_len, ies);
-
- ret = 0;
-
- NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, drv->ifindex);
-
- ret = send_and_recv_msgs(drv, msg, NULL, NULL);
- return ret;
-
-nla_put_failure:
- return -ENOBUFS;
-}
-
-
#ifdef CONFIG_CLIENT_MLME
static int nl80211_set_vif(struct wpa_driver_nl80211_data *drv,
@@ -1714,6 +1684,11 @@ static int wpa_driver_nl80211_scan(void *priv,
if (params->num_ssids)
nla_put_nested(msg, NL80211_ATTR_SCAN_SSIDS, ssids);
+ if (params->extra_ies) {
+ NLA_PUT(msg, NL80211_ATTR_IE, params->extra_ies_len,
+ params->extra_ies);
+ }
+
ret = send_and_recv_msgs(drv, msg, NULL, NULL);
msg = NULL;
if (ret) {
@@ -1727,9 +1702,9 @@ static int wpa_driver_nl80211_scan(void *priv,
timeout = 10;
if (drv->scan_complete_events) {
/*
- * The driver seems to deliver SIOCGIWSCAN events to notify
- * when scan is complete, so use longer timeout to avoid race
- * conditions with scanning and following association request.
+ * The driver seems to deliver events to notify when scan is
+ * complete, so use longer timeout to avoid race conditions
+ * with scanning and following association request.
*/
timeout = 30;
}
@@ -2804,7 +2779,6 @@ const struct wpa_driver_ops wpa_driver_nl80211_ops = {
.get_capa = wpa_driver_nl80211_get_capa,
.set_operstate = wpa_driver_nl80211_set_operstate,
.set_country = wpa_driver_nl80211_set_country,
- .set_probe_req_ie = wpa_driver_nl80211_set_probe_req_ie,
#ifdef CONFIG_CLIENT_MLME
.get_hw_feature_data = wpa_driver_nl80211_get_hw_feature_data,
.set_channel = wpa_driver_nl80211_set_channel,