From 4bc0dcfe6919ce6f7b8fd1f229940c19bcba927b Mon Sep 17 00:00:00 2001 From: sam Date: Tue, 19 May 2009 17:30:13 +0000 Subject: add HAL_CAP_INTRMASK to return the set of interrupts supported by the device --- sys/dev/ath/ath_hal/ah.c | 3 +++ sys/dev/ath/ath_hal/ah.h | 3 ++- sys/dev/ath/ath_hal/ah_internal.h | 1 + sys/dev/ath/ath_hal/ar5210/ar5210_attach.c | 5 +++++ sys/dev/ath/ath_hal/ar5211/ar5211_attach.c | 7 +++++++ sys/dev/ath/ath_hal/ar5212/ar5212_attach.c | 7 +++++++ sys/dev/ath/ath_hal/ar5416/ar5416_attach.c | 11 +++++++++++ 7 files changed, 36 insertions(+), 1 deletion(-) (limited to 'sys/dev/ath') diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c index 63165a5..616e19b 100644 --- a/sys/dev/ath/ath_hal/ah.c +++ b/sys/dev/ath/ath_hal/ah.c @@ -500,6 +500,9 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, case HAL_CAP_RXTSTAMP_PREC: /* rx desc tstamp precision (bits) */ *result = pCap->halTstampPrecision; return HAL_OK; + case HAL_CAP_INTRMASK: /* mask of supported interrupts */ + *result = pCap->halIntrMask; + return HAL_OK; default: return HAL_EINVAL; } diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h index c1bff9c..e9ceaf0 100644 --- a/sys/dev/ath/ath_hal/ah.h +++ b/sys/dev/ath/ath_hal/ah.h @@ -109,6 +109,7 @@ typedef enum { HAL_CAP_RXTSTAMP_PREC = 34, /* rx desc tstamp precision (bits) */ HAL_CAP_BB_HANG = 35, /* can baseband hang */ HAL_CAP_MAC_HANG = 36, /* can MAC hang */ + HAL_CAP_INTRMASK = 37, /* bitmask of supported interrupts */ } HAL_CAPABILITY_TYPE; /* @@ -348,8 +349,8 @@ typedef enum { | HAL_INT_RXDESC | HAL_INT_RXEOL | HAL_INT_RXORN - | HAL_INT_TXURN | HAL_INT_TXDESC + | HAL_INT_TXURN | HAL_INT_MIB | HAL_INT_RXPHY | HAL_INT_RXKCM diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h index ef5aba5..087a8e3 100644 --- a/sys/dev/ath/ath_hal/ah_internal.h +++ b/sys/dev/ath/ath_hal/ah_internal.h @@ -206,6 +206,7 @@ typedef struct { uint8_t halNumGpioPins; uint8_t halNumAntCfg2GHz; uint8_t halNumAntCfg5GHz; + uint32_t halIntrMask; } HAL_CAPABILITIES; struct regDomain; diff --git a/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c b/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c index 13ad711..2d601e6 100644 --- a/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c +++ b/sys/dev/ath/ath_hal/ar5210/ar5210_attach.c @@ -369,6 +369,11 @@ ar5210FillCapabilityInfo(struct ath_hal *ah) } pCap->halTstampPrecision = 15; /* NB: s/w extended from 13 */ + pCap->halIntrMask = HAL_INT_COMMON + | HAL_INT_RX + | HAL_INT_TX + | HAL_INT_FATAL + ; ahpriv->ah_rxornIsFatal = AH_TRUE; return AH_TRUE; diff --git a/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c b/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c index e55c67a..ec19751 100644 --- a/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c +++ b/sys/dev/ath/ath_hal/ar5211/ar5211_attach.c @@ -498,6 +498,13 @@ ar5211FillCapabilityInfo(struct ath_hal *ah) } pCap->halTstampPrecision = 13; + pCap->halIntrMask = HAL_INT_COMMON + | HAL_INT_RX + | HAL_INT_TX + | HAL_INT_FATAL + | HAL_INT_BNR + | HAL_INT_TIM + ; /* XXX might be ok w/ some chip revs */ ahpriv->ah_rxornIsFatal = AH_TRUE; diff --git a/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c b/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c index 300c0a3..63856a4 100644 --- a/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c +++ b/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c @@ -840,6 +840,13 @@ ar5212FillCapabilityInfo(struct ath_hal *ah) AH_PRIVATE(ah)->ah_macVersion > AR_SREV_VERSION_VENICE; pCap->halTstampPrecision = 15; + pCap->halIntrMask = HAL_INT_COMMON + | HAL_INT_RX + | HAL_INT_TX + | HAL_INT_FATAL + | HAL_INT_BNR + | HAL_INT_BMISC + ; return AH_TRUE; #undef IS_COBRA diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c index 1130529..01859d0 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c @@ -781,6 +781,17 @@ ar5416FillCapabilityInfo(struct ath_hal *ah) pCap->halTstampPrecision = 32; pCap->halHwPhyCounterSupport = AH_TRUE; + pCap->halIntrMask = HAL_INT_COMMON + | HAL_INT_RX + | HAL_INT_TX + | HAL_INT_FATAL + | HAL_INT_BNR + | HAL_INT_BMISC + | HAL_INT_DTIMSYNC + | HAL_INT_TSFOOR + | HAL_INT_CST + | HAL_INT_GTT + ; pCap->halFastCCSupport = AH_TRUE; pCap->halNumGpioPins = 6; -- cgit v1.1