diff options
author | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-03-05 22:35:04 +0000 |
---|---|---|
committer | Jonathan McCrohan <jmccrohan@gmail.com> | 2012-03-05 22:35:04 +0000 |
commit | 89de95a89953c20349a8c7c4684eba45feb34bf5 (patch) | |
tree | 9ec517e79b83b598c3c51058830148ed58fd0ac3 /scan_scr.c | |
parent | f3410da7f0bd208a5f2d792131b215454e782e93 (diff) | |
download | wavemon-470f15c67d368a12075214ad9bd2af8ee02191ff.tar.gz |
Imported Upstream version 0.7.4upstream/0.7.4
Diffstat (limited to 'scan_scr.c')
-rw-r--r-- | scan_scr.c | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -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. |