1 diff -upr acx-20070101./ioctl.c acx-20070101/ioctl.c
2 --- acx-20070101./ioctl.c 2007-01-09 21:27:58.000000000 +0000
3 +++ acx-20070101/ioctl.c 2009-04-08 20:41:04.767480741 +0000
4 @@ -488,6 +488,9 @@ end_unlock:
5 /* helper. not sure whether it's really a _s_leeping fn */
7 acx_s_scan_add_station(
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
9 + struct iw_request_info *info,
14 @@ -503,14 +506,22 @@ acx_s_scan_add_station(
15 iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
16 MAC_COPY(iwe.u.ap_addr.sa_data, bss->bssid);
17 acxlog_mac(L_IOCTL, "scan, station address: ", bss->bssid, "\n");
18 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
19 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
21 ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
25 iwe.cmd = SIOCGIWESSID;
26 iwe.u.data.length = bss->essid_len;
28 log(L_IOCTL, "scan, essid: %s\n", bss->essid);
29 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
30 + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
32 ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
36 iwe.cmd = SIOCGIWMODE;
37 @@ -520,7 +531,11 @@ acx_s_scan_add_station(
39 iwe.u.mode = IW_MODE_ADHOC;
40 log(L_IOCTL, "scan, mode: %d\n", iwe.u.mode);
41 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
42 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_UINT_LEN);
44 ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
49 @@ -528,7 +543,11 @@ acx_s_scan_add_station(
50 iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
52 log(L_IOCTL, "scan, frequency: %d\n", iwe.u.freq.m);
53 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
54 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
56 ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
59 /* Add link quality */
61 @@ -546,7 +565,11 @@ acx_s_scan_add_station(
62 iwe.u.qual.updated = 7;
63 log(L_IOCTL, "scan, link quality: %d/%d/%d\n",
64 iwe.u.qual.level, iwe.u.qual.noise, iwe.u.qual.qual);
65 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
66 + ptr = iwe_stream_add_event(info, ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
68 ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
72 iwe.cmd = SIOCGIWENCODE;
73 @@ -556,7 +579,11 @@ acx_s_scan_add_station(
74 iwe.u.data.flags = IW_ENCODE_DISABLED;
75 iwe.u.data.length = 0;
76 log(L_IOCTL, "scan, encryption flags: %X\n", iwe.u.data.flags);
77 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
78 + ptr = iwe_stream_add_point(info, ptr, end_buf, &iwe, bss->essid);
80 ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
84 iwe.cmd = SIOCGIWRATE;
85 @@ -570,8 +597,13 @@ acx_s_scan_add_station(
87 iwe.u.bitrate.value = *p * 500000; /* units of 500kb/s */
88 log(L_IOCTL, "scan, rate: %d\n", iwe.u.bitrate.value);
89 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
90 + ptr_rate = iwe_stream_add_value(info, ptr, ptr_rate, end_buf,
91 + &iwe, IW_EV_PARAM_LEN);
93 ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
94 &iwe, IW_EV_PARAM_LEN);
99 @@ -625,8 +657,13 @@ acx_ioctl_get_scan(
100 for (i = 0; i < VEC_SIZE(adev->sta_list); i++) {
101 struct client *bss = &adev->sta_list[i];
102 if (!bss->used) continue;
103 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
104 + ptr = acx_s_scan_add_station(info, adev, ptr,
105 + extra + IW_SCAN_MAX_DATA, bss);
107 ptr = acx_s_scan_add_station(adev, ptr,
108 extra + IW_SCAN_MAX_DATA, bss);
111 dwrq->length = ptr - extra;
113 Only in acx-20070101: ioctl.c~
114 Only in acx-20070101: o