aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/ctrl_iface.c
diff options
context:
space:
mode:
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>2013-06-22 08:59:29 (GMT)
committerJouni Malinen <j@w1.fi>2013-06-22 09:01:05 (GMT)
commit9578329874b3ad679b9da97a2603b218c5e42d5e (patch)
tree7a53331d99b25cb04f5d15b37cfd13c774551ec8 /wpa_supplicant/ctrl_iface.c
parent2cc8d8f4e8ac87d03ec6d20cbe18594433b12e14 (diff)
downloadhostap-9578329874b3ad679b9da97a2603b218c5e42d5e.zip
hostap-9578329874b3ad679b9da97a2603b218c5e42d5e.tar.gz
hostap-9578329874b3ad679b9da97a2603b218c5e42d5e.tar.bz2
Add AVG_RSSI report in signal_poll
Add AVG_RSSI report to the signal_poll command if it is reported by the kernel. Signed-hostap: Andrei Otcheretianski <andrei.otcheretianski@intel.com> Signed-hostap: Ilan Peer <ilan.peer@intel.com>
Diffstat (limited to 'wpa_supplicant/ctrl_iface.c')
-rw-r--r--wpa_supplicant/ctrl_iface.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index 0c81ed3..a9c7715 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -5060,6 +5060,14 @@ static int wpa_supplicant_signal_poll(struct wpa_supplicant *wpa_s, char *buf,
pos += ret;
}
+ if (si.avg_signal) {
+ ret = os_snprintf(pos, end - pos,
+ "AVG_RSSI=%d\n", si.avg_signal);
+ if (ret < 0 || ret >= end - pos)
+ return -1;
+ pos += ret;
+ }
+
return pos - buf;
}