Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2013 05:51:49 +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: r250841 - head/sys/dev/ath/ath_hal/ar5416
Message-ID:  <201305210551.r4L5pn3h035934@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue May 21 05:51:49 2013
New Revision: 250841
URL: http://svnweb.freebsd.org/changeset/base/250841

Log:
  Extend the TXOP enforce capability to support checking whether it's
  supported.

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Tue May 21 03:05:49 2013	(r250840)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c	Tue May 21 05:51:49 2013	(r250841)
@@ -466,6 +466,10 @@ ar5416GetCapability(struct ath_hal *ah, 
 	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, 
 			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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305210551.r4L5pn3h035934>