diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/ieee80211_wx.c | 32 |
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 | ||