svn commit: r211307 - head/sys/dev/ath/ath_hal/ar5416

Adrian Chadd adrian at FreeBSD.org
Sat Aug 14 15:29:22 UTC 2010


Author: adrian
Date: Sat Aug 14 15:29:21 2010
New Revision: 211307
URL: http://svn.freebsd.org/changeset/base/211307

Log:
  Merge in a fix for the power/(gain?) calculation. Apply it to both
  the 5416/9160 and 9285 code paths.
  
  Obtained from:	OpenWRT r22123, 522-ath9k_pwrcal_fix.patch

Modified:
  head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
  head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Sat Aug 14 15:28:15 2010	(r211306)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Sat Aug 14 15:29:21 2010	(r211307)
@@ -2008,7 +2008,7 @@ ar5416GetGainBoundariesAndPdadcs(struct 
          * for last gain, pdGainBoundary == Pmax_t2, so will
          * have to extrapolate
          */
-        if (tgtIndex > maxIndex) {  /* need to extrapolate above */
+        if (tgtIndex >= maxIndex) {  /* need to extrapolate above */
             while ((ss <= tgtIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) {
                 tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +
                           (ss - maxIndex +1) * vpdStep));

Modified: head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c	Sat Aug 14 15:28:15 2010	(r211306)
+++ head/sys/dev/ath/ath_hal/ar5416/ar9285_reset.c	Sat Aug 14 15:29:21 2010	(r211307)
@@ -792,7 +792,7 @@ ar9285GetGainBoundariesAndPdadcs(struct 
          * for last gain, pdGainBoundary == Pmax_t2, so will
          * have to extrapolate
          */
-        if (tgtIndex > maxIndex) {  /* need to extrapolate above */
+        if (tgtIndex >= maxIndex) {  /* need to extrapolate above */
             while ((ss <= tgtIndex) && (k < (AR5416_NUM_PDADC_VALUES - 1))) {
                 tmpVal = (int16_t)((vpdTableI[i][sizeCurrVpdTable - 1] +
                           (ss - maxIndex +1) * vpdStep));


More information about the svn-src-all mailing list