diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-05-06 16:32:45 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-05-06 16:32:45 +0000 |
commit | 07346f9ac9fe802fcc05cd359908c49f1f272028 (patch) | |
tree | 15f4d90c511ecb7a88130a0dee59552c001f028c /usr.sbin/wicontrol | |
parent | 8b3db0e8228985fa682b3e2e72ab560619831fbc (diff) | |
download | FreeBSD-src-07346f9ac9fe802fcc05cd359908c49f1f272028.zip FreeBSD-src-07346f9ac9fe802fcc05cd359908c49f1f272028.tar.gz |
Modify wicontrol(8) and wi(4) to allow setting the frequency of the
WaveLAN's radio modem. The default is whatever the NIC uses since NICs
sold in different countries may default to different frequencies. (The
Lose95/LoseNT software doesn't let you select the channel so it's probably
not really meant to be changed.)
Diffstat (limited to 'usr.sbin/wicontrol')
-rw-r--r-- | usr.sbin/wicontrol/wicontrol.8 | 20 | ||||
-rw-r--r-- | usr.sbin/wicontrol/wicontrol.c | 10 |
2 files changed, 19 insertions, 11 deletions
diff --git a/usr.sbin/wicontrol/wicontrol.8 b/usr.sbin/wicontrol/wicontrol.8 index 629a9c7..03a96ee 100644 --- a/usr.sbin/wicontrol/wicontrol.8 +++ b/usr.sbin/wicontrol/wicontrol.8 @@ -59,6 +59,8 @@ .Fl i Ar iface Fl d Ar max data length .Nm wicontrol .Fl i Ar iface Fl r Ar RTS threshold +.Nm wicontrol +.Fl i Ar iface Fl f Ar frequency .Sh DESCRIPTION The .Nm @@ -79,14 +81,7 @@ The argument given to .Nm should be the logical interface name associated with the WaveLAN/IEEE -device (wi0, wi1, etc...). Interface parameters should only be changed -when the interface is down. If the interface is already up, you should -use the -.Xr ifconfig 8 -command to bring the interface down, then set the interface parameters -with -.Nm , -and then bring the interface up again. +device (wi0, wi1, etc...). .Sh OPTIONS The options are as follows: .Bl -tag -width Fl @@ -171,6 +166,15 @@ Set the RTS/CTS threshold for a given interface. This controls the number of bytes used for the RTS/CTS handhake boundary. The .Ar RTS threshold can be any value between 0 and 2047. The default is 2347. +.It Fl i Ar iface Fl f frequency +Specify the radio frequency to use for a given interface. There are +a small number of different channels available use in different geographical +areas. Known values are 3 (2422Mhz) for the United States, 11 (2422Mhz) +for France and 14 (2484Mhz) for Japan, however the NIC may accept any +channel number between 0 and 14. If an illegal channel is specified, the +NIC will revert to its default channel. For NIC sold in the United States, +the default channel is 3. Note that two stations must be +set to the same channel in order to communicate. .El .Sh SEE ALSO .Xr wi 4 , diff --git a/usr.sbin/wicontrol/wicontrol.c b/usr.sbin/wicontrol/wicontrol.c index 87cd90e..4bd0200 100644 --- a/usr.sbin/wicontrol/wicontrol.c +++ b/usr.sbin/wicontrol/wicontrol.c @@ -29,7 +29,7 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF * THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: wicontrol.c,v 1.15 1999/05/06 03:05:48 wpaul Exp $ + * $Id: wicontrol.c,v 1.16 1999/05/06 16:12:06 wpaul Exp $ */ #include <sys/types.h> @@ -56,7 +56,7 @@ static const char copyright[] = "@(#) Copyright (c) 1997, 1998, 1999\ Bill Paul. All rights reserved."; static const char rcsid[] = - "@(#) $Id: wicontrol.c,v 1.15 1999/05/06 03:05:48 wpaul Exp $"; + "@(#) $Id: wicontrol.c,v 1.16 1999/05/06 16:12:06 wpaul Exp $"; #endif static void wi_getval __P((char *, struct wi_req *)); @@ -438,7 +438,7 @@ int main(argc, argv) char *iface = NULL; char *p = argv[0]; - while((ch = getopt(argc, argv, "hoc:d:i:p:r:q:t:n:s:m:")) != -1) { + while((ch = getopt(argc, argv, "hoc:d:f:i:p:r:q:t:n:s:m:")) != -1) { switch(ch) { case 'o': wi_dumpstats(iface); @@ -455,6 +455,10 @@ int main(argc, argv) wi_setword(iface, WI_RID_MAX_DATALEN, atoi(optarg)); exit(0); break; + case 'f': + wi_setword(iface, WI_RID_OWN_CHNL, atoi(optarg)); + exit(0); + break; case 'p': wi_setword(iface, WI_RID_PORTTYPE, atoi(optarg)); exit(0); |