Libertas Debug
Jump to navigation
Jump to search
To enable debug on the wireless (libertas) driver you may write to the libertas_debug '/sys' file:
echo LBS_DEBUG_FLAGS > /sys/module/libertas/parameters/libertas_debug
You can calculate the value for LBS_DEBUG_FLAGS using the table bellow (just add up the values for the flags you want to activate).
Debug Flag Name | Flag Hex value | Description(*) |
---|---|---|
LBS_DEB_ENTER | 0x00000001 | function entrance |
LBS_DEB_LEAVE | 0x00000002 | function exit |
LBS_DEB_MAIN | 0x00000004 | main libertas library code |
LBS_DEB_NET | 0x00000008 | interaction with network subsystem |
LBS_DEB_MESH | 0x00000010 | wireless mesh network |
LBS_DEB_WEXT | 0x00000020 | interaction with wireless extensions |
LBS_DEB_IOCTL | 0x00000040 | misc IOCTLs |
LBS_DEB_SCAN | 0x00000080 | scanning for APs |
LBS_DEB_ASSOC | 0x00000100 | associating ton an AP |
LBS_DEB_JOIN | 0x00000200 | joining an IBSS? |
LBS_DEB_11D | 0x00000400 | 802.11d country settings |
LBS_DEB_DEBUGFS | 0x00000800 | interaction with the debugfs subsystem |
LBS_DEB_ETHTOOL | 0x00001000 | interaction with ethtool subsystem |
LBS_DEB_HOST | 0x00002000 | communication between host and wlan chip |
LBS_DEB_CMD | 0x00004000 | command and response processing |
LBS_DEB_RX | 0x00008000 | packet reception |
LBS_DEB_TX | 0x00010000 | packet transmission |
LBS_DEB_USB | 0x00020000 | interaction with USB subsystem |
LBS_DEB_CS | 0x00040000 | interaction with card services subsystem |
LBS_DEB_FW | 0x00080000 | firmware downloading |
LBS_DEB_THREAD | 0x00100000 | main libertas worker thread |
LBS_DEB_HEX | 0x00200000 | turn on detailed hex dumps |
LBS_DEB_SDIO | 0x00400000 | interaction with SDIO subsystem |
LBS_DEB_SYSFS | 0x00800000 | |
LBS_DEB_SPI | 0x01000000 | |
LBS_DEB_CFG80211 | 0x02000000 | |
(*) Description taken from lbsdebug.c (by Holger Schurig) |
Example:
To activate scanning (LBS_DEB_SCAN), associating (LBS_DEB_ASSOC), command (LBS_DEB_CMD) and host (LBS_DEB_HOST):
echo 0x6180 > /sys/module/libertas/parameters/libertas_debug
The output will be post to the kernel ring buffer. You can display it with the dmesg command:
dmesg
You can also use the lbsdebug tool, from Holger Shurig, git tree available here.