mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-25 23:05:31 +02:00
134 lines
4.5 KiB
Diff
134 lines
4.5 KiB
Diff
|
--- a/net80211/ieee80211_wireless.c
|
||
|
+++ b/net80211/ieee80211_wireless.c
|
||
|
@@ -73,6 +73,13 @@
|
||
|
(_vap)->iv_ic->ic_roaming == IEEE80211_ROAMING_AUTO)
|
||
|
#define RESCAN 1
|
||
|
|
||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
|
||
|
+#define IWE(func, ...) func(&iweinfo, __VA_ARGS__)
|
||
|
+static struct iw_request_info iweinfo = { 0, 0 };
|
||
|
+#else
|
||
|
+#define IWE(func, ...) func(__VA_ARGS__)
|
||
|
+#endif
|
||
|
+
|
||
|
static void
|
||
|
pre_announced_chanswitch(struct net_device *dev, u_int32_t channel, u_int32_t tbtt);
|
||
|
|
||
|
@@ -1800,7 +1807,7 @@
|
||
|
IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_macaddr);
|
||
|
else
|
||
|
IEEE80211_ADDR_COPY(iwe.u.ap_addr.sa_data, se->se_bssid);
|
||
|
- current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
|
||
|
+ current_ev = IWE(iwe_stream_add_event, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
if (last_ev == current_ev)
|
||
|
@@ -1811,7 +1818,7 @@
|
||
|
iwe.cmd = SIOCGIWESSID;
|
||
|
iwe.u.data.flags = 1;
|
||
|
iwe.u.data.length = se->se_ssid[1];
|
||
|
- current_ev = iwe_stream_add_point(current_ev,
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev,
|
||
|
end_buf, &iwe, (char *) se->se_ssid+2);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
@@ -1824,7 +1831,7 @@
|
||
|
iwe.cmd = SIOCGIWMODE;
|
||
|
iwe.u.mode = se->se_capinfo & IEEE80211_CAPINFO_ESS ?
|
||
|
IW_MODE_MASTER : IW_MODE_ADHOC;
|
||
|
- current_ev = iwe_stream_add_event(current_ev,
|
||
|
+ current_ev = IWE(iwe_stream_add_event, current_ev,
|
||
|
end_buf, &iwe, IW_EV_UINT_LEN);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
@@ -1837,7 +1844,7 @@
|
||
|
iwe.cmd = SIOCGIWFREQ;
|
||
|
iwe.u.freq.m = se->se_chan->ic_freq * 100000;
|
||
|
iwe.u.freq.e = 1;
|
||
|
- current_ev = iwe_stream_add_event(current_ev,
|
||
|
+ current_ev = IWE(iwe_stream_add_event, current_ev,
|
||
|
end_buf, &iwe, IW_EV_FREQ_LEN);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
@@ -1848,7 +1855,7 @@
|
||
|
last_ev = current_ev;
|
||
|
iwe.cmd = IWEVQUAL;
|
||
|
set_quality(&iwe.u.qual, se->se_rssi, ATH_DEFAULT_NOISE);
|
||
|
- current_ev = iwe_stream_add_event(current_ev,
|
||
|
+ current_ev = IWE(iwe_stream_add_event, current_ev,
|
||
|
end_buf, &iwe, IW_EV_QUAL_LEN);
|
||
|
|
||
|
/* We ran out of space in the buffer */
|
||
|
@@ -1863,7 +1870,7 @@
|
||
|
else
|
||
|
iwe.u.data.flags = IW_ENCODE_DISABLED;
|
||
|
iwe.u.data.length = 0;
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, "");
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, "");
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
if (last_ev == current_ev)
|
||
|
@@ -1878,7 +1885,7 @@
|
||
|
int r = se->se_rates[2 + j] & IEEE80211_RATE_VAL;
|
||
|
if (r != 0) {
|
||
|
iwe.u.bitrate.value = r * (1000000 / 2);
|
||
|
- current_val = iwe_stream_add_value(current_ev,
|
||
|
+ current_val = IWE(iwe_stream_add_value, current_ev,
|
||
|
current_val, end_buf, &iwe,
|
||
|
IW_EV_PARAM_LEN);
|
||
|
}
|
||
|
@@ -1887,7 +1894,7 @@
|
||
|
int r = se->se_xrates[2+j] & IEEE80211_RATE_VAL;
|
||
|
if (r != 0) {
|
||
|
iwe.u.bitrate.value = r * (1000000 / 2);
|
||
|
- current_val = iwe_stream_add_value(current_ev,
|
||
|
+ current_val = IWE(iwe_stream_add_value, current_ev,
|
||
|
current_val, end_buf, &iwe,
|
||
|
IW_EV_PARAM_LEN);
|
||
|
}
|
||
|
@@ -1906,7 +1913,7 @@
|
||
|
iwe.cmd = IWEVCUSTOM;
|
||
|
snprintf(buf, sizeof(buf), "bcn_int=%d", se->se_intval);
|
||
|
iwe.u.data.length = strlen(buf);
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf, &iwe, buf);
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf, &iwe, buf);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
if (last_ev == current_ev)
|
||
|
@@ -1930,7 +1937,7 @@
|
||
|
rsn_leader, sizeof(rsn_leader) - 1);
|
||
|
#endif
|
||
|
if (iwe.u.data.length != 0) {
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf,
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
|
||
|
&iwe, buf);
|
||
|
|
||
|
/* We ran out of space in the buffer */
|
||
|
@@ -1956,7 +1963,7 @@
|
||
|
wpa_leader, sizeof(wpa_leader) - 1);
|
||
|
#endif
|
||
|
if (iwe.u.data.length != 0) {
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf,
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
|
||
|
&iwe, buf);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
@@ -1975,7 +1982,7 @@
|
||
|
se->se_wme_ie, se->se_wme_ie[1] + 2,
|
||
|
wme_leader, sizeof(wme_leader) - 1);
|
||
|
if (iwe.u.data.length != 0) {
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf,
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
|
||
|
&iwe, buf);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|
||
|
@@ -1993,7 +2000,7 @@
|
||
|
se->se_ath_ie, se->se_ath_ie[1] + 2,
|
||
|
ath_leader, sizeof(ath_leader) - 1);
|
||
|
if (iwe.u.data.length != 0) {
|
||
|
- current_ev = iwe_stream_add_point(current_ev, end_buf,
|
||
|
+ current_ev = IWE(iwe_stream_add_point, current_ev, end_buf,
|
||
|
&iwe, buf);
|
||
|
|
||
|
/* We ran out of space in the buffer. */
|