summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ancontrol
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2001-06-26 00:00:58 +0000
committerbrooks <brooks@FreeBSD.org>2001-06-26 00:00:58 +0000
commit0de02e9c21d182c5294eef5a4e058b460fa6419e (patch)
treeb72671a76f4059030934fd79170bb2896df78450 /usr.sbin/ancontrol
parent979d65597777a11deeec3af62d07f17eee54425a (diff)
downloadFreeBSD-src-0de02e9c21d182c5294eef5a4e058b460fa6419e.zip
FreeBSD-src-0de02e9c21d182c5294eef5a4e058b460fa6419e.tar.gz
Output the current TX rate when showing status.
PR: bin/25470
Diffstat (limited to 'usr.sbin/ancontrol')
-rw-r--r--usr.sbin/ancontrol/ancontrol.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/usr.sbin/ancontrol/ancontrol.c b/usr.sbin/ancontrol/ancontrol.c
index f069235..ab29fc1 100644
--- a/usr.sbin/ancontrol/ancontrol.c
+++ b/usr.sbin/ancontrol/ancontrol.c
@@ -281,6 +281,17 @@ static void an_dumpstatus(iface)
an_printhex((char *)&sts->an_errcode, 1);
printf("\nSignal quality:\t\t");
an_printhex((char *)&sts->an_cur_signal_quality, 1);
+ /*
+ * XXX: This uses the old definition of the rate field (units of
+ * 500kbps). Technically the new definition is that this field
+ * contains arbitrary values, but no devices which need this
+ * support exist and the IEEE seems to intend to use the old
+ * definition until they get something big so we'll keep using
+ * it as well because this will work with new cards with
+ * rate <= 63.5Mbps.
+ */
+ printf("\nCurrent TX rate:\t[ %d%s ]", sts->an_current_tx_rate / 2,
+ (sts->an_current_tx_rate % 2) ? ".5" : "");
printf("\nCurrent SSID:\t\t");
an_printstr((char *)&sts->an_ssid, sts->an_ssidlen);
printf("\nCurrent AP name:\t");
OpenPOWER on IntegriCloud