1 |
pva 08/10/20 03:11:20 |
2 |
|
3 |
Added: madwifi-ng-0.9.4-2.6.27-r3811.patch |
4 |
Log: |
5 |
Added patch to make it buildable with 2.6.27 kernel. |
6 |
(Portage version: 2.2_rc12/cvs/Linux 2.6.26-openvz.git-777e816 i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.1 net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch?rev=1.1&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-wireless/madwifi-ng/files/madwifi-ng-0.9.4-2.6.27-r3811.patch?rev=1.1&content-type=text/plain |
13 |
|
14 |
Index: madwifi-ng-0.9.4-2.6.27-r3811.patch |
15 |
=================================================================== |
16 |
Index: /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c |
17 |
=================================================================== |
18 |
--- /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c (revision 3080) |
19 |
+++ /madwifi/branches/madwifi-0.9.4/net80211/ieee80211_wireless.c (revision 3811) |
20 |
@@ -1552,4 +1552,5 @@ |
21 |
struct iwscanreq { /* XXX: right place for this declaration? */ |
22 |
struct ieee80211vap *vap; |
23 |
+ struct iw_request_info *info; |
24 |
char *current_ev; |
25 |
char *end_buf; |
26 |
@@ -1557,4 +1558,11 @@ |
27 |
}; |
28 |
|
29 |
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT) |
30 |
+#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e) |
31 |
+#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e) |
32 |
+#define iwe_stream_add_value(a, b, c, d, e, f) \ |
33 |
+ iwe_stream_add_value(b, c, d, e, f) |
34 |
+#define iwe_stream_lcp_len(a) IW_EV_LCP_LEN |
35 |
+#endif |
36 |
static int |
37 |
giwscan_cb(void *arg, const struct ieee80211_scan_entry *se) |
38 |
@@ -1591,5 +1599,6 @@ |
39 |
else |
40 |
IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid); |
41 |
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN); |
42 |
+ current_ev = iwe_stream_add_event(req->info, current_ev, end_buf, |
43 |
+ &iwe, IW_EV_ADDR_LEN); |
44 |
|
45 |
/* We ran out of space in the buffer. */ |
46 |
@@ -1604,9 +1613,9 @@ |
47 |
iwe.u.data.length = vap->iv_des_nssid > 0 ? |
48 |
vap->iv_des_ssid[0].len : 0; |
49 |
- current_ev = iwe_stream_add_point(current_ev, |
50 |
+ current_ev = iwe_stream_add_point(req->info, current_ev, |
51 |
end_buf, &iwe, vap->iv_des_ssid[0].ssid); |
52 |
} else { |
53 |
iwe.u.data.length = se->se_ssid[1]; |
54 |
- current_ev = iwe_stream_add_point(current_ev, |
55 |
+ current_ev = iwe_stream_add_point(req->info, current_ev, |
56 |
end_buf, &iwe, (char *) se->se_ssid+2); |
57 |
} |
58 |
@@ -1622,6 +1631,6 @@ |
59 |
iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ? |
60 |
IW_MODE_MASTER : IW_MODE_ADHOC; |
61 |
- current_ev = iwe_stream_add_event(current_ev, |
62 |
- end_buf, &iwe, IW_EV_UINT_LEN); |
63 |
+ current_ev = iwe_stream_add_event(req->info, current_ev, |
64 |
+ end_buf, &iwe, IW_EV_UINT_LEN); |
65 |
|
66 |
/* We ran out of space in the buffer. */ |
67 |
@@ -1635,6 +1644,6 @@ |
68 |
iwe.u.freq.m = se->se_chan->ic_freq * 100000; |
69 |
iwe.u.freq.e = 1; |
70 |
- current_ev = iwe_stream_add_event(current_ev, |
71 |
- end_buf, &iwe, IW_EV_FREQ_LEN); |
72 |
+ current_ev = iwe_stream_add_event(req->info, current_ev, |
73 |
+ end_buf, &iwe, IW_EV_FREQ_LEN); |
74 |
|
75 |
/* We ran out of space in the buffer. */ |
76 |
@@ -1646,6 +1655,6 @@ |
77 |
iwe.cmd = IWEVQUAL; |
78 |
set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE); |
79 |
- current_ev = iwe_stream_add_event(current_ev, |
80 |
- end_buf, &iwe, IW_EV_QUAL_LEN); |
81 |
+ current_ev = iwe_stream_add_event(req->info, current_ev, |
82 |
+ end_buf, &iwe, IW_EV_QUAL_LEN); |
83 |
|
84 |
/* We ran out of space in the buffer */ |
85 |
@@ -1661,5 +1670,6 @@ |
86 |
iwe.u.data.flags = IW_ENCODE_DISABLED; |
87 |
iwe.u.data.length = 0; |
88 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, ""); |
89 |
+ current_ev = iwe_stream_add_point(req->info, current_ev, |
90 |
+ end_buf, &iwe, ""); |
91 |
|
92 |
/* We ran out of space in the buffer. */ |
93 |
@@ -1670,5 +1680,5 @@ |
94 |
last_ev = current_ev; |
95 |
iwe.cmd = SIOCGIWRATE; |
96 |
- current_val = current_ev + IW_EV_LCP_LEN; |
97 |
+ current_val = current_ev + iwe_stream_lcp_len(req->info); |
98 |
/* NB: not sorted, does it matter? */ |
99 |
for (j = 0; j < se->se_rates[1]; j++) { |
100 |
@@ -1676,7 +1686,7 @@ |
101 |
if (r != 0) { |
102 |
iwe.u.bitrate.value = r * (1000000 / 2); |
103 |
- current_val = iwe_stream_add_value(current_ev, |
104 |
- current_val, end_buf, &iwe, |
105 |
- IW_EV_PARAM_LEN); |
106 |
+ current_val = iwe_stream_add_value(req->info, |
107 |
+ current_ev, current_val, end_buf, |
108 |
+ &iwe, IW_EV_PARAM_LEN); |
109 |
} |
110 |
} |
111 |
@@ -1685,11 +1695,11 @@ |
112 |
if (r != 0) { |
113 |
iwe.u.bitrate.value = r * (1000000 / 2); |
114 |
- current_val = iwe_stream_add_value(current_ev, |
115 |
- current_val, end_buf, &iwe, |
116 |
- IW_EV_PARAM_LEN); |
117 |
+ current_val = iwe_stream_add_value(req->info, |
118 |
+ current_ev, current_val, end_buf, |
119 |
+ &iwe, IW_EV_PARAM_LEN); |
120 |
} |
121 |
} |
122 |
/* remove fixed header if no rates were added */ |
123 |
- if ((current_val - current_ev) > IW_EV_LCP_LEN) { |
124 |
+ if ((current_val - current_ev) > iwe_stream_lcp_len(req->info)) { |
125 |
current_ev = current_val; |
126 |
} else { |
127 |
@@ -1705,5 +1715,6 @@ |
128 |
snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval); |
129 |
iwe.u.data.length = strlen(buf); |
130 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf); |
131 |
+ current_ev = iwe_stream_add_point(req->info, current_ev, |
132 |
+ end_buf, &iwe, buf); |
133 |
|
134 |
/* We ran out of space in the buffer. */ |
135 |
@@ -1729,6 +1740,6 @@ |
136 |
#endif |
137 |
if (iwe.u.data.length != 0) { |
138 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, |
139 |
- &iwe, buf); |
140 |
+ current_ev = iwe_stream_add_point(req->info, |
141 |
+ current_ev, end_buf, &iwe, buf); |
142 |
|
143 |
/* We ran out of space in the buffer */ |
144 |
@@ -1755,6 +1766,6 @@ |
145 |
#endif |
146 |
if (iwe.u.data.length != 0) { |
147 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, |
148 |
- &iwe, buf); |
149 |
+ current_ev = iwe_stream_add_point(req->info, |
150 |
+ current_ev, end_buf, &iwe, buf); |
151 |
|
152 |
/* We ran out of space in the buffer. */ |
153 |
@@ -1774,6 +1785,6 @@ |
154 |
wme_leader, sizeof(wme_leader) - 1); |
155 |
if (iwe.u.data.length != 0) { |
156 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, |
157 |
- &iwe, buf); |
158 |
+ current_ev = iwe_stream_add_point(req->info, |
159 |
+ current_ev, end_buf, &iwe, buf); |
160 |
|
161 |
/* We ran out of space in the buffer. */ |
162 |
@@ -1792,6 +1803,6 @@ |
163 |
ath_leader, sizeof(ath_leader) - 1); |
164 |
if (iwe.u.data.length != 0) { |
165 |
- current_ev = iwe_stream_add_point(current_ev, end_buf, |
166 |
- &iwe, buf); |
167 |
+ current_ev = iwe_stream_add_point(req->info, |
168 |
+ current_ev, end_buf, &iwe, buf); |
169 |
|
170 |
/* We ran out of space in the buffer. */ |
171 |
@@ -1816,4 +1827,5 @@ |
172 |
|
173 |
req.vap = vap; |
174 |
+ req.info = info; |
175 |
req.current_ev = extra; |
176 |
if (data->length == 0) { |