aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMasashi Honma <honma@ictec.co.jp>2009-02-05 17:19:19 (GMT)
committerJouni Malinen <j@w1.fi>2009-02-08 10:35:26 (GMT)
commit154d997f7c16a0d54deaaff30148745909171ea1 (patch)
tree05b2b8f4364f444a3fba9d258fc4c03e9bc8814a /src
parent36740bafd19e2f21779480c6d092cccf941a1a3d (diff)
downloadhostap-06-154d997f7c16a0d54deaaff30148745909171ea1.zip
hostap-06-154d997f7c16a0d54deaaff30148745909171ea1.tar.gz
hostap-06-154d997f7c16a0d54deaaff30148745909171ea1.tar.bz2
Setting probe request ie with madwifi driver
The madwifi driver has interface to set probe request ie. Attached patch will enable the functionality. I could see probe request includes WSC IE with this patch. (cherry picked from commit 1e2688be3e1066829d9aa8a9def58a64ba1d0cdf)
Diffstat (limited to 'src')
-rw-r--r--src/drivers/driver_madwifi.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/drivers/driver_madwifi.c b/src/drivers/driver_madwifi.c
index c37cc35..cc6f27e 100644
--- a/src/drivers/driver_madwifi.c
+++ b/src/drivers/driver_madwifi.c
@@ -59,7 +59,8 @@ set80211priv(struct wpa_driver_madwifi_data *drv, int op, void *data, int len,
os_memset(&iwr, 0, sizeof(iwr));
os_strlcpy(iwr.ifr_name, drv->ifname, IFNAMSIZ);
- if (len < IFNAMSIZ) {
+ if (len < IFNAMSIZ &&
+ op != IEEE80211_IOCTL_SET_APPIEBUF) {
/*
* Argument data fits inline; put it there.
*/
@@ -90,7 +91,7 @@ set80211priv(struct wpa_driver_madwifi_data *drv, int op, void *data, int len,
"ioctl[IEEE80211_IOCTL_GETCHANLIST]",
"ioctl[IEEE80211_IOCTL_CHANSWITCH]",
NULL,
- NULL,
+ "ioctl[IEEE80211_IOCTL_SET_APPIEBUF]",
"ioctl[IEEE80211_IOCTL_GETSCANRESULTS]",
NULL,
"ioctl[IEEE80211_IOCTL_GETCHANINFO]",
@@ -482,6 +483,30 @@ static int wpa_driver_madwifi_set_operstate(void *priv, int state)
}
+static int wpa_driver_madwifi_set_probe_req_ie(void *priv, const u8 *ies,
+ size_t ies_len)
+{
+ struct ieee80211req_getset_appiebuf *probe_req_ie;
+ int ret;
+
+ probe_req_ie = os_malloc(sizeof(*probe_req_ie) + ies_len);
+ if (probe_req_ie == NULL)
+ return -1;
+
+ probe_req_ie->app_frmtype = IEEE80211_APPIE_FRAME_PROBE_REQ;
+ probe_req_ie->app_buflen = ies_len;
+ os_memcpy(probe_req_ie->app_buf, ies, ies_len);
+
+ ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
+ sizeof(struct ieee80211req_getset_appiebuf) +
+ ies_len, 1);
+
+ os_free(probe_req_ie);
+
+ return ret;
+}
+
+
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
{
struct wpa_driver_madwifi_data *drv;
@@ -568,4 +593,5 @@ const struct wpa_driver_ops wpa_driver_madwifi_ops = {
.associate = wpa_driver_madwifi_associate,
.set_auth_alg = wpa_driver_madwifi_set_auth_alg,
.set_operstate = wpa_driver_madwifi_set_operstate,
+ .set_probe_req_ie = wpa_driver_madwifi_set_probe_req_ie,
};