aboutsummaryrefslogtreecommitdiffstats
path: root/net/ieee80211
diff options
context:
space:
mode:
authorZhu Yi <yi.zhu@intel.com>2006-02-13 00:37:03 -0500
committerJohn W. Linville <linville@tuxdriver.com>2006-02-17 08:16:59 -0500
commit471680828330e6b2aac295cf7ac9d8e5820df2eb (patch)
treeb205c8371e8be20413ac85c71294a1e1b87e0819 /net/ieee80211
parent2c0f63166a5998102ddc7697706af83cbff49317 (diff)
[PATCH] ieee80211: Use IWEVGENIE to set WPA IE
It replaces returning WPA/RSN IEs as custom events with returning them as IWEVGENIE events. I have tested that it returns proper information with both Xsupplicant, and the latest development version of the Linux wireless tools. Signed-off-by: Chris Hessing <Chris.Hessing@utah.edu> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/ieee80211')
-rw-r--r--net/ieee80211/ieee80211_wx.c32
1 files changed, 10 insertions, 22 deletions
diff --git a/net/ieee80211/ieee80211_wx.c b/net/ieee80211/ieee80211_wx.c
index e8c55a4d5834..af7f9bbfd18a 100644
--- a/net/ieee80211/ieee80211_wx.c
+++ b/net/ieee80211/ieee80211_wx.c
@@ -193,33 +193,21 @@ static char *ipw2100_translate_scan(struct ieee80211_device *ieee,
193 if (iwe.u.data.length) 193 if (iwe.u.data.length)
194 start = iwe_stream_add_point(start, stop, &iwe, custom); 194 start = iwe_stream_add_point(start, stop, &iwe, custom);
195 195
196 memset(&iwe, 0, sizeof(iwe));
196 if (network->wpa_ie_len) { 197 if (network->wpa_ie_len) {
197 char buf[MAX_WPA_IE_LEN * 2 + 30]; 198 char buf[MAX_WPA_IE_LEN];
198 199 memcpy(buf, network->wpa_ie, network->wpa_ie_len);
199 u8 *p = buf; 200 iwe.cmd = IWEVGENIE;
200 p += sprintf(p, "wpa_ie="); 201 iwe.u.data.length = network->wpa_ie_len;
201 for (i = 0; i < network->wpa_ie_len; i++) {
202 p += sprintf(p, "%02x", network->wpa_ie[i]);
203 }
204
205 memset(&iwe, 0, sizeof(iwe));
206 iwe.cmd = IWEVCUSTOM;
207 iwe.u.data.length = strlen(buf);
208 start = iwe_stream_add_point(start, stop, &iwe, buf); 202 start = iwe_stream_add_point(start, stop, &iwe, buf);
209 } 203 }
210 204
205 memset(&iwe, 0, sizeof(iwe));
211 if (network->rsn_ie_len) { 206 if (network->rsn_ie_len) {
212 char buf[MAX_WPA_IE_LEN * 2 + 30]; 207 char buf[MAX_WPA_IE_LEN];
213 208 memcpy(buf, network->rsn_ie, network->rsn_ie_len);
214 u8 *p = buf; 209 iwe.cmd = IWEVGENIE;
215 p += sprintf(p, "rsn_ie="); 210 iwe.u.data.length = network->rsn_ie_len;
216 for (i = 0; i < network->rsn_ie_len; i++) {
217 p += sprintf(p, "%02x", network->rsn_ie[i]);
218 }
219
220 memset(&iwe, 0, sizeof(iwe));
221 iwe.cmd = IWEVCUSTOM;
222 iwe.u.data.length = strlen(buf);
223 start = iwe_stream_add_point(start, stop, &iwe, buf); 211 start = iwe_stream_add_point(start, stop, &iwe, buf);
224 } 212 }
225 213