WLAN RSSI reading can be non-negative, i.e. 0 dBm and more. For example, this occurs with QCA9561 when transmitter is very close. Driver, Linux kernel and iw tool do allow this.
This patch allows non-negative RSSI in rpcd too. Signed-off-by: Dmitry Ivanov <d...@ubnt.com> --- iwinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iwinfo.c b/iwinfo.c index 325c07a..7e39b73 100644 --- a/iwinfo.c +++ b/iwinfo.c @@ -356,7 +356,7 @@ rpc_iwinfo_scan(struct ubus_context *ctx, struct ubus_object *obj, blobmsg_add_string(&buf, "mode", IWINFO_OPMODE_NAMES[e->mode]); blobmsg_add_u32(&buf, "channel", e->channel); - blobmsg_add_u32(&buf, "signal", (uint32_t)(e->signal - 0x100)); + blobmsg_add_u32(&buf, "signal", (uint32_t)(e->signal)); blobmsg_add_u32(&buf, "quality", e->quality); blobmsg_add_u32(&buf, "quality_max", e->quality_max); -- 2.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel