From owner-svn-src-head@FreeBSD.ORG Thu Dec 22 21:54:53 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4CBD106564A; Thu, 22 Dec 2011 21:54:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B37A08FC13; Thu, 22 Dec 2011 21:54:53 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id pBMLsrxa035374; Thu, 22 Dec 2011 21:54:53 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pBMLsrx7035371; Thu, 22 Dec 2011 21:54:53 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201112222154.pBMLsrx7035371@svn.freebsd.org> From: Adrian Chadd Date: Thu, 22 Dec 2011 21:54:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r228817 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Dec 2011 21:54:53 -0000 Author: adrian Date: Thu Dec 22 21:54:53 2011 New Revision: 228817 URL: http://svn.freebsd.org/changeset/base/228817 Log: Use the correct types when calling the decompression mask function. There's currently no public code which uses this feature and the current reference driver doesn't enable this feature at all. It's possible it was used by a previous version of the driver and that indeed it should return HAL_STATUS; but at this point I'm happy to require that they complain and submit a patch. This was found by LLVM compile-time type checking. Submitted by: dim Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 19:09:55 2011 (r228816) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Thu Dec 22 21:54:53 2011 (r228817) @@ -574,7 +574,7 @@ ar5212SetDecompMask(struct ath_hal *ah, struct ath_hal_5212 *ahp = AH5212(ah); if (keyidx >= HAL_DECOMP_MASK_SIZE) - return HAL_EINVAL; + return AH_FALSE; OS_REG_WRITE(ah, AR_DCM_A, keyidx); OS_REG_WRITE(ah, AR_DCM_D, en ? AR_DCM_D_EN : 0); ahp->ah_decompMask[keyidx] = en; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 19:09:55 2011 (r228816) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Thu Dec 22 21:54:53 2011 (r228817) @@ -161,7 +161,7 @@ ar5416SetAntennaSwitch(struct ath_hal *a HAL_BOOL ar5416SetDecompMask(struct ath_hal *ah, uint16_t keyidx, int en) { - return HAL_OK; + return AH_TRUE; } /* Setup coverage class */