[OpenWrt-Devel] Logging from Ath9k Code

Nimantha Baranasuriya nimanthab at gmail.com
Mon Feb 1 12:53:11 EST 2016

Hi Michal,

Thanks a lot for the info. So if I use ath_info(), the strings will get written to a log irrespective of whether I have switched on debugging or not, correct? Can I also please know to which log file ath_info() would write to and where it is located in the file system?

Thanks a lot,

> On 1 Feb 2016, at 11:05 PM, Michal <michal.cieslakiewicz at wp.pl> wrote:
> On Mon, 1 Feb 2016 19:58:39 +0530
> Nimantha Baranasuriya <nimanthab at gmail.com> wrote:
>> Hi,
>> I am trying to log the values of some variables in the ath9k driver
>> code in runtime. There are logging statements like ath_dbg(common,
>> QUEUE, "qnum: %d, txq_depth:%d\n") but I can't find where these logs
>> get written. I added printk statements to the code as well but
>> nothing gets written to dmesg. Can someone please help me to get this
>> resolved? Basically, my requirement is that I need to write to any
>> log file like syslog or dmesg from the driver code. Any tips on
>> getting this done would be very helpful.
>> Thank you in advance,
>> Nimantha
> Hello Nimantha,
> ath_dbg(), defined in drivers/net/wireless/ath/ath.h, works only if
> ath9k driver debugging is on (CPTCFG_ATH_DEBUG is defined). Otherwise it
> is an empty function and it is exactly how it works in standard build.
> I recommend to use similar functions defined there that put information
> in logs regardless of debug flags, for example ath_info().
> Have fun!
> Regards
> Michal
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list