From 89de95a89953c20349a8c7c4684eba45feb34bf5 Mon Sep 17 00:00:00 2001 From: Jonathan McCrohan Date: Mon, 5 Mar 2012 22:35:04 +0000 Subject: Imported Upstream version 0.7.4 --- scan_scr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scan_scr.c') 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. -- cgit v1.2.3