Thanks to Bruno's patches. Thanks Luis for helping me to set up debugs. Debug is working for me. I am debugging on scan problem.
thanks, Jagadish Luis R. Rodriguez wrote: > On Dec 1, 2007 9:02 AM, Jagadish <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> Is there a way to enable debugs dynamically in ath5k? Like we have >> 80211debug in madwifi for doing this. If not How to enable debugs in >> ath5k driver? >> > > Thanks to Bruno's patches that add debugfs for ath5k, yes. You might > as well apply all his 5-patch series as these will be committed soon > anyway. He posted them on linux-wireless, however if you want you can > just get them from here: > > http://www.kernel.org/pub/linux/kernel/people/mcgrof/patches/ath5k/bruno/debugfs-add/ > > You can apply these with patch -p1 onto your kernel sources or the > compat package. > > Be sure first to modify the define for ATH5K_DEBUG to 1 in debug.h > before compiling. This later will be moved to a Kconfig option. > > You must mount debugfs first. You can do this like this: > > sudo mkdir /debug/ > sudo mount -t debugfs debug /debug/ > > After compiling and loading you should see: > > /debug/ath5k/phy0/debug > > You can echo into this file any of these values: > > /** > * enum ath5k_debug_level - ath5k debug level > * > * @ATH5K_DEBUG_RESET: reset processing > * @ATH5K_DEBUG_INTR: interrupt handling > * @ATH5K_DEBUG_MODE: mode init/setup > * @ATH5K_DEBUG_XMIT: basic xmit operation > * @ATH5K_DEBUG_BEACON: beacon handling > * @ATH5K_DEBUG_BEACON_PROC: beacon ISR proc > * @ATH5K_DEBUG_CALIBRATE: periodic calibration > * @ATH5K_DEBUG_TXPOWER: transmit power setting > * @ATH5K_DEBUG_LED: led management > * @ATH5K_DEBUG_DUMP_RX: print received skb content > * @ATH5K_DEBUG_DUMP_TX: print transmit skb content > * @ATH5K_DEBUG_DUMPMODES: dump modes > * @ATH5K_DEBUG_TRACE: trace function calls > * @ATH5K_DEBUG_FATAL: fatal errors > * @ATH5K_DEBUG_ANY: show at any debug level > * > * The debug level is used to control the amount and type of debugging output > * we want to see. The debug level is given in calls to ATH5K_DBG to specify > * where the message should appear, and the user can control the debugging > * messages he wants to see, either by the module parameter 'debug' on module > * load, or dynamically by using debugfs 'ath5k/phyX/debug'. these levels can > * be combined together by bitwise OR. > */ > enum ath5k_debug_level { > ATH5K_DEBUG_RESET = 0x00000001, > ATH5K_DEBUG_INTR = 0x00000002, > ATH5K_DEBUG_MODE = 0x00000004, > ATH5K_DEBUG_XMIT = 0x00000008, > ATH5K_DEBUG_BEACON = 0x00000010, > ATH5K_DEBUG_BEACON_PROC = 0x00000020, > ATH5K_DEBUG_CALIBRATE = 0x00000100, > ATH5K_DEBUG_TXPOWER = 0x00000200, > ATH5K_DEBUG_LED = 0x00000400, > ATH5K_DEBUG_DUMP_RX = 0x00001000, > ATH5K_DEBUG_DUMP_TX = 0x00002000, > ATH5K_DEBUG_DUMPMODES = 0x00004000, > ATH5K_DEBUG_TRACE = 0x00010000, > ATH5K_DEBUG_FATAL = 0x80000000, > ATH5K_DEBUG_ANY = 0xffffffff > }; > > For example: > > [EMAIL PROTECTED]:~$ sudo cat /debug/ath5k/phy0/debug > 0 > > [EMAIL PROTECTED]:~$ sudo echo 0x00000100 > /debug/ath5k/phy0/debug > > [EMAIL PROTECTED]:~$ sudo cat /debug/ath5k/phy0/debug > 256 > > I'll add this to the wiki. It'll be easier to just add the kdoc output > to the ath5k wiki entry. I'll work on this as well as that was the > idea. > > Luis > > _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel