1 --- a/net80211/ieee80211_wireless.c
2 +++ b/net80211/ieee80211_wireless.c
4 (_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO)
7 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
8 +#define IWE(func, ...) func(&iweinfo, __VA_ARGS__)
9 +static struct iw_request_info iweinfo = { 0, 0 };
11 +#define IWE(func, ...) func(__VA_ARGS__)
15 pre_announced_chanswitch(struct net_device *dev, u_int32_t channel, u_int32_t tbtt);
18 IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_macaddr);
20 IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid);
21 - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
22 + current_ev = IWE(iwe_stream_add_event, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
24 /* We ran out of space in the buffer. */
25 if (last_ev == current_ev)
27 iwe.cmd = SIOCGIWESSID;
29 iwe.u.data.length = se->se_ssid[1];
30 - current_ev = iwe_stream_add_point(current_ev,
31 + current_ev = IWE(iwe_stream_add_point, current_ev,
32 end_buf, &iwe, (char *) se->se_ssid+2);
34 /* We ran out of space in the buffer. */
36 iwe.cmd = SIOCGIWMODE;
37 iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ?
38 IW_MODE_MASTER : IW_MODE_ADHOC;
39 - current_ev = iwe_stream_add_event(current_ev,
40 + current_ev = IWE(iwe_stream_add_event, current_ev,
41 end_buf, &iwe, IW_EV_UINT_LEN);
43 /* We ran out of space in the buffer. */
45 iwe.cmd = SIOCGIWFREQ;
46 iwe.u.freq.m = se->se_chan->ic_freq * 100000;
48 - current_ev = iwe_stream_add_event(current_ev,
49 + current_ev = IWE(iwe_stream_add_event, current_ev,
50 end_buf, &iwe, IW_EV_FREQ_LEN);
52 /* We ran out of space in the buffer. */
56 set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE);
57 - current_ev = iwe_stream_add_event(current_ev,
58 + current_ev = IWE(iwe_stream_add_event, current_ev,
59 end_buf, &iwe, IW_EV_QUAL_LEN);
61 /* We ran out of space in the buffer */
64 iwe.u.data.flags = IW_ENCODE_DISABLED;
65 iwe.u.data.length = 0;
66 - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, "");
67 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, "");
69 /* We ran out of space in the buffer. */
70 if (last_ev == current_ev)
72 int r = se->se_rates[2 + j] & IEEE80211_RATE_VAL;
74 iwe.u.bitrate.value = r * (1000000 / 2);
75 - current_val = iwe_stream_add_value(current_ev,
76 + current_val = IWE(iwe_stream_add_value, current_ev,
77 current_val, end_buf, &iwe,
81 int r = se->se_xrates[2+j] & IEEE80211_RATE_VAL;
83 iwe.u.bitrate.value = r * (1000000 / 2);
84 - current_val = iwe_stream_add_value(current_ev,
85 + current_val = IWE(iwe_stream_add_value, current_ev,
86 current_val, end_buf, &iwe,
91 snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval);
92 iwe.u.data.length = strlen(buf);
93 - current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
94 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, buf);
96 /* We ran out of space in the buffer. */
97 if (last_ev == current_ev)
99 rsn_leader, sizeof(rsn_leader) - 1);
101 if (iwe.u.data.length != 0) {
102 - current_ev = iwe_stream_add_point(current_ev, end_buf,
103 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
106 /* We ran out of space in the buffer */
107 @@ -1956,7 +1963,7 @@
108 wpa_leader, sizeof(wpa_leader) - 1);
110 if (iwe.u.data.length != 0) {
111 - current_ev = iwe_stream_add_point(current_ev, end_buf,
112 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
115 /* We ran out of space in the buffer. */
116 @@ -1975,7 +1982,7 @@
117 se->se_wme_ie, se->se_wme_ie[1] + 2,
118 wme_leader, sizeof(wme_leader) - 1);
119 if (iwe.u.data.length != 0) {
120 - current_ev = iwe_stream_add_point(current_ev, end_buf,
121 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
124 /* We ran out of space in the buffer. */
125 @@ -1993,7 +2000,7 @@
126 se->se_ath_ie, se->se_ath_ie[1] + 2,
127 ath_leader, sizeof(ath_leader) - 1);
128 if (iwe.u.data.length != 0) {
129 - current_ev = iwe_stream_add_point(current_ev, end_buf,
130 + current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
133 /* We ran out of space in the buffer. */