Patch to move global ath alq register logging to per device

Adrian Chadd adrian at freebsd.org
Sun Jul 3 06:22:04 UTC 2011


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 at gmail.com> wrote:
> This enables register logging for each ath device.  The default log
> path is /tmp/ath_hal<dev_num>.log but can be changed with the sysctl
> dev.ath.<dev_num>.hal.alq_logfile.  Let me know if there are any
> issues.
>
> _______________________________________________
> freebsd-wireless at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscribe at freebsd.org"
>
>


More information about the freebsd-wireless mailing list