]> git.pld-linux.org Git - packages/acx.git/blob - acx-2.6.29.patch
- rel 4; with 2.6.30 patch
[packages/acx.git] / acx-2.6.29.patch
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 */
6  static char*
7  acx_s_scan_add_station(
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
9 +       struct iw_request_info *info,
10 +#endif
11         acx_device_t *adev,
12         char *ptr,
13         char *end_buf,
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);
20 +#else
21         ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_ADDR_LEN);
22 +#endif
23  
24         /* Add ESSID */
25         iwe.cmd = SIOCGIWESSID;
26         iwe.u.data.length = bss->essid_len;
27         iwe.u.data.flags = 1;
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);
31 +#else
32         ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
33 +#endif
34  
35         /* Add mode */
36         iwe.cmd = SIOCGIWMODE;
37 @@ -520,7 +531,11 @@ acx_s_scan_add_station(
38                 else
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);
43 +#else
44                 ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_UINT_LEN);
45 +#endif
46         }
47  
48         /* Add frequency */
49 @@ -528,7 +543,11 @@ acx_s_scan_add_station(
50         iwe.u.freq.m = acx_channel_freq[bss->channel - 1] * 100000;
51         iwe.u.freq.e = 1;
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);
55 +#else
56         ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_FREQ_LEN);
57 +#endif
58  
59         /* Add link quality */
60         iwe.cmd = IWEVQUAL;
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);
67 +#else
68         ptr = iwe_stream_add_event(ptr, end_buf, &iwe, IW_EV_QUAL_LEN);
69 +#endif
70  
71         /* Add encryption */
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);
79 +#else
80         ptr = iwe_stream_add_point(ptr, end_buf, &iwe, bss->essid);
81 +#endif
82  
83         /* add rates */
84         iwe.cmd = SIOCGIWRATE;
85 @@ -570,8 +597,13 @@ acx_s_scan_add_station(
86                 if (rate & 1) {
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);
92 +#else
93                         ptr_rate = iwe_stream_add_value(ptr, ptr_rate, end_buf,
94                                                 &iwe, IW_EV_PARAM_LEN);
95 +#endif
96                 }
97                 rate >>= 1;
98                 p++;
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);
106 +#else
107                 ptr = acx_s_scan_add_station(adev, ptr,
108                         extra + IW_SCAN_MAX_DATA, bss);
109 +#endif
110         }
111         dwrq->length = ptr - extra;
112         dwrq->flags = 0;
113 Only in acx-20070101: ioctl.c~
114 Only in acx-20070101: o
This page took 0.543377 seconds and 3 git commands to generate.