aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhagavathi Perumal S <bperumal@codeaurora.org>2018-04-19 11:55:49 (GMT)
committerJouni Malinen <j@w1.fi>2018-04-19 21:10:45 (GMT)
commitb55c623e4c8af26f2eda29f1dc4b95783f875c17 (patch)
tree3f6e1214afee17229e4554d2650ef2eef8af8b44
parent4204669c69b77bcd82bf5471a8359eb9f0dbf88c (diff)
downloadhostap-b55c623e4c8af26f2eda29f1dc4b95783f875c17.zip
hostap-b55c623e4c8af26f2eda29f1dc4b95783f875c17.tar.gz
hostap-b55c623e4c8af26f2eda29f1dc4b95783f875c17.tar.bz2
Make CENTER_FRQ1 available independently in SIGNAL_POLL
This allows user to get center frequency and find secondary channel offset. Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
-rw-r--r--wpa_supplicant/ctrl_iface.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c
index aac281e..2080419 100644
--- a/wpa_supplicant/ctrl_iface.c
+++ b/wpa_supplicant/ctrl_iface.c
@@ -7461,10 +7461,17 @@ static int wpa_supplicant_signal_poll(struct wpa_supplicant *wpa_s, char *buf,
pos += ret;
}
- if (si.center_frq1 > 0 && si.center_frq2 > 0) {
- ret = os_snprintf(pos, end - pos,
- "CENTER_FRQ1=%d\nCENTER_FRQ2=%d\n",
- si.center_frq1, si.center_frq2);
+ if (si.center_frq1 > 0) {
+ ret = os_snprintf(pos, end - pos, "CENTER_FRQ1=%d\n",
+ si.center_frq1);
+ if (os_snprintf_error(end - pos, ret))
+ return -1;
+ pos += ret;
+ }
+
+ if (si.center_frq2 > 0) {
+ ret = os_snprintf(pos, end - pos, "CENTER_FRQ2=%d\n",
+ si.center_frq2);
if (os_snprintf_error(end - pos, ret))
return -1;
pos += ret;