Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

ath_info

ath_info is a tool to get detailled information about the hardware. Since the output of lspci and the dmesg information provided by the HAL is not always sufficient to correctly identify chipset versions we appreciate ath_info output to be attached to bug reports, for both ath5k and madwifi - especially the first few lines which identify the chipsets are important:

Here is an example:

# ath_info 0xa0010000

 -==Device Information==-
MAC Version:  5212  (0x50)
MAC Revision: 5213  (0x56)
Device type:  3
5Ghz PHY Revision: 5111  (0x17)
2Ghz PHY Revision: 2111  (0x23)

/============== EEPROM Information =============\
| EEPROM Version:   3.4 | EEPROM Size:  16 kbit |
| EEMAP:              0 | Reg. Domain:     0x00 |
|================= Capabilities ================|
| 802.11a Support:  yes | Turboa disabled:  no  |
| 802.11b Support:  yes | Turbog disabled:  no  |
| 802.11g Support:  yes | 2GHzXR disabled:  no  |
| RFKill  Support:  no  | 5GHzXR disabled:  no  |
| 32KHz   Crystal:  no  |                       |
\===============================================/

There is more output which helps us in the development of ath5k:

/=========================================================\
|          Calibration data common for all modes          |
|=========================================================|
|          CCK/OFDM gain delta:            00             |
|          CCK/OFDM power delta:           15             |
|          Scaled CCK delta:               00             |
|          2Ghz Antenna gain:              00             |
|          5Ghz Antenna gain:              00             |
|          Turbo 2W maximum dbm:           32             |
|          Target power start:             000            |
|          EAR Start:                      000            |
\=========================================================/

/=========================================================\
|          Calibration data for 802.11a operation         |
|=========================================================|
| I power:              0x00 | Q power:              0x00 |
| Use fixed bias:       0x00 | Max turbo power:      0x20 |
| Max XR power:         0x00 | Switch Settling Time: 0x2d |
| Tx/Rx attenuation:    0x07 | TX end to XLNA On:    0x02 |
| TX end to XPA Off:    0x00 | TX end to XPA On:     0x0e |
| 62db Threshold:       0x0f | XLNA gain:            0x0d |
| XPD:                  0x01 | XPD gain:             0x0d |
| I gain:               0x0a | Tx/Rx margin:         0x00 |
| False detect backoff: 0x07 | Noise Floor Threshold: -54 |
| ADC desired size:      -32 | PGA desired size:      -80 |
|=========================================================|
| Antenna control   0:  0x00 | Antenna control   1:  0x01 |
| Antenna control   2:  0x22 | Antenna control   3:  0x02 |
| Antenna control   4:  0x22 | Antenna control   5:  0x02 |
| Antenna control   6:  0x02 | Antenna control   7:  0x21 |
| Antenna control   8:  0x01 | Antenna control   9:  0x21 |
| Antenna control  10:  0x01 | Antenna control  11:  0x00 |
|=========================================================|
| Octave Band 0:           1 | db 0:                    2 |
| Octave Band 1:           1 | db 1:                    2 |
| Octave Band 2:           1 | db 2:                    2 |
| Octave Band 3:           1 | db 3:                    2 |
\=========================================================/
/=================== Per channel power calibration ====================\
| Freq | pwr_0 | pwr_1 | pwr_2 | pwr_3 |pwrx3_0|pwrx3_1|pwrx3_2|max_pwr|
|      | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5230 |  0.00 | 63.01 | 20.01 | 51.00 | 18.01 | 34.02 | 41.00 | 51.00 |
|      | [167] | [198] | [222] | [227] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5170 |  0.01 | 63.01 | 21.01 | 35.00 | 22.01 | 34.02 | 42.00 | 35.00 |
|      | [168] | [168] | [195] | [204] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5400 |  0.02 | 63.01 | 22.01 | 19.02 | 22.01 | 35.02 | 42.00 | 19.02 |
|      | [233] | [233] | [260] | [269] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5300 |  0.02 | 63.01 | 21.01 | 19.01 | 18.01 | 35.02 | 41.00 | 19.01 |
|      | [168] | [169] | [198] | [211] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5650 |  8.02 | 63.01 | 23.01 | 36.00 | 18.01 | 34.02 | 40.00 | 36.00 |
|      | [103] | [134] | [160] | [169] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5500 |  8.03 | 63.01 | 23.01 |  4.00 | 14.01 | 33.02 | 39.00 |  4.00 |
|      |  [38] |  [69] |  [97] | [110] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5825 |  8.02 | 63.01 | 22.01 | 19.03 | 10.01 | 33.02 | 39.00 | 19.03 |
|      |  [37] |  [67] |  [93] |  [98] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5725 |  0.00 | 63.01 | 20.01 | 50.03 | 10.01 | 32.02 | 40.00 | 50.03 |
|      |  [38] |  [69] |  [93] |  [98] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5825 |  0.00 | 63.01 | 20.01 | 50.03 | 10.01 | 32.02 | 40.00 | 50.03 |
|      |  [38] |  [69] |  [93] |  [98] |  [20] |  [35] |  [63] |       |
|======|=======|=======|=======|=======|=======|=======|=======|=======|
| 5825 |  0.00 | 63.01 | 20.01 | 50.03 | 10.01 | 32.02 | 40.00 | 50.03 |
|      |  [38] |  [69] |  [93] |  [98] |  [20] |  [35] |  [63] |       |
\======================================================================/

/=========================================================\
|          Calibration data for 802.11b operation         |
|=========================================================|
| I power:              0x00 | Q power:              0x00 |
| Use fixed bias:       0x00 | Max turbo power:      0x00 |
| Max XR power:         0x00 | Switch Settling Time: 0x23 |
| Tx/Rx attenuation:    0x0f | TX end to XLNA On:    0x02 |
| TX end to XPA Off:    0x00 | TX end to XPA On:     0x07 |
| 62db Threshold:       0x1c | XLNA gain:            0x0d |
| XPD:                  0x01 | XPD gain:             0x0b |
| I gain:               0x0a | Tx/Rx margin:         0x00 |
| False detect backoff: 0x00 | Noise Floor Threshold:  -1 |
| ADC desired size:      -38 | PGA desired size:      -80 |
|=========================================================|
| Antenna control   0:  0x00 | Antenna control   1:  0x08 |
| Antenna control   2:  0x14 | Antenna control   3:  0x04 |
| Antenna control   4:  0x10 | Antenna control   5:  0x00 |
| Antenna control   6:  0x04 | Antenna control   7:  0x18 |
| Antenna control   8:  0x08 | Antenna control   9:  0x10 |
| Antenna control  10:  0x00 | Antenna control  11:  0x00 |
|=========================================================|
| Octave Band 0:           4 | db 0:                    4 |
| Octave Band 1:           2 | db 1:                    2 |
| Octave Band 2:           0 | db 2:                    0 |
| Octave Band 3:           0 | db 3:                    0 |
\=========================================================/
/=================== Per channel power calibration ====================\
| Freq | pwr_0 | pwr_1 | pwr_2 | pwr_3 |pwrx3_0|pwrx3_1|pwrx3_2|max_pwr|
|      | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac |       |
\======================================================================/

/=========================================================\
|          Calibration data for 802.11g operation         |
|=========================================================|
| I power:              0x00 | Q power:              0x00 |
| Use fixed bias:       0x00 | Max turbo power:      0x00 |
| Max XR power:         0x00 | Switch Settling Time: 0x2d |
| Tx/Rx attenuation:    0x0f | TX end to XLNA On:    0x02 |
| TX end to XPA Off:    0x00 | TX end to XPA On:     0x0e |
| 62db Threshold:       0x1c | XLNA gain:            0x0d |
| XPD:                  0x01 | XPD gain:             0x0b |
| I gain:               0x0a | Tx/Rx margin:         0x00 |
| False detect backoff: 0x00 | Noise Floor Threshold:  -1 |
| ADC desired size:      -32 | PGA desired size:      -80 |
|=========================================================|
| Antenna control   0:  0x00 | Antenna control   1:  0x08 |
| Antenna control   2:  0x14 | Antenna control   3:  0x04 |
| Antenna control   4:  0x10 | Antenna control   5:  0x00 |
| Antenna control   6:  0x04 | Antenna control   7:  0x18 |
| Antenna control   8:  0x08 | Antenna control   9:  0x10 |
| Antenna control  10:  0x00 | Antenna control  11:  0x01 |
|=========================================================|
| Octave Band 0:           3 | db 0:                    3 |
| Octave Band 1:           2 | db 1:                    2 |
| Octave Band 2:           0 | db 2:                    0 |
| Octave Band 3:           0 | db 3:                    0 |
\=========================================================/
/=================== Per channel power calibration ====================\
| Freq | pwr_0 | pwr_1 | pwr_2 | pwr_3 |pwrx3_0|pwrx3_1|pwrx3_2|max_pwr|
|      | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac | pcdac |       |
\======================================================================/

GPIO registers: CR 0x00000000, DO 0x00000000, DI 0x00000005
STA_ID0: fe:f8:36:68:c9:35
STA_ID1: 0x000035c9, AP: 0, IBSS: 0, KeyCache Disable: 0
TIMER0: 0x00000000, TBTT:     0, TU: 0x00000000
TIMER1: 0x00000000, DMAb:     0, TU: 0x00000000 (0)
TIMER2: 0x00000000, SWBA:     0, TU: 0x00000000 (0)
TIMER3: 0x00000000, ATIM:     0, TU: 0x00000000 (0)
TSF: 0x0000000000000000, TSFTU:     0, TU: 0x00000000
BEACON: 0x003ed7ff
LAST_TSTP: 0xf6f5df66

Building ath_info

Now ath_info is maintained independently from madwifi:

svn co http://madwifi-project.org/svn/ath_info/trunk ath_info
cd ath_info/
make

Using ath_info

You have to tell ath_info the memory address it should operate on. This is the memory address of the Atheros card shown by lspci -v. Or just use the following script fragment:

athmem=`lspci -vd 168c: |sed -n 's/.*Memory at \([^ ]*\).*/0x\1/p'`
ath_info $athmem

Advanced Usage

ath_info can do more than that. check with ath_info -h:

ath_info [-w [-g N:M]] [-v] [-f] [-d] [-R addr] [-W addr val] <base_address> [<name1> <val1> [<name2> <val2> ...]]

-w      write values into EEPROM
-g N:M  set GPIO N to level M (only used with -w)
-v      verbose output
-f      force; suppress question before writing
-d      dump eeprom (file 'ath-eeprom-dump.bin' and screen)
-R <addr>       read register at <addr> (hex)
-W <addr> <val> write <val> (hex) into register at <addr> (hex)
<base_address>  device base address (see lspci output)

- read info:
  ath_info <base_address>

- set regdomain to N:
  ath_info -w <base_address> regdomain N

- set a PCI id field to value N:
  ath_info -w <base_address> <field> N
  where <field> is on of:
     pci_dev_id pci_vendor_id pci_class pci_rev_id pci_subsys_dev_id pci_subsys_vendor_id regdomain

You may need to set a GPIO to a certain value in order to enable
writing to the EEPROM with newer chipsets, e.g. set GPIO 4 to low:
  ath_info -g 4:0 -w <base_address> regdomain N

DISCLAIMER: The authors are not responsible for any damages caused by
this program. Writing improper values may damage the card or cause
unlawful radio transmissions!