Libertas Debug: Difference between revisions

From OLPC
Jump to navigation Jump to search
(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...)
 
m (categorize)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
<noinclude>[[Category:Hardware]]
[[Category:Network]]
</noinclude>
To enable debug on the wireless (libertas) driver you may write to the libertas_debug '/sys' file:
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
echo <i>LBS_DEBUG_FLAGS</i> > /sys/module/libertas/parameters/libertas_debug
Line 29: Line 32:
<tr><td>LBS_DEB_HEX</td><td>0x00200000<td>turn on detailed hex dumps</td></tr>
<tr><td>LBS_DEB_HEX</td><td>0x00200000<td>turn on detailed hex dumps</td></tr>
<tr><td>LBS_DEB_SDIO</td><td>0x00400000<td>interaction with SDIO subsystem</td></tr>
<tr><td>LBS_DEB_SDIO</td><td>0x00400000<td>interaction with SDIO subsystem</td></tr>
<tr><td>LBS_DEB_SYSFS</td><td>0x00800000<td></td></tr>
<tr><td>LBS_DEB_SPI</td><td>0x01000000<td></td></tr>
<tr><td>LBS_DEB_CFG80211</td><td>0x02000000<td></td></tr>
<tr><td colspan=3>(*) Description taken from [http://git.infradead.org/?p=users/schurig/libertas-tools.git;a=blob_plain;f=lbsdebug/lbsdebug.c;hb=master lbsdebug.c] (by Holger Schurig)</td></tr>
<tr><td colspan=3>(*) Description taken from [http://git.infradead.org/?p=users/schurig/libertas-tools.git;a=blob_plain;f=lbsdebug/lbsdebug.c;hb=master lbsdebug.c] (by Holger Schurig)</td></tr>
</table>
</table>

Latest revision as of 14:24, 7 February 2014


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
LBS_DEB_SYSFS0x00800000
LBS_DEB_SPI0x01000000
LBS_DEB_CFG802110x02000000
(*) 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.