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>
This commit is contained in:
Bhagavathi Perumal S 2018-04-19 17:25:49 +05:30 committed by Jouni Malinen
parent 4204669c69
commit b55c623e4c

View File

@ -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;