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

Go back –> Main ath9k driver page

ath9k and ath9k_htc debugging

This page documents the debugging facilities available for ath9k and ath9k_htc

Enabling debug

If you have issues with ath9k or ath9k_htc you can enable debug. 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_BTCOEX          = 0x00001000,
        ATH_DBG_WMI             = 0x00002000,
        ATH_DBG_BSTUCK          = 0x00004000,
        ATH_DBG_MCI             = 0x00008000,
        ATH_DBG_DFS             = 0x00010000,
        ATH_DBG_WOW             = 0x00020000,
        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 (or) modprobe ath9k_htc 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 (or) options ath9k_htc debug=0xa00

Debugfs files for ath9k

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

Debugfs files for ath9k_htc

ath9k_htc has a few debugfs files which show driver statistics. Enable it as:

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

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

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

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