Date: Wed, 1 Apr 2015 04:56:23 +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: r280942 - head/sys/dev/ath/ath_hal/ar5212 Message-ID: <201504010456.t314uNgM038406@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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))
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201504010456.t314uNgM038406>