| 1 | --- a/ioctl.c |
| 2 | +++ b/ioctl.c |
| 3 | @@ -488,6 +488,7 @@ end_unlock: |
| 4 | /* helper. not sure whether it's really a _s_leeping fn */ |
| 5 | static char* |
| 6 | acx_s_scan_add_station( |
| 7 | + struct iw_request_info *info, |
| 8 | acx_device_t *adev, |
| 9 | char *ptr, |
| 10 | char *end_buf, |
| 11 | @@ -503,14 +504,14 @@ acx_s_scan_add_station( |
| 12 | iwe.u.ap_addr.sa_family = ARPHRD_ETHER; |
| 13 | MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid); |
| 14 | acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n"); |
| 15 | - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN); |
| 16 | + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_ADDR_LEN); |
| 17 | |
| 18 | /* Add ESSID */ |
| 19 | iwe.cmd = SIOCGIWESSID; |
| 20 | iwe.u.data.length = bss->essid_len; |
| 21 | iwe.u.data.flags = 1; |
| 22 | log(L_IOCTL, "scan, essid: %s\n", bss->essid); |
| 23 | - ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid); |
| 24 | + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid); |
| 25 | |
| 26 | /* Add mode */ |
| 27 | iwe.cmd = SIOCGIWMODE; |
| 28 | @@ -520,7 +521,7 @@ acx_s_scan_add_station( |
| 29 | else |
| 30 | iwe.u.mode = IW_MODE_ADHOC; |
| 31 | log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode); |
| 32 | - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN); |
| 33 | + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_UINT_LEN); |
| 34 | } |
| 35 | |
| 36 | /* Add frequency */ |
| 37 | @@ -528,7 +529,7 @@ acx_s_scan_add_station( |
| 38 | iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000; |
| 39 | iwe.u.freq.e = 1; |
| 40 | log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m); |
| 41 | - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN); |
| 42 | + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_FREQ_LEN); |
| 43 | |
| 44 | /* Add link quality */ |
| 45 | iwe.cmd = IWEVQUAL; |
| 46 | @@ -546,7 +547,7 @@ acx_s_scan_add_station( |
| 47 | iwe.u.qual.updated = 7; |
| 48 | log(L_IOCTL, "scan, link quality: %d/%d/%d\n", |
| 49 | iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual); |
| 50 | - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN); |
| 51 | + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_QUAL_LEN); |
| 52 | |
| 53 | /* Add encryption */ |
| 54 | iwe.cmd = SIOCGIWENCODE; |
| 55 | @@ -556,7 +557,7 @@ acx_s_scan_add_station( |
| 56 | iwe.u.data.flags = IW_ENCODE_DISABLED; |
| 57 | iwe.u.data.length = 0; |
| 58 | log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags); |
| 59 | - ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid); |
| 60 | + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid); |
| 61 | |
| 62 | /* add rates */ |
| 63 | iwe.cmd = SIOCGIWRATE; |
| 64 | @@ -570,7 +571,7 @@ acx_s_scan_add_station( |
| 65 | if (rate & 1) { |
| 66 | iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */ |
| 67 | log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value); |
| 68 | - ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf, |
| 69 | + ptr_rate = iwe_stream_add_value(info, ptr, ptr_rate, end_buf, |
| 70 | &iwe, IW_EV_PARAM_LEN); |
| 71 | } |
| 72 | rate >>= 1; |
| 73 | @@ -625,7 +626,7 @@ acx_ioctl_get_scan( |
| 74 | for (i = 0; i < ARRAY_SIZE(adev->sta_list); i++) { |
| 75 | struct client *bss = &adev->sta_list[i]; |
| 76 | if (!bss->used) continue; |
| 77 | - ptr = acx_s_scan_add_station(adev, ptr, |
| 78 | + ptr = acx_s_scan_add_station(info, adev, ptr, |
| 79 | extra + IW_SCAN_MAX_DATA, bss); |
| 80 | } |
| 81 | dwrq->length = ptr - extra; |
| 82 | |