NOTE: this page is for archival only, see the note at the end of the page.

Go back –> Main ath9k driver page

ath9k debugging

This page documents the ath9k debugging facilities available.

Enabling debug

If you have issues with ath9k you can enable debug in ath9k. You will first need to enable the Kconfig option (CONFIG_ATH_DEBUG):

Device Drivers  --->
  [*] Network device support  --->
        Wireless LAN  --->
          <M>   Atheros Wireless Cards  --->
                [*] Atheros wireless debugging

Then you can use the module parameter debug. We cover below the different available debug levels you can use.

enum ATH_DEBUG {
        ATH_DBG_RESET           = 0x00000001,
        ATH_DBG_QUEUE           = 0x00000002,
        ATH_DBG_EEPROM          = 0x00000004,
        ATH_DBG_CALIBRATE       = 0x00000008,
        ATH_DBG_INTERRUPT       = 0x00000010,
        ATH_DBG_REGULATORY      = 0x00000020,
        ATH_DBG_ANI             = 0x00000040,
        ATH_DBG_XMIT            = 0x00000080,
        ATH_DBG_BEACON          = 0x00000100,
        ATH_DBG_CONFIG          = 0x00000200,
        ATH_DBG_FATAL           = 0x00000400,
        ATH_DBG_PS              = 0x00000800,
        ATH_DBG_HWTIMER         = 0x00001000,
        ATH_DBG_BTCOEX          = 0x00002000,
        ATH_DBG_ANY             = 0xffffffff
};

If you want to debug calibration (0x00000008) and resets (0x00000001) for example you would use (0x00000008 | 0x00000001) = 0x00000009. To debug everything just use 0xffffffff. Below is an example of how to enable debug for just configuration changes:

modprobe ath9k debug=0x00000200

You can also use modprobe.d configuration files, for example to enable ATH_DBG_CONFIG (0x00000200) and ATH_DBG_PS (0x00000800) you would have a file /etc/modprobe.d/atheros.conf with this:

options ath9k debug=0xa00

Debugfs files

ath9k has several debugfs files which you can query for information and some which allow you to insert data. This can be enabled as:

Device Drivers  --->
  [*] Network device support  --->
        Wireless LAN  --->
          <M>   Atheros Wireless Cards  --->
                [M] Atheros 802.11n wireless cards support
                [*]   Atheros ath9k debugging

To get debugfs you will need to mount it first. You can do so as follows:

mount -t debugfs debugfs /sys/kernel/debug/

Below we document each debugfs file entry specific to ath9k.

debug

/sys/kernel/debug/ath9k/phy1/debug

This lets you change the current driver debug level which you would normally initialize during driver probe using the debug module parameter.

dma

/sys/kernel/debug/ath9k/phy0/dma

interrupt

/sys/kernel/debug/ath9k/phy0/interrupt

Interrupt statistics.

rcstat

/sys/kernel/debug/ath9k/phy0/rcstat

Displays statistics about rates used, PER, retries and excessive retries.

wiphy

/sys/kernel/debug/ath9k/phy0/wiphy

xmit

/sys/kernel/debug/ath9k/phy0/xmit

TX frame statistics.

recv

/sys/kernel/debug/ath9k/phy0/recv

RX Error statistics.


This is a static dump of the old wiki, taken after locking it in January 2015. The new wiki is at https://wireless.wiki.kernel.org/.
versions of this page: last, v19, v18, v17, v16, v15, v14, v13, v12, v11, v10, v9, v8, v7, v6, v5, v4, v3, v2, v1