From 38aa9f368858d3bb53cca0dee66e6196fcf4d5f5 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Tue, 21 May 2013 05:51:49 +0000 Subject: [PATCH] Extend the TXOP enforce capability to support checking whether it's supported. --- sys/dev/ath/ath_hal/ar5416/ar5416_misc.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c index 6f47c5c8b8a7..66f1d6218ec1 100644 --- a/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c +++ b/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c @@ -466,6 +466,10 @@ ar5416GetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, case HAL_CAP_DIVERSITY: /* disable classic fast diversity */ return HAL_ENXIO; case HAL_CAP_ENFORCE_TXOP: + if (capability == 0) + return (HAL_OK); + if (capability != 1) + return (HAL_ENOTSUPP); (*result) = !! (AH5212(ah)->ah_miscMode & AR_PCU_TXOP_TBTT_LIMIT_ENA); return (HAL_OK); @@ -499,6 +503,8 @@ ar5416SetCapability(struct ath_hal *ah, HAL_CAPABILITY_TYPE type, pCap->halTxStreams = 1; return AH_TRUE; case HAL_CAP_ENFORCE_TXOP: + if (capability != 1) + return (HAL_ENOTSUPP); if (setting) { AH5212(ah)->ah_miscMode |= AR_PCU_TXOP_TBTT_LIMIT_ENA;