diff options
author | adrian <adrian@FreeBSD.org> | 2011-03-26 10:47:17 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-03-26 10:47:17 +0000 |
commit | 66cc5279f57f413140a7c6e841838fee90f3ba1a (patch) | |
tree | 3705937ccc318f15332db63e70649c4043e6c902 | |
parent | 7a5ef72838e04a18d22ca0c7734429faabe0c9bc (diff) | |
download | FreeBSD-src-66cc5279f57f413140a7c6e841838fee90f3ba1a.zip FreeBSD-src-66cc5279f57f413140a7c6e841838fee90f3ba1a.tar.gz |
Introduce hardware PS-POLL support in the HAL.
Linux ath9k only enables this for AR9280 and later NICs; so
create a capability for it so it isn't enabled for earlier
NICs.
Enabling hardware PS-POLL support will come in a later commit
and will be disabled by default.
-rw-r--r-- | sys/dev/ath/ath_hal/ah.c | 4 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar9002/ar9280_attach.c | 2 | ||||
-rw-r--r-- | sys/dev/ath/ath_hal/ar9002/ar9285_attach.c | 3 |
3 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/ath/ath_hal/ah.c b/sys/dev/ath/ath_hal/ah.c index 9220171..4a89526 100644 --- a/sys/dev/ath/ath_hal/ah.c +++ b/sys/dev/ath/ath_hal/ah.c @@ -599,8 +599,10 @@ ath_hal_getcapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, default: return HAL_ENOTSUPP; } - case HAP_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ + case HAL_CAP_SPLIT_4KB_TRANS: /* hardware handles descriptors straddling 4k page boundary */ return pCap->hal4kbSplitTransSupport ? HAL_OK : HAL_ENOTSUPP; + case HAL_CAP_HAS_PSPOLL: /* hardware has ps-poll support */ + return pCap->halHasPsPollSupport ? HAL_OK : HAL_ENOTSUPP; default: return HAL_EINVAL; } diff --git a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c index ac6c7bb..e02a8a0 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c @@ -780,6 +780,8 @@ ar9280FillCapabilityInfo(struct ath_hal *ah) #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_MERLIN_20_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; diff --git a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c index cbe6fac..a302b91 100644 --- a/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c +++ b/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c @@ -380,6 +380,9 @@ ar9285FillCapabilityInfo(struct ath_hal *ah) #endif pCap->halAutoSleepSupport = AH_FALSE; /* XXX? */ pCap->hal4kbSplitTransSupport = AH_FALSE; + if (AR_SREV_KITE_12_OR_LATER(ah)) + pCap->halHasPsPollSupport = AH_TRUE; + pCap->halRxStbcSupport = 1; pCap->halTxStbcSupport = 1; |