diff options
author | Adrian Chadd <adrian@FreeBSD.org> | 2013-02-18 04:10:38 +0000 |
---|---|---|
committer | Adrian Chadd <adrian@FreeBSD.org> | 2013-02-18 04:10:38 +0000 |
commit | d97c06b3a4a0678bd1c50c2b501ef5e76bf29dcf (patch) | |
tree | c8e8d6f62285430f0e75af0eed18d7f19b6471c5 /sys | |
parent | afad0b868fa9d25a1da06942a2018d71f5f0fadc (diff) | |
download | src-d97c06b3a4a0678bd1c50c2b501ef5e76bf29dcf.tar.gz src-d97c06b3a4a0678bd1c50c2b501ef5e76bf29dcf.zip |
Add a new ATH KTR debug method to log the interrupt status.
Notes
Notes:
svn path=/head/; revision=246933
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ath/if_ath_alq.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/sys/dev/ath/if_ath_alq.h b/sys/dev/ath/if_ath_alq.h index 3748d50af7ed..52a022d4963a 100644 --- a/sys/dev/ath/if_ath_alq.h +++ b/sys/dev/ath/if_ath_alq.h @@ -92,6 +92,13 @@ struct if_ath_alq_tdma_timer_set { uint32_t sc_tdmaswbaprep; }; +#define ATH_ALQ_INTR_STATUS 10 +struct if_ath_alq_interrupt { + uint32_t intr_status; + uint32_t intr_state[8]; + uint32_t intr_syncstate; +}; + /* * These will always be logged, regardless. */ @@ -144,6 +151,27 @@ extern int if_ath_alq_start(struct if_ath_alq *alq); extern int if_ath_alq_stop(struct if_ath_alq *alq); extern void if_ath_alq_post(struct if_ath_alq *alq, uint16_t op, uint16_t len, const char *buf); + +/* XXX maybe doesn't belong here? */ +static inline void +if_ath_alq_post_intr(struct if_ath_alq *alq, uint32_t status, + uint32_t *state, uint32_t sync_state) +{ + int i; + struct if_ath_alq_interrupt intr; + + if (! if_ath_alq_checkdebug(alq, ATH_ALQ_INTR_STATUS)) + return; + + intr.intr_status = htobe32(status); + for (i = 0; i < 8; i++) + intr.intr_state[i] = htobe32(state[i]); + intr.intr_syncstate = htobe32(sync_state); + + if_ath_alq_post(alq, ATH_ALQ_INTR_STATUS, sizeof(&intr), + (const char *) &intr); +} + #endif /* _KERNEL */ #endif |