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
|
diff -Naur broadcom-sta-5.10.27.11.orig/src/wl/sys/wl_iw.c broadcom-sta-5.10.27.11/src/wl/sys/wl_iw.c
--- broadcom-sta-5.10.27.11.orig/src/wl/sys/wl_iw.c 2008-12-06 04:41:46.000000000 +0900
+++ broadcom-sta-5.10.27.11/src/wl/sys/wl_iw.c 2008-12-23 02:53:47.000000000 +0900
@@ -893,6 +893,14 @@
}
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 27) && !defined(IW_REQUEST_FLAG_COMPAT)
+#define iwe_stream_add_event(a, b, c, d, e) iwe_stream_add_event(b, c, d, e)
+#define iwe_stream_add_point(a, b, c, d, e) iwe_stream_add_point(b, c, d, e)
+#define iwe_stream_add_value(a, b, c, d, e, f) \
+ iwe_stream_add_value(b, c, d, e, f)
+#endif
+
+
static int
wl_iw_get_scan(
struct net_device *dev,
@@ -943,12 +951,12 @@
iwe.cmd = SIOCGIWAP;
iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
memcpy(iwe.u.ap_addr.sa_data, &bi->BSSID, ETHER_ADDR_LEN);
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_ADDR_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_ADDR_LEN);
iwe.u.data.length = dtoh32(bi->SSID_len);
iwe.cmd = SIOCGIWESSID;
iwe.u.data.flags = 1;
- event = iwe_stream_add_point(event, end, &iwe, bi->SSID);
+ event = iwe_stream_add_point(info, event, end, &iwe, bi->SSID);
if (dtoh16(bi->capability) & (DOT11_CAP_ESS | DOT11_CAP_IBSS)) {
iwe.cmd = SIOCGIWMODE;
@@ -956,7 +964,7 @@
iwe.u.mode = IW_MODE_INFRA;
else
iwe.u.mode = IW_MODE_ADHOC;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_UINT_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_UINT_LEN);
}
iwe.cmd = SIOCGIWFREQ;
@@ -964,13 +972,13 @@
CHSPEC_CHANNEL(bi->chanspec) <= CH_MAX_2G_CHANNEL ?
WF_CHAN_FACTOR_2_4_G : WF_CHAN_FACTOR_5_G);
iwe.u.freq.e = 6;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_FREQ_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_FREQ_LEN);
iwe.cmd = IWEVQUAL;
iwe.u.qual.qual = rssi_to_qual(dtoh16(bi->RSSI));
iwe.u.qual.level = 0x100 + dtoh16(bi->RSSI);
iwe.u.qual.noise = 0x100 + bi->phy_noise;
- event = iwe_stream_add_event(event, end, &iwe, IW_EV_QUAL_LEN);
+ event = iwe_stream_add_event(info, event, end, &iwe, IW_EV_QUAL_LEN);
#if WIRELESS_EXT > 17
@@ -982,7 +990,7 @@
if ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_RSN_ID))) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
}
ptr = ((uint8 *)bi) + sizeof(wl_bss_info_t);
while ((ie = bcm_parse_tlvs(ptr, ptr_len, DOT11_MNG_WPA_ID))) {
@@ -990,7 +998,7 @@
if (ie_is_wps_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
break;
}
}
@@ -1001,7 +1009,7 @@
if (ie_is_wpa_ie(((uint8 **)&ie), &ptr, &ptr_len)) {
iwe.cmd = IWEVGENIE;
iwe.u.data.length = ie->len + 2;
- event = iwe_stream_add_point(event, end, &iwe, (char *)ie);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)ie);
goto done;
}
}
@@ -1015,7 +1023,7 @@
else
iwe.u.data.flags = IW_ENCODE_DISABLED;
iwe.u.data.length = 0;
- event = iwe_stream_add_point(event, end, &iwe, (char *)event);
+ event = iwe_stream_add_point(info, event, end, &iwe, (char *)event);
if (bi->rateset.count) {
value = event + IW_EV_LCP_LEN;
@@ -1024,7 +1032,7 @@
iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
for (j = 0; j < bi->rateset.count && j < IW_MAX_BITRATES; j++) {
iwe.u.bitrate.value = (bi->rateset.rates[j] & 0x7f) * 500000;
- value = iwe_stream_add_value(event, value, end, &iwe,
+ value = iwe_stream_add_value(info, event, value, end, &iwe,
IW_EV_PARAM_LEN);
}
event = value;
|