1 diff -Nur acx-20080210.orig/ioctl.c acx-20080210/ioctl.c
2 --- acx-20080210.orig/ioctl.c 2008-02-10 21:06:42.000000000 +0100
3 +++ acx-20080210/ioctl.c 2008-10-10 17:07:32.000000000 +0200
6 acx_s_scan_add_station(
8 + struct iw_request_info *info,
13 iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
14 MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
15 acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
16 - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
17 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
20 iwe.cmd = SIOCGIWESSID;
21 iwe.u.data.length = bss->essid_len;
23 log(L_IOCTL, "scan, essid: %s\n", bss->essid);
24 - ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
25 + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
28 iwe.cmd = SIOCGIWMODE;
31 iwe.u.mode = IW_MODE_ADHOC;
32 log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
33 - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
34 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_UINT_LEN);
39 iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
41 log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
42 - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
43 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
45 /* Add link quality */
48 iwe.u.qual.updated = 7;
49 log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
50 iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
51 - ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
52 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
55 iwe.cmd = SIOCGIWENCODE;
57 iwe.u.data.flags = IW_ENCODE_DISABLED;
58 iwe.u.data.length = 0;
59 log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
60 - ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
61 + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
64 iwe.cmd = SIOCGIWRATE;
67 iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
68 log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
69 - ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
70 + ptr_rate = iwe_stream_add_value(info, ptr, ptr_rate, end_buf,
71 &iwe, IW_EV_PARAM_LEN);
75 for (i = 0; i < ARRAY_SIZE(adev->sta_list); i++) {
76 struct client *bss = &adev->sta_list[i];
77 if (!bss->used) continue;
78 - ptr = acx_s_scan_add_station(adev, ptr,
79 + ptr = acx_s_scan_add_station(adev, info, ptr,
80 extra + IW_SCAN_MAX_DATA, bss);
82 dwrq->length = ptr - extra;