From owner-freebsd-bugs Fri Jun 1 20:31: 9 2001 Delivered-To: freebsd-bugs@freebsd.org Received: from odin.ac.hmc.edu (Odin.AC.HMC.Edu [134.173.32.75]) by hub.freebsd.org (Postfix) with ESMTP id 0680937B424 for ; Fri, 1 Jun 2001 20:31:07 -0700 (PDT) (envelope-from brdavis@odin.ac.hmc.edu) Received: (from brdavis@localhost) by odin.ac.hmc.edu (8.11.0/8.11.0) id f523V6802493 for freebsd-bugs@FreeBSD.org; Fri, 1 Jun 2001 20:31:06 -0700 Date: Fri, 1 Jun 2001 20:31:06 -0700 From: Brooks Davis To: freebsd-bugs@FreeBSD.org Subject: Re: bin/25470: ancontrol doesn't output TX rate Message-ID: <20010601203106.B27737@Odin.AC.HMC.Edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Enclosed is an updated patch for this issue. It adds a comment that this print out may someday be incorrect, but is correct now. -- Brooks Index: ancontrol.c =================================================================== RCS file: /home/ncvs/src/usr.sbin/ancontrol/ancontrol.c,v retrieving revision 1.8 diff -u -r1.8 ancontrol.c --- ancontrol.c 2000/12/31 01:51:22 1.8 +++ ancontrol.c 2001/06/02 02:39:09 @@ -281,6 +281,16 @@ 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 so we'll just be lazy until that happens since + * this will work better then a table in the face on new devices + * with rates <=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"); -- Any statement of the form "X is the one, true Y" is FALSE. PGP fingerprint 655D 519C 26A7 82E7 2529 9BF0 5D8E 8BE9 F238 1AD4 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message