diff options
Diffstat (limited to 'drivers/net/wireless/atmel.c')
-rw-r--r-- | drivers/net/wireless/atmel.c | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 7bb2646ae0ef..28b6ff3eaa37 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c | |||
@@ -2310,30 +2310,40 @@ static int atmel_get_scan(struct net_device *dev, | |||
2310 | iwe.cmd = SIOCGIWAP; | 2310 | iwe.cmd = SIOCGIWAP; |
2311 | iwe.u.ap_addr.sa_family = ARPHRD_ETHER; | 2311 | iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
2312 | memcpy(iwe.u.ap_addr.sa_data, priv->BSSinfo[i].BSSID, 6); | 2312 | memcpy(iwe.u.ap_addr.sa_data, priv->BSSinfo[i].BSSID, 6); |
2313 | current_ev = iwe_stream_add_event(current_ev, extra + IW_SCAN_MAX_DATA, &iwe, IW_EV_ADDR_LEN); | 2313 | current_ev = iwe_stream_add_event(info, current_ev, |
2314 | extra + IW_SCAN_MAX_DATA, | ||
2315 | &iwe, IW_EV_ADDR_LEN); | ||
2314 | 2316 | ||
2315 | iwe.u.data.length = priv->BSSinfo[i].SSIDsize; | 2317 | iwe.u.data.length = priv->BSSinfo[i].SSIDsize; |
2316 | if (iwe.u.data.length > 32) | 2318 | if (iwe.u.data.length > 32) |
2317 | iwe.u.data.length = 32; | 2319 | iwe.u.data.length = 32; |
2318 | iwe.cmd = SIOCGIWESSID; | 2320 | iwe.cmd = SIOCGIWESSID; |
2319 | iwe.u.data.flags = 1; | 2321 | iwe.u.data.flags = 1; |
2320 | current_ev = iwe_stream_add_point(current_ev, extra + IW_SCAN_MAX_DATA, &iwe, priv->BSSinfo[i].SSID); | 2322 | current_ev = iwe_stream_add_point(info, current_ev, |
2323 | extra + IW_SCAN_MAX_DATA, | ||
2324 | &iwe, priv->BSSinfo[i].SSID); | ||
2321 | 2325 | ||
2322 | iwe.cmd = SIOCGIWMODE; | 2326 | iwe.cmd = SIOCGIWMODE; |
2323 | iwe.u.mode = priv->BSSinfo[i].BSStype; | 2327 | iwe.u.mode = priv->BSSinfo[i].BSStype; |
2324 | current_ev = iwe_stream_add_event(current_ev, extra + IW_SCAN_MAX_DATA, &iwe, IW_EV_UINT_LEN); | 2328 | current_ev = iwe_stream_add_event(info, current_ev, |
2329 | extra + IW_SCAN_MAX_DATA, | ||
2330 | &iwe, IW_EV_UINT_LEN); | ||
2325 | 2331 | ||
2326 | iwe.cmd = SIOCGIWFREQ; | 2332 | iwe.cmd = SIOCGIWFREQ; |
2327 | iwe.u.freq.m = priv->BSSinfo[i].channel; | 2333 | iwe.u.freq.m = priv->BSSinfo[i].channel; |
2328 | iwe.u.freq.e = 0; | 2334 | iwe.u.freq.e = 0; |
2329 | current_ev = iwe_stream_add_event(current_ev, extra + IW_SCAN_MAX_DATA, &iwe, IW_EV_FREQ_LEN); | 2335 | current_ev = iwe_stream_add_event(info, current_ev, |
2336 | extra + IW_SCAN_MAX_DATA, | ||
2337 | &iwe, IW_EV_FREQ_LEN); | ||
2330 | 2338 | ||
2331 | /* Add quality statistics */ | 2339 | /* Add quality statistics */ |
2332 | iwe.cmd = IWEVQUAL; | 2340 | iwe.cmd = IWEVQUAL; |
2333 | iwe.u.qual.level = priv->BSSinfo[i].RSSI; | 2341 | iwe.u.qual.level = priv->BSSinfo[i].RSSI; |
2334 | iwe.u.qual.qual = iwe.u.qual.level; | 2342 | iwe.u.qual.qual = iwe.u.qual.level; |
2335 | /* iwe.u.qual.noise = SOMETHING */ | 2343 | /* iwe.u.qual.noise = SOMETHING */ |
2336 | current_ev = iwe_stream_add_event(current_ev, extra + IW_SCAN_MAX_DATA , &iwe, IW_EV_QUAL_LEN); | 2344 | current_ev = iwe_stream_add_event(info, current_ev, |
2345 | extra + IW_SCAN_MAX_DATA, | ||
2346 | &iwe, IW_EV_QUAL_LEN); | ||
2337 | 2347 | ||
2338 | 2348 | ||
2339 | iwe.cmd = SIOCGIWENCODE; | 2349 | iwe.cmd = SIOCGIWENCODE; |
@@ -2342,7 +2352,9 @@ static int atmel_get_scan(struct net_device *dev, | |||
2342 | else | 2352 | else |
2343 | iwe.u.data.flags = IW_ENCODE_DISABLED; | 2353 | iwe.u.data.flags = IW_ENCODE_DISABLED; |
2344 | iwe.u.data.length = 0; | 2354 | iwe.u.data.length = 0; |
2345 | current_ev = iwe_stream_add_point(current_ev, extra + IW_SCAN_MAX_DATA, &iwe, NULL); | 2355 | current_ev = iwe_stream_add_point(info, current_ev, |
2356 | extra + IW_SCAN_MAX_DATA, | ||
2357 | &iwe, NULL); | ||
2346 | } | 2358 | } |
2347 | 2359 | ||
2348 | /* Length of data */ | 2360 | /* Length of data */ |