aboutsummaryrefslogtreecommitdiffstats
path: root/scan_scr.c
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-03-05 22:35:04 +0000
committerJonathan McCrohan <jmccrohan@gmail.com>2012-03-05 22:35:04 +0000
commit28954c917ff9ccc3cb6b79ce39b1d6c7841da13d (patch)
tree166eafef53933e8d30fdc704cf605319531b1134 /scan_scr.c
parent8f6b56b71ccee4eb800a5b1aa1edbbfb0a0cb6b4 (diff)
parent89de95a89953c20349a8c7c4684eba45feb34bf5 (diff)
downloadwavemon-28954c917ff9ccc3cb6b79ce39b1d6c7841da13d.tar.gz
Merge tag 'upstream/0.7.4'
Upstream version 0.7.4
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.