Libertas Debug

From OLPC
Revision as of 15:48, 11 February 2008 by Carrano (talk | contribs) (New page: To enable debug on the wireless (libertas) driver you may write to the libertas_debug '/sys' file: echo <i>LBS_DEBUG_FLAGS</i> > /sys/module/libertas/parameters/libertas_debug You can ca...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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 NameFlag Hex valueDescription(*)
LBS_DEB_ENTER0x00000001function entrance
LBS_DEB_LEAVE0x00000002function exit
LBS_DEB_MAIN0x00000004main libertas library code
LBS_DEB_NET0x00000008interaction with network subsystem
LBS_DEB_MESH0x00000010wireless mesh network
LBS_DEB_WEXT0x00000020interaction with wireless extensions
LBS_DEB_IOCTL0x00000040misc IOCTLs
LBS_DEB_SCAN0x00000080scanning for APs
LBS_DEB_ASSOC0x00000100associating ton an AP
LBS_DEB_JOIN0x00000200joining an IBSS?
LBS_DEB_11D0x00000400802.11d country settings
LBS_DEB_DEBUGFS0x00000800interaction with the debugfs subsystem
LBS_DEB_ETHTOOL0x00001000interaction with ethtool subsystem
LBS_DEB_HOST0x00002000communication between host and wlan chip
LBS_DEB_CMD0x00004000command and response processing
LBS_DEB_RX0x00008000packet reception
LBS_DEB_TX0x00010000packet transmission
LBS_DEB_USB0x00020000interaction with USB subsystem
LBS_DEB_CS0x00040000interaction with card services subsystem
LBS_DEB_FW0x00080000firmware downloading
LBS_DEB_THREAD0x00100000main libertas worker thread
LBS_DEB_HEX0x00200000turn on detailed hex dumps
LBS_DEB_SDIO0x00400000interaction with SDIO subsystem
(*) 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.