]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
Make CENTER_FRQ1 available independently in SIGNAL_POLL
authorBhagavathi Perumal S <bperumal@codeaurora.org>
Thu, 19 Apr 2018 11:55:49 +0000 (17:25 +0530)
committerJouni Malinen <j@w1.fi>
Thu, 19 Apr 2018 21:10:45 +0000 (00:10 +0300)
This allows user to get center frequency and find secondary channel
offset.

Signed-off-by: Bhagavathi Perumal S <bperumal@codeaurora.org>
wpa_supplicant/ctrl_iface.c

index aac281e3faffae45437a3154656fef18fc0aa717..2080419d1c2b32559d148c7592788bad832a6a2a 100644 (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;