1.\"- 2.\" Copyright (c) 2002-2009 Sam Leffler, Errno Consulting 3.\" All rights reserved. 4.\"" 5.\" Redistribution and use in source and binary forms, with or without 6.\" modification, are permitted provided that the following conditions 7.\" are met: 8.\" 1. Redistributions of source code must retain the above copyright 9.\" notice, this list of conditions and the following disclaimer, 10.\" without modification. 11.\" 2. Redistributions in binary form must reproduce at minimum a disclaimer 12.\" similar to the "NO WARRANTY" disclaimer below ("Disclaimer") and any 13.\" redistribution must be conditioned upon including a substantially 14.\" similar Disclaimer requirement for further binary redistribution. 15.\" 16.\" NO WARRANTY 17.\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19.\" LIMITED TO, THE IMPLIED WARRANTIES OF NONINFRINGEMENT, MERCHANTIBILITY 20.\" AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21.\" THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, 22.\" OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 25.\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 27.\" THE POSSIBILITY OF SUCH DAMAGES. 28.\" 29.\" $FreeBSD$ 30.\"/ 31.Dd January 27, 2009 32.Dt ATHRD 1 33.Os 34.Sh NAME 35.Nm athrd 36.Nd list channels and transmit power for a country/regulatory domain 37.Sh SYNOPSIS 38.Nm 39.Op Fl aedlpcfr4ABGT 40.Op Fl m Ar mode 41.Bk 42.Op Ar country 43.Ek 44.Sh DESCRIPTION 45.Nm 46displays the list of frequencies and the associated maximum transmit 47power permitted within a regulatory domain and/or country. 48.Pp 49If no command line options are given, a default country (\c 50.Ql US ) 51is used. 52Country and regulatory names are case insensitive. 53.Pp 54The following options are available: 55.Bl -tag -width indent 56.It Fl a 57By default 58.Nm 59will display B channels only if they are not also marked as available for 60use as G channels and similary for A and T channels. 61With this option 62.Nm 63will list all channels. 64.It Fl e 65Calculate channels not assuming extended channel mode. 66.It Fl d 67Enabling debugging in the HAL code that calculates the available channels 68and transmit power values. 69.It Fl l 70Provide a list of all known country and regulatory domain names. 71.It Fl m Ar mode 72Calculate channels and transmit power for operation in 73.Ql mode ; 74one of 75.Ql station , 76.Ql ibss , 77.Ql monitor , 78and 79.Ql ap 80(or the first two letters). 81.It Fl p 82Mark passive scan channels with lower case letters and active 83scan channels with upper case letters. 84.It Fl r 85Mark channels that require DFS with a 86.Ql * . 87.It Fl 4 88Mark channels that have a 4ms packet limit with a 89.Ql 4 . 90.It Fl c 91Display IEEE channel numbers instead of frequencies. 92.It Fl f 93Display frequencies (default). 94.It Fl A 95Display only 11A channels. 96.It Fl B 97Display only 11B channels. 98.It Fl G 99Display only 11G channels. 100.It Fl T 101Display only Turbo channels. 102.El 103.Sh EXAMPLES 104The following demonstrates how to list the permissible frequencies 105and maximum transport power per channel for use in Spain: 106.Bd -literal -offset 2n 107.Li # Ic athrd es 108SPAIN (ES, 0x2d4, 724) NULL1_WORLD (0x3, 3) 1092412G 14.0 2417G 14.0 2422G 14.0 2427G 17.0 2432G 14.0 2437G 17.0 1102442G 14.0 2447G 17.0 2452G 17.0 2457G 14.0 2462G 17.0 111.Ed 112.Pp 113Each frequency has a suffix that is one of: 114.Ql G , 115.Ql B , 116.Ql A , 117or 118.Ql T 119according to whether the channel is usable with 802.11g, 802.11b, 120802.11a, or Atheros Turbo mode. 121All channels listed as 122.Ql G 123are also usable in 124.Ql B . 125Likewise, all channels listed as 126.Ql A 127are usable in 128.Ql T . 129Channels listed as 130.Ql B 131or 132.Ql T 133are only usable in those modes. 134(Note that when the 135.Fl p 136option is specified passive scan channels are marked with a lower case 137.Ql g , 138.Ql b , 139.Ql a , 140or 141.Ql t .) 142The transmit power is given in units of dbM. 143.Sh DIAGNOSTICS 144Various diagnostics about unknown regulatory domains and/or country 145codes may be encountered. 146Use the 147.Fl l 148option for a list of valid names. 149.Sh SEE ALSO 150.Xr ath 4 , 151.Xr ath_hal 4 152.Sh STANDARDS 153Lots belong here. 154.Sh NOTES 155.Nm 156use the HAL to calculate the set of channels. 157The transmit power calculations are done by emulating 158how the HAL works. 159Because 160.Nm 161does not 162read the actual EEPROM contents from a device this emulation may lag 163behind current practice. 164.Sh BUGS 165The HAL reset logic should be used to calculate the transmit power 166for each channel instead of using a separate copy of the code. 167The data presented by 168.Nm 169are the expected values; for compliance testing one must measure the actual 170operation of the driver and the HAL. 171