From owner-svn-src-all@FreeBSD.ORG Wed Apr 1 04:56:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B9CC814; Wed, 1 Apr 2015 04:56:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DDFD242; Wed, 1 Apr 2015 04:56:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t314uNQM038410; Wed, 1 Apr 2015 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t314uNgM038406; Wed, 1 Apr 2015 04:56:23 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201504010456.t314uNgM038406@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 1 Apr 2015 04:56:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r280942 - head/sys/dev/ath/ath_hal/ar5212 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Apr 2015 04:56:24 -0000 Author: adrian Date: Wed Apr 1 04:56:22 2015 New Revision: 280942 URL: https://svnweb.freebsd.org/changeset/base/280942 Log: Use the HAL API for returning ar5212AniState, rather than just dumping AniState itself. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 04:56:10 2015 (r280941) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212.h Wed Apr 1 04:56:22 2015 (r280942) @@ -345,6 +345,7 @@ struct ath_hal_5212 { uint32_t ah_txBusy; uint32_t ah_rx_chainmask; uint32_t ah_tx_chainmask; + HAL_ANI_STATE ext_ani_state; }; #define AH5212(_ah) ((struct ath_hal_5212 *)(_ah)) Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 04:56:10 2015 (r280941) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Wed Apr 1 04:56:22 2015 (r280942) @@ -1052,6 +1052,7 @@ ar5212GetDiagState(struct ath_hal *ah, i void **result, uint32_t *resultsize) { struct ath_hal_5212 *ahp = AH5212(ah); + struct ar5212AniState *astate; (void) ahp; if (ath_hal_getdiagstate(ah, request, args, argsize, result, resultsize)) @@ -1083,9 +1084,28 @@ ar5212GetDiagState(struct ath_hal *ah, i 0 : sizeof(struct ar5212AniState); return AH_TRUE; case HAL_DIAG_ANI_STATS: - *result = ar5212AniGetCurrentStats(ah); - *resultsize = (*result == AH_NULL) ? - 0 : sizeof(HAL_ANI_STATS); + OS_MEMZERO(&ahp->ext_ani_state, sizeof(ahp->ext_ani_state)); + astate = ar5212AniGetCurrentState(ah); + if (astate == NULL) { + *result = NULL; + *resultsize = 0; + } else { + ahp->ext_ani_state.noiseImmunityLevel = + astate->noiseImmunityLevel; + ahp->ext_ani_state.spurImmunityLevel = + astate->spurImmunityLevel; + ahp->ext_ani_state.firstepLevel = + astate->firstepLevel; + ahp->ext_ani_state.ofdmWeakSigDetectOff = + astate->ofdmWeakSigDetectOff; + ahp->ext_ani_state.cckWeakSigThreshold = + astate->cckWeakSigThreshold; + ahp->ext_ani_state.listenTime = + astate->listenTime; + + *result = &ahp->ext_ani_state; + *resultsize = sizeof(ahp->ext_ani_state); + } return AH_TRUE; case HAL_DIAG_ANI_CMD: if (argsize != 2*sizeof(uint32_t))