aboutsummaryrefslogtreecommitdiffstats
path: root/scan_scr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scan_scr.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/scan_scr.c b/scan_scr.c
index ab6b433..e125f22 100644
--- a/scan_scr.c
+++ b/scan_scr.c
@@ -52,8 +52,11 @@ static char *fmt_scan_result(struct scan_result *cur, struct iw_range *iw_range,
if (cur->freq < 1e3)
len += snprintf(buf + len, buflen - len, ", Chan %2.0f",
cur->freq);
+ else if (channel >= 0 && cur->freq < 5e9)
+ len += snprintf(buf + len, buflen - len, ", ch %2d, %g MHz",
+ channel, cur->freq / 1e6);
else if (channel >= 0)
- len += snprintf(buf + len, buflen - len, ", Ch %2d, %g MHz",
+ len += snprintf(buf + len, buflen - len, ", CH %3d, %g MHz",
channel, cur->freq / 1e6);
else
len += snprintf(buf + len, buflen - len, ", %g GHz",
@@ -84,7 +87,7 @@ static void display_aplist(WINDOW *w_aplst)
iw_getinf_range(conf_ifname(), &range);
head = get_scan_list(skfd, conf_ifname(),
- range.we_version_compiled, cmp_freq_sig);
+ range.we_version_compiled);
if (head) {
;
} else if (errno == EPERM || !has_net_admin_capability()) {
@@ -168,8 +171,8 @@ void scr_aplst_init(void)
{
w_aplst = newwin_title(0, WAV_HEIGHT, "Scan window", false);
/*
- * Both parent and child process write to the terminal, updating
- * different areas of the screen. Suspending wavemon brings the
+ * Both parent and child process write to the terminal, updating
+ * different areas of the screen. Suspending wavemon brings the
* terminal state out of order, messing up the screen. The choice
* is between a more complicated (sophisticated) handling of
* signals, and to keep it simple by not allowing to suspend.