Date: Fri, 6 May 2011 15:33:56 +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: r221535 - head/sys/dev/ath/ath_hal/ar5416 Message-ID: <201105061533.p46FXuXa054151@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Fri May 6 15:33:56 2011 New Revision: 221535 URL: http://svn.freebsd.org/changeset/base/221535 Log: Add a function which enables or disables RX RIFS searching, and migrate the code which does this into it. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416.h ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416.h Fri May 6 15:33:56 2011 (r221535) @@ -199,6 +199,7 @@ extern HAL_STATUS ar5416GetCapability(st extern HAL_BOOL ar5416GetDiagState(struct ath_hal *ah, int request, const void *args, uint32_t argsize, void **result, uint32_t *resultsize); +extern HAL_BOOL ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable); extern HAL_BOOL ar5416SetPowerMode(struct ath_hal *ah, HAL_POWER_MODE mode, int setChip); Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_misc.c Fri May 6 15:33:56 2011 (r221535) @@ -368,6 +368,25 @@ typedef struct { uint8_t qcu_complete_state; } hal_mac_hang_check_t; +HAL_BOOL +ar5416SetRifsDelay(struct ath_hal *ah, HAL_BOOL enable) +{ + uint32_t val; + + /* Only support disabling RIFS delay for now */ + HALASSERT(enable == AH_FALSE); + + if (enable == AH_TRUE) + return AH_FALSE; + + /* Change RIFS init delay to 0 */ + val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); + val &= ~AR_PHY_RIFS_INIT_DELAY; + OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); + + return AH_TRUE; +} + static HAL_BOOL ar5416CompareDbgHang(struct ath_hal *ah, const mac_dbg_regs_t *regs, const hal_mac_hang_check_t *check) Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:31:27 2011 (r221534) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Fri May 6 15:33:56 2011 (r221535) @@ -2520,11 +2520,8 @@ ar5416OverrideIni(struct ath_hal *ah, co * Disable RIFS search on some chips to avoid baseband * hang issues. */ - if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) { - val = OS_REG_READ(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS); - val &= ~AR_PHY_RIFS_INIT_DELAY; - OS_REG_WRITE(ah, AR_PHY_HEAVY_CLIP_FACTOR_RIFS, val); - } + if (AR_SREV_HOWL(ah) || AR_SREV_SOWL(ah)) + (void) ar5416SetRifsDelay(ah, AH_FALSE); } struct ini {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105061533.p46FXuXa054151>