aboutsummaryrefslogtreecommitdiffstats
path: root/wpa_supplicant/wpa_cli.c
diff options
context:
space:
mode:
authorDmitry Shmidt <dimitrysh@google.com>2015-12-16 22:18:18 (GMT)
committerJouni Malinen <j@w1.fi>2015-12-18 19:02:37 (GMT)
commit96e8d831a5f61e94cdccbebc50a7aa964765875f (patch)
treefbce10f1b0904794da14cac22d5288881cc84213 /wpa_supplicant/wpa_cli.c
parent2c0d0ae370f72fbe6248feed7ea0635303e3dc5a (diff)
downloadhostap-96e8d831a5f61e94cdccbebc50a7aa964765875f.zip
hostap-96e8d831a5f61e94cdccbebc50a7aa964765875f.tar.gz
hostap-96e8d831a5f61e94cdccbebc50a7aa964765875f.tar.bz2
wpa_supplicant: Add SIGNAL_MONITOR command
SIGNAL_MONITOR THRESHOLD=DD HYSTERESIS=DD command will request signal strength monitoring events based on there having been requested amount of drop in the signal strength. The threshold value is the RSSI threshold in dBm for the event to be sent. 0 threshold can be used to disable monitoring. The hysteresis value is RSSI hysteresis in dB to specify the minimum amount of change before a consecutive event is reported. With nl80211 driver interface, these values map to the NL80211_CMD_SET_CQM command with NL80211_ATTR_CQM_RSSI_THOLD and NL80211_ATTR_CQM_RSSI_HYST attributes to the driver. This command cannot be used when bgscan module is in use since that depends on being able to control the connection monitoring parameters. Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'wpa_supplicant/wpa_cli.c')
-rw-r--r--wpa_supplicant/wpa_cli.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/wpa_supplicant/wpa_cli.c b/wpa_supplicant/wpa_cli.c
index cef18ba..aedd61a 100644
--- a/wpa_supplicant/wpa_cli.c
+++ b/wpa_supplicant/wpa_cli.c
@@ -2760,6 +2760,13 @@ static int wpa_cli_cmd_signal_poll(struct wpa_ctrl *ctrl, int argc,
}
+static int wpa_cli_cmd_signal_monitor(struct wpa_ctrl *ctrl, int argc,
+ char *argv[])
+{
+ return wpa_cli_cmd(ctrl, "SIGNAL_MONITOR", 0, argc, argv);
+}
+
+
static int wpa_cli_cmd_pktcnt_poll(struct wpa_ctrl *ctrl, int argc,
char *argv[])
{
@@ -3394,6 +3401,9 @@ static const struct wpa_cli_cmd wpa_cli_commands[] = {
{ "signal_poll", wpa_cli_cmd_signal_poll, NULL,
cli_cmd_flag_none,
"= get signal parameters" },
+ { "signal_monitor", wpa_cli_cmd_signal_monitor, NULL,
+ cli_cmd_flag_none,
+ "= set signal monitor parameters" },
{ "pktcnt_poll", wpa_cli_cmd_pktcnt_poll, NULL,
cli_cmd_flag_none,
"= get TX/RX packet counters" },