From brooks@minya.sea.one-eyed-alien.net  Fri Oct  6 16:50:55 2000
Return-Path: <brooks@minya.sea.one-eyed-alien.net>
Received: from minya.sea.one-eyed-alien.net (minya.sea.one-eyed-alien.net [216.39.168.226])
	by hub.freebsd.org (Postfix) with ESMTP
	id 18FDC37B503; Fri,  6 Oct 2000 16:50:55 -0700 (PDT)
Received: (from brooks@localhost)
	by minya.sea.one-eyed-alien.net (8.11.1/8.11.1) id e96Novl02937;
	Fri, 6 Oct 2000 16:50:57 -0700 (PDT)
	(envelope-from brooks)
Message-Id: <200010062350.e96Novl02937@minya.sea.one-eyed-alien.net>
Date: Fri, 6 Oct 2000 16:50:57 -0700 (PDT)
From: brooks@one-eyed-alien.net
Sender: brooks@minya.sea.one-eyed-alien.net
Reply-To: brooks@one-eyed-alien.net
To: FreeBSD-gnats-submit@freebsd.org
Cc: wpaul@freebsd.org
Subject: [PATCH] wicontrol's -a option mis-documented and not implemented
X-Send-Pr-Version: 3.2

>Number:         21803
>Category:       bin
>Synopsis:       [PATCH] wicontrol's -a option mis-documented and not implemented
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    brooks
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Oct 06 17:00:00 PDT 2000
>Closed-Date:    Mon Jun 25 17:13:10 PDT 2001
>Last-Modified:  Mon Jun 25 17:13:46 PDT 2001
>Originator:     Brooks Davis
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
The Aerospace Corporation
>Environment:

FreeBSD minya 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Fri Oct  6 09:32:24 PDT 2000     root@minya:/usr/obj/usr/src/sys/MINYA  i386

>Description:

The -a option (change access point density) is not implemented in
wicontrol.  The a flag was also temprorarily stolen for another purpose
and that usage is still documented in the manpage.

>How-To-Repeat:

man wicontrol
wicontrol -i wi0 -a 2

>Fix:

This patch removes documentation of the bogus -a option and implements
the other one.

Index: wicontrol.8
===================================================================
RCS file: /home/ncvs/src/usr.sbin/wicontrol/wicontrol.8,v
retrieving revision 1.17
diff -u -r1.17 wicontrol.8
--- wicontrol.8	2000/09/21 00:25:07	1.17
+++ wicontrol.8	2000/10/06 23:41:30
@@ -38,7 +38,7 @@
 .Nd configure WaveLAN/IEEE devices
 .Sh SYNOPSIS
 .Nm wicontrol
-.Fl i Ar iface Op Fl oa
+.Fl i Ar iface Op Fl o
 .Nm wicontrol
 .Fl i Ar iface Fl t Ar tx rate
 .Nm wicontrol
@@ -105,7 +105,7 @@
 .Sh OPTIONS
 The options are as follows:
 .Bl -tag -width Fl
-.It Fl i Ar iface Op Fl oa
+.It Fl i Ar iface Op Fl o
 Display the current settings of the specified WaveLAN/IEEE interface.
 This retrieves the current card settings from the driver and prints them
 out.
@@ -113,12 +113,7 @@
 .Fl o
 flag will cause
 .Nm
-to print out the statistics counters instead of the card settings. Using
-the additional
-.Fl a
-flag will cause
-.Nm
-to print out encryption keys as ascii characters instead of in hex.
+to print out the statistics counters instead of the card settings.
 Encryption keys are only displayed if wicontrol is run as root.
 .It Fl i Ar iface Fl t Ar tx rate
 Set the transmit rate of the specified interface.
Index: wicontrol.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/wicontrol/wicontrol.c,v
retrieving revision 1.13
diff -u -r1.13 wicontrol.c
--- wicontrol.c	2000/09/21 00:25:07	1.13
+++ wicontrol.c	2000/10/06 23:40:08
@@ -698,7 +698,7 @@
 	int			modifier = 0;
 
 	while((ch = getopt(argc, argv,
-	    "hoc:d:e:f:i:k:p:r:q:t:n:s:m:v:P:S:T:ZC")) != -1) {
+	    "a:hoc:d:e:f:i:k:p:r:q:t:n:s:m:v:P:S:T:ZC")) != -1) {
 		switch(ch) {
 		case 'Z':
 #ifdef WICACHE
@@ -781,6 +781,10 @@
 			break;
 		case 'P':
 			wi_setword(iface, WI_RID_PM_ENABLED, atoi(optarg));
+			exit(0);
+			break;
+		case 'a':
+			wi_setword(iface, WI_RID_SYSTEM_SCALE, atoi(optarg));
 			exit(0);
 			break;
 		case 'v':


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->wpaul 
Responsible-Changed-By: johan 
Responsible-Changed-When: Sat Oct 7 07:32:09 PDT 2000 
Responsible-Changed-Why:  
Over to wi maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=21803 

From: Brooks Davis <brooks@one-eyed-alien.net>
To: freebsd-bugs@freebsd.org
Cc: freebsd-gnats-submit@freebsd.org
Subject: Re: bin/21803: [PATCH] wicontrol's -a option mis-documented and not implemented
Date: Fri, 1 Jun 2001 20:45:03 -0700

 Below is an updated version of the patch that applies to a May 30th
 current.
 
 -- Brooks
 
 Index: wicontrol.8
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/wicontrol/wicontrol.8,v
 retrieving revision 1.21
 diff -u -r1.21 wicontrol.8
 --- wicontrol.8	2001/02/07 13:45:30	1.21
 +++ wicontrol.8	2001/06/02 03:42:52
 @@ -38,7 +38,7 @@
  .Nd configure WaveLAN/IEEE devices
  .Sh SYNOPSIS
  .Nm
 -.Fl i Ar iface Op Fl oa
 +.Fl i Ar iface Op Fl o
  .Nm
  .Fl i Ar iface Fl t Ar tx rate
  .Nm
 @@ -106,7 +106,7 @@
  .Sh OPTIONS
  The options are as follows:
  .Bl -tag -width Fl
 -.It Fl i Ar iface Op Fl oa
 +.It Fl i Ar iface Op Fl o
  Display the current settings of the specified WaveLAN/IEEE interface.
  This retrieves the current card settings from the driver and prints them
  out.
 @@ -114,12 +114,7 @@
  .Fl o
  flag will cause
  .Nm
 -to print out the statistics counters instead of the card settings. Using
 -the additional
 -.Fl a
 -flag will cause
 -.Nm
 -to print out encryption keys as ascii characters instead of in hex.
 +to print out the statistics counters instead of the card settings.
  Encryption keys are only displayed if wicontrol is run as root.
  .It Fl i Ar iface Fl t Ar tx rate
  Set the transmit rate of the specified interface.
 Index: wicontrol.c
 ===================================================================
 RCS file: /home/ncvs/src/usr.sbin/wicontrol/wicontrol.c,v
 retrieving revision 1.16
 diff -u -r1.16 wicontrol.c
 --- wicontrol.c	2001/01/09 00:50:45	1.16
 +++ wicontrol.c	2001/06/02 03:41:28
 @@ -715,7 +715,7 @@
  	opterr = 1;
  		
  	while((ch = getopt(argc, argv,
 -	    "hoc:d:e:f:i:k:p:r:q:t:n:s:m:v:P:S:T:ZC")) != -1) {
 +	    "a:hoc:d:e:f:i:k:p:r:q:t:n:s:m:v:P:S:T:ZC")) != -1) {
  		switch(ch) {
  		case 'Z':
  #ifdef WICACHE
 @@ -795,6 +795,10 @@
  			break;
  		case 'P':
  			wi_setword(iface, WI_RID_PM_ENABLED, atoi(optarg));
 +			exit(0);
 +			break;
 +		case 'a':
 +			wi_setword(iface, WI_RID_SYSTEM_SCALE, atoi(optarg));
  			exit(0);
  			break;
  		case 'v':
 
 -- 
 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
State-Changed-From-To: open->closed 
State-Changed-By: brooks 
State-Changed-When: Mon Jun 25 17:13:10 PDT 2001 
State-Changed-Why:  
Committed. 


Responsible-Changed-From-To: wpaul->brooks 
Responsible-Changed-By: brooks 
Responsible-Changed-When: Mon Jun 25 17:13:10 PDT 2001 
Responsible-Changed-Why:  
Handle my own PR. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=21803 
>Unformatted:
