-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathndiswrapper-2.6.27.patch
136 lines (126 loc) · 5.31 KB
/
ndiswrapper-2.6.27.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
diff -upr ndiswrapper-1.52./driver/iw_ndis.c ndiswrapper-1.52/driver/iw_ndis.c
--- ndiswrapper-1.52./driver/iw_ndis.c 2008-02-03 03:45:22.000000000 +0100
+++ ndiswrapper-1.52/driver/iw_ndis.c 2008-11-06 21:30:37.525237599 +0100
@@ -1018,7 +1018,8 @@ static int iw_get_nick(struct net_device
}
static char *ndis_translate_scan(struct net_device *dev, char *event,
- char *end_buf, void *item)
+ char *end_buf, void *item,
+ struct iw_request_info *info)
{
struct iw_event iwe;
char *current_val;
@@ -1036,7 +1037,7 @@ static char *ndis_translate_scan(struct
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
iwe.len = IW_EV_ADDR_LEN;
memcpy(iwe.u.ap_addr.sa_data, bssid->mac, ETH_ALEN);
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_ADDR_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_ADDR_LEN);
/* add essid */
memset(&iwe, 0, sizeof(iwe));
@@ -1046,13 +1047,13 @@ static char *ndis_translate_scan(struct
iwe.u.data.length = IW_ESSID_MAX_SIZE;
iwe.u.data.flags = 1;
iwe.len = IW_EV_POINT_LEN + iwe.u.data.length;
- event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);
/* add protocol name */
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = SIOCGIWNAME;
strncpy(iwe.u.name, network_type_to_name(bssid->net_type), IFNAMSIZ);
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_CHAR_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_CHAR_LEN);
/* add mode */
memset(&iwe, 0, sizeof(iwe));
@@ -1063,7 +1064,7 @@ static char *ndis_translate_scan(struct
iwe.u.mode = IW_MODE_INFRA;
else // if (bssid->mode == Ndis802_11AutoUnknown)
iwe.u.mode = IW_MODE_AUTO;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_UINT_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_UINT_LEN);
/* add freq */
memset(&iwe, 0, sizeof(iwe));
@@ -1078,7 +1079,7 @@ static char *ndis_translate_scan(struct
/* convert from kHz to Hz */
iwe.u.freq.e += 3;
iwe.len = IW_EV_FREQ_LEN;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_FREQ_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_FREQ_LEN);
/* add qual */
memset(&iwe, 0, sizeof(iwe));
@@ -1092,7 +1093,7 @@ static char *ndis_translate_scan(struct
iwe.u.qual.noise = WL_NOISE;
iwe.u.qual.qual = i;
iwe.len = IW_EV_QUAL_LEN;
- event = iwe_stream_add_event(event, end_buf, &iwe, IW_EV_QUAL_LEN);
+ event = iwe_stream_add_event(info, event, end_buf, &iwe, IW_EV_QUAL_LEN);
/* add key info */
memset(&iwe, 0, sizeof(iwe));
@@ -1103,7 +1104,7 @@ static char *ndis_translate_scan(struct
iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
iwe.u.data.length = 0;
iwe.len = IW_EV_POINT_LEN;
- event = iwe_stream_add_point(event, end_buf, &iwe, bssid->ssid.essid);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, bssid->ssid.essid);
/* add rate */
memset(&iwe, 0, sizeof(iwe));
@@ -1117,7 +1118,7 @@ static char *ndis_translate_scan(struct
if (bssid->rates[i] & 0x7f) {
iwe.u.bitrate.value = ((bssid->rates[i] & 0x7f) *
500000);
- current_val = iwe_stream_add_value(event, current_val,
+ current_val = iwe_stream_add_value(info, event, current_val,
end_buf, &iwe,
IW_EV_PARAM_LEN);
}
@@ -1130,13 +1131,13 @@ static char *ndis_translate_scan(struct
iwe.cmd = IWEVCUSTOM;
sprintf(buf, "bcn_int=%d", bssid->config.beacon_period);
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf, &iwe, buf);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
sprintf(buf, "atim=%u", bssid->config.atim_window);
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf, &iwe, buf);
+ event = iwe_stream_add_point(info, event, end_buf, &iwe, buf);
TRACE2("%d, %u", bssid->length, (unsigned int)sizeof(*bssid));
if (bssid->length > sizeof(*bssid)) {
@@ -1158,7 +1159,7 @@ static char *ndis_translate_scan(struct
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ielen;
- event = iwe_stream_add_point(event, end_buf,
+ event = iwe_stream_add_point(info, event, end_buf,
&iwe, iep);
}
#else
@@ -1177,7 +1178,7 @@ static char *ndis_translate_scan(struct
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf,
+ event = iwe_stream_add_point(info, event, end_buf,
&iwe, buf);
} else if (iep[0] == RSN_INFO_ELEM) {
unsigned char *p = buf;
@@ -1191,7 +1192,7 @@ static char *ndis_translate_scan(struct
memset(&iwe, 0, sizeof(iwe));
iwe.cmd = IWEVCUSTOM;
iwe.u.data.length = strlen(buf);
- event = iwe_stream_add_point(event, end_buf,
+ event = iwe_stream_add_point(info, event, end_buf,
&iwe, buf);
}
#endif
@@ -1274,7 +1275,8 @@ static int iw_get_scan(struct net_device
cur_item = &bssid_list->bssid[0];
for (i = 0; i < bssid_list->num_items; i++) {
event = ndis_translate_scan(dev, event,
- extra + IW_SCAN_MAX_DATA, cur_item);
+ extra + IW_SCAN_MAX_DATA, cur_item,
+ info);
cur_item = (struct ndis_wlan_bssid *)((char *)cur_item +
cur_item->length);
}