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.Dd January 27, 2009 30.Dt ATHRD 1 31.Os 32.Sh NAME 33.Nm athrd 34.Nd list channels and transmit power for a country/regulatory domain 35.Sh SYNOPSIS 36.Nm 37.Op Fl aedlpcfr4ABGT 38.Op Fl m Ar mode 39.Bk 40.Op Ar country 41.Ek 42.Sh DESCRIPTION 43.Nm 44displays the list of frequencies and the associated maximum transmit 45power permitted within a regulatory domain and/or country. 46.Pp 47If no command line options are given, a default country (\c 48.Ql US ) 49is used. 50Country and regulatory names are case insensitive. 51.Pp 52The following options are available: 53.Bl -tag -width indent 54.It Fl a 55By default 56.Nm 57will display B channels only if they are not also marked as available for 58use as G channels and similary for A and T channels. 59With this option 60.Nm 61will list all channels. 62.It Fl e 63Calculate channels not assuming extended channel mode. 64.It Fl d 65Enabling debugging in the HAL code that calculates the available channels 66and transmit power values. 67.It Fl l 68Provide a list of all known country and regulatory domain names. 69.It Fl m Ar mode 70Calculate channels and transmit power for operation in 71.Ql mode ; 72one of 73.Ql station , 74.Ql ibss , 75.Ql monitor , 76and 77.Ql ap 78(or the first two letters). 79.It Fl p 80Mark passive scan channels with lower case letters and active 81scan channels with upper case letters. 82.It Fl r 83Mark channels that require DFS with a 84.Ql * . 85.It Fl 4 86Mark channels that have a 4ms packet limit with a 87.Ql 4 . 88.It Fl c 89Display IEEE channel numbers instead of frequencies. 90.It Fl f 91Display frequencies (default). 92.It Fl A 93Display only 11A channels. 94.It Fl B 95Display only 11B channels. 96.It Fl G 97Display only 11G channels. 98.It Fl T 99Display only Turbo channels. 100.El 101.Sh EXAMPLES 102The following demonstrates how to list the permissible frequencies 103and maximum transport power per channel for use in Spain: 104.Bd -literal -offset 2n 105.Li # Ic athrd es 106SPAIN (ES, 0x2d4, 724) NULL1_WORLD (0x3, 3) 1072412G 14.0 2417G 14.0 2422G 14.0 2427G 17.0 2432G 14.0 2437G 17.0 1082442G 14.0 2447G 17.0 2452G 17.0 2457G 14.0 2462G 17.0 109.Ed 110.Pp 111Each frequency has a suffix that is one of: 112.Ql G , 113.Ql B , 114.Ql A , 115or 116.Ql T 117according to whether the channel is usable with 802.11g, 802.11b, 118802.11a, or Atheros Turbo mode. 119All channels listed as 120.Ql G 121are also usable in 122.Ql B . 123Likewise, all channels listed as 124.Ql A 125are usable in 126.Ql T . 127Channels listed as 128.Ql B 129or 130.Ql T 131are only usable in those modes. 132(Note that when the 133.Fl p 134option is specified passive scan channels are marked with a lower case 135.Ql g , 136.Ql b , 137.Ql a , 138or 139.Ql t .) 140The transmit power is given in units of dbM. 141.Sh DIAGNOSTICS 142Various diagnostics about unknown regulatory domains and/or country 143codes may be encountered. 144Use the 145.Fl l 146option for a list of valid names. 147.Sh SEE ALSO 148.Xr ath 4 , 149.Xr ath_hal 4 150.Sh STANDARDS 151Lots belong here. 152.Sh NOTES 153.Nm 154use the HAL to calculate the set of channels. 155The transmit power calculations are done by emulating 156how the HAL works. 157Because 158.Nm 159does not 160read the actual EEPROM contents from a device this emulation may lag 161behind current practice. 162.Sh BUGS 163The HAL reset logic should be used to calculate the transmit power 164for each channel instead of using a separate copy of the code. 165The data presented by 166.Nm 167are the expected values; for compliance testing one must measure the actual 168operation of the driver and the HAL. 169