Date: Sat, 1 Dec 2012 03:48:11 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r243743 - in head/sys/dev/ath/ath_hal: . ar5416 Message-ID: <201212010348.qB13mBpZ017385@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Sat Dec 1 03:48:11 2012 New Revision: 243743 URL: http://svnweb.freebsd.org/changeset/base/243743 Log: Add a new HAL capability - check and enforce whether the NIC supports enforcing the TXOP and TBTT limits: * Frames which will overlap with TBTT will not TX; * Frames which will exceed TXOP will be filtered. This is not enabled by default; it's intended to be enabled by the TDMA code on 802.11n capable chipsets. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Dec 1 02:02:19 2012 (r243742) +++ head/sys/dev/ath/ath_hal/ah.h Sat Dec 1 03:48:11 2012 (r243743) @@ -192,6 +192,7 @@ typedef enum { HAL_CAP_LONG_RXDESC_TSF = 243, /* hardware supports 32bit TSF in RX descriptor */ HAL_CAP_BB_READ_WAR = 244, /* baseband read WAR */ HAL_CAP_SERIALISE_WAR = 245, /* serialise register access on PCI */ + HAL_CAP_ENFORCE_TXOP = 246, /* Enforce TXOP if supported */ } HAL_CAPABILITY_TYPE; /* Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Dec 1 02:02:19 2012 (r243742) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Sat Dec 1 03:48:11 2012 (r243743) @@ -451,6 +451,10 @@ ar5416GetCapability(struct ath_hal *ah, HAL_OK : HAL_ENOTSUPP; case HAL_CAP_DIVERSITY: /* disable classic fast diversity */ return HAL_ENXIO; + case HAL_CAP_ENFORCE_TXOP: + (*result) = + !! (AH5212(ah)->ah_miscMode & AR_PCU_TXOP_TBTT_LIMIT_ENA); + return (HAL_OK); default: break; } @@ -480,6 +484,19 @@ ar5416SetCapability(struct ath_hal *ah, else pCap->halTxStreams = 1; return AH_TRUE; + case HAL_CAP_ENFORCE_TXOP: + if (setting) { + AH5212(ah)->ah_miscMode + |= AR_PCU_TXOP_TBTT_LIMIT_ENA; + OS_REG_SET_BIT(ah, AR_MISC_MODE, + AR_PCU_TXOP_TBTT_LIMIT_ENA); + } else { + AH5212(ah)->ah_miscMode + &= ~AR_PCU_TXOP_TBTT_LIMIT_ENA; + OS_REG_CLR_BIT(ah, AR_MISC_MODE, + AR_PCU_TXOP_TBTT_LIMIT_ENA); + } + return AH_TRUE; default: break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212010348.qB13mBpZ017385>