diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2012-11-16 19:39:29 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2012-11-16 19:39:29 +0000 |
commit | 956d4fb965105398042a0b34a24e257c3abd14cf (patch) | |
tree | 4096dc339a4452c0f2c11569fe929edac020a0df /sys/dev/ath/if_ath_alq.h | |
parent | 325c8c46b17fcfb54f4ed540b32cf8d49c9b13ca (diff) | |
download | src-956d4fb965105398042a0b34a24e257c3abd14cf.tar.gz src-956d4fb965105398042a0b34a24e257c3abd14cf.zip |
ath(4) ALQ logging improvements.
* Add a new method which allows the driver to push the MAC/phy/hal info
into the logging stream.
* Add a new ALQ logging entry which logs the mac/phy/hal information.
* Modify the ALQ startup path to log the MAC/phy/hal information
so the decoder knows which HAL/chip is generating this information.
* Convert the header and mac/phy/hal information to use be32, rather than
host order. I'd like to make this stuff endian-agnostic so I can
decode MIPS generated logs on a PC.
This requires some further driver modifications to correctly log the
right initial chip information.
Also - although noone bar me is currently using this, I've shifted the
debug bitmask around a bit. Consider yourself warned!
Notes
Notes:
svn path=/head/; revision=243158
Diffstat (limited to 'sys/dev/ath/if_ath_alq.h')
-rw-r--r-- | sys/dev/ath/if_ath_alq.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/sys/dev/ath/if_ath_alq.h b/sys/dev/ath/if_ath_alq.h index aeee12c75726..2720e6329a2d 100644 --- a/sys/dev/ath/if_ath_alq.h +++ b/sys/dev/ath/if_ath_alq.h @@ -31,6 +31,23 @@ #ifndef __IF_ATH_ALQ_H__ #define __IF_ATH_ALQ_H__ +#define ATH_ALQ_INIT_STATE 1 +struct if_ath_alq_init_state { + uint32_t sc_mac_version; + uint32_t sc_mac_revision; + uint32_t sc_phy_rev; + uint32_t sc_hal_magic; +}; + +#define ATH_ALQ_EDMA_TXSTATUS 2 +#define ATH_ALQ_EDMA_RXSTATUS 3 +#define ATH_ALQ_EDMA_TXDESC 4 + +/* + * These will always be logged, regardless. + */ +#define ATH_ALQ_LOG_ALWAYS_MASK 0x00000001 + #define ATH_ALQ_FILENAME_LEN 128 #define ATH_ALQ_DEVNAME_LEN 32 @@ -42,12 +59,9 @@ struct if_ath_alq { int sc_alq_isactive; char sc_alq_devname[ATH_ALQ_DEVNAME_LEN]; char sc_alq_filename[ATH_ALQ_FILENAME_LEN]; + struct if_ath_alq_init_state sc_alq_cfg; }; -#define ATH_ALQ_EDMA_TXSTATUS 1 -#define ATH_ALQ_EDMA_RXSTATUS 2 -#define ATH_ALQ_EDMA_TXDESC 3 - /* 128 bytes in total */ #define ATH_ALQ_PAYLOAD_LEN 112 @@ -68,10 +82,13 @@ static inline int if_ath_alq_checkdebug(struct if_ath_alq *alq, uint16_t op) { - return (alq->sc_alq_debug & (1 << (op - 1))); + return ((alq->sc_alq_debug | ATH_ALQ_LOG_ALWAYS_MASK) + & (1 << (op - 1))); } extern void if_ath_alq_init(struct if_ath_alq *alq, const char *devname); +extern void if_ath_alq_setcfg(struct if_ath_alq *alq, uint32_t macVer, + uint32_t macRev, uint32_t phyRev, uint32_t halMagic); extern void if_ath_alq_tidyup(struct if_ath_alq *alq); extern int if_ath_alq_start(struct if_ath_alq *alq); extern int if_ath_alq_stop(struct if_ath_alq *alq); |