make ez-ipupdate uci aware, Signed-off-by: David Bird <david@coova.com>
[openwrt/svn-archive/archive.git] / utils / collectd / patches / 200-wireless-brcm2.4-compat.patch
1 --- collectd-4.4.0.orig/src/wireless.c 2008-05-26 20:13:05.000000000 +0200
2 +++ collectd-4.4.0/src/wireless.c 2008-05-26 20:15:16.000000000 +0200
3 @@ -128,7 +128,9 @@
4 power = 1.0; /* invalid */
5 else if ((power >= 0.0) && (power <= 100.0))
6 power = wireless_percent_to_power (power);
7 - else if (power > 100.0)
8 + else if ((power > 100.0) && (power <= 256.0))
9 + power = power - 256.0;
10 + else
11 power = 1.0; /* invalid */
12
13 /* noise [dBm] < 0.0 */
14 @@ -137,7 +139,9 @@
15 noise = 1.0; /* invalid */
16 else if ((noise >= 0.0) && (noise <= 100.0))
17 noise = wireless_percent_to_power (noise);
18 - else if (noise > 100.0)
19 + else if ((noise > 100.0) && (noise <= 256.0))
20 + noise = noise - 256.0;
21 + else
22 noise = 1.0; /* invalid */
23
24 wireless_submit (device, "signal_quality", quality);