Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Feb 2009 22:06:58 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r188866 - head/sys/dev/ath/ath_hal/ar5212
Message-ID:  <200902202206.n1KM6wP9040234@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Fri Feb 20 22:06:58 2009
New Revision: 188866
URL: http://svn.freebsd.org/changeset/base/188866

Log:
  correct SIFS setting; there is a 2usec adjustment between the calculated
  value and what the hardware requires (based on inspection of INI values)
  
  Submitted by:	Jiri Fojtasek <jiri.fojtasek@hlohovec.net>

Modified:
  head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c

Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Feb 20 22:05:08 2009	(r188865)
+++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c	Fri Feb 20 22:06:58 2009	(r188866)
@@ -450,7 +450,7 @@ ar5212SetSifsTime(struct ath_hal *ah, u_
 		return AH_FALSE;
 	} else {
 		/* convert to system clocks */
-		OS_REG_WRITE(ah, AR_D_GBL_IFS_SIFS, ath_hal_mac_clks(ah, us));
+		OS_REG_WRITE(ah, AR_D_GBL_IFS_SIFS, ath_hal_mac_clks(ah, us-2));
 		ahp->ah_slottime = us;
 		return AH_TRUE;
 	}
@@ -460,7 +460,7 @@ u_int
 ar5212GetSifsTime(struct ath_hal *ah)
 {
 	u_int clks = OS_REG_READ(ah, AR_D_GBL_IFS_SIFS) & 0xffff;
-	return ath_hal_mac_usec(ah, clks);	/* convert from system clocks */
+	return ath_hal_mac_usec(ah, clks)+2;	/* convert from system clocks */
 }
 
 HAL_BOOL



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