Date: Sun, 3 Jul 2011 14:22:02 +0800 From: Adrian Chadd <adrian@freebsd.org> To: ss griffon <ssgriffonuser@gmail.com> Cc: freebsd-wireless@freebsd.org Subject: Re: Patch to move global ath alq register logging to per device Message-ID: <CAJ-VmonVbCK8LkezJ3vVFxb-QtSPLQgAT2EGmGLQpMQLNbpmhg@mail.gmail.com> In-Reply-To: <CAFYJ9egpYqwVp-g7g%2B5k_9Ex0JQZQid%2BKiC4DXYL3rCy8qGKPQ@mail.gmail.com> References: <CAFYJ9egpYqwVp-g7g%2B5k_9Ex0JQZQid%2BKiC4DXYL3rCy8qGKPQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi! Good work so far. Here's the problems I've found: * There's a couple of formatting problems, tabs where there shouldn't be, etc. That's no biggie, we can go over that later! * if_ath_sysctl.c doesn't "know" about the alq sysctl attach routine, because it doesn't include ah_osdep.h * ah_osdep.h should only be included by the HAL code, not by the sysctl attach routine code. The problem-that-isn't-a-problem: * the ALQ bits in the ath_hal struct aren't conditionally compiled based on the ALQ debug #define. But part of me wants to maintain a consistent public API regardless of what debug/non-debug options are compiled in. (I know that maintaining an ABI isn't so important these days however.) So let's leave it unconditionally compiled where it is, and we can potentially stuff it in ath_hal_private later on if needs be. I'm not sure about the "right" way of doing the sysctl attach. The sysctl attach routine should live in ah_osdep.c; the question is how do we export that as part of the HAL layer to the driver itself. We can't just include ah_osdep.h (and include opt_ah.h too) because that'd be breaking whatever resemblance of "layering" still exists in this driver. Perhaps what we should do is export the sysctl attach function in ath_hal/ah.h. (That's fine, as it just means it needs to exist in ah_osdep.c for whatever other OSes want to port this code over later.) For the non-ALQ case, we can just compile up an empty function. What do you think? Thanks, Adrian On 2 July 2011 14:03, ss griffon <ssgriffonuser@gmail.com> wrote: > This enables register logging for each ath device. =A0The default log > path is /tmp/ath_hal<dev_num>.log but can be changed with the sysctl > dev.ath.<dev_num>.hal.alq_logfile. =A0Let me know if there are any > issues. > > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g" > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonVbCK8LkezJ3vVFxb-QtSPLQgAT2EGmGLQpMQLNbpmhg>