1 --- acx-20080210/ioctl.c 2008-02-10 14:06:42.000000000 -0600
2 +++ ioctl.c 2008-11-16 02:08:58.000000000 -0600
4 /* helper. not sure whether it's really a _s_leeping fn */
6 acx_s_scan_add_station(
7 + struct iw_request_info *info,
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);
19 iwe.cmd = SIOCGIWESSID;
20 iwe.u.data.length = bss->essid_len;
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);
27 iwe.cmd = SIOCGIWMODE;
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);
38 iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
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);
44 /* Add link quality */
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);
54 iwe.cmd = SIOCGIWENCODE;
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);
63 iwe.cmd = SIOCGIWRATE;
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);
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);
81 dwrq->length = ptr - extra;