Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Feb 2009 00:29:32 +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: r188975 - head/sys/dev/ath/ath_hal/ar5416
Message-ID:  <200902240029.n1O0TWTw044319@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Tue Feb 24 00:29:32 2009
New Revision: 188975
URL: http://svn.freebsd.org/changeset/base/188975

Log:
  misc fixups, mostly for code not compiled yet

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

Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c
==============================================================================
--- head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Feb 24 00:12:16 2009	(r188974)
+++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c	Tue Feb 24 00:29:32 2009	(r188975)
@@ -763,19 +763,19 @@ ar5416SetDeltaSlope(struct ath_hal *ah, 
 {
 #define INIT_CLOCKMHZSCALED	0x64000000
 	uint32_t coef_scaled, ds_coef_exp, ds_coef_man;
-	uint32_t clockMhzScaled = INIT_CLOCKMHZSCALED;
+	uint32_t clockMhzScaled;
 
 	CHAN_CENTERS centers;
 
-	if (IEEE80211_IS_CHAN_TURBO(chan))
-		clockMhzScaled *= 2;
 	/* half and quarter rate can divide the scaled clock by 2 or 4 respectively */
 	/* scale for selected channel bandwidth */ 
-	if (IEEE80211_IS_CHAN_HALF(chan)) {
-		clockMhzScaled = clockMhzScaled >> 1;
-	} else if (IEEE80211_IS_CHAN_QUARTER(chan)) {
-		clockMhzScaled = clockMhzScaled >> 2;
-	} 
+	clockMhzScaled = INIT_CLOCKMHZSCALED;
+	if (IEEE80211_IS_CHAN_TURBO(chan))
+		clockMhzScaled <<= 1;
+	else if (IEEE80211_IS_CHAN_HALF(chan))
+		clockMhzScaled >>= 1;
+	else if (IEEE80211_IS_CHAN_QUARTER(chan))
+		clockMhzScaled >>= 2;
 
 	/*
 	 * ALGO -> coef = 1e8/fcarrier*fclock/40;
@@ -846,6 +846,7 @@ ar5416SpurMitigate(struct ath_hal *ah, c
      * Need to verify range +/- 9.5 for static ht20, otherwise spur
      * is out-of-band and can be ignored.
      */
+    /* XXX ath9k changes */
     for (i = 0; i < AR5416_EEPROM_MODAL_SPURS; i++) {
         cur_bb_spur = ath_hal_getSpurChan(ah, i, is2GHz);
         if (AR_NO_SPUR == cur_bb_spur)
@@ -1110,7 +1111,7 @@ ar9280SpurMitigate(struct ath_hal *ah, c
             break;
         cur_bb_spur = cur_bb_spur - freq;
 
-        if (IS_CHAN_HT40(ichan)) {
+        if (IEEE80211_IS_CHAN_HT40(chan)) {
             if ((cur_bb_spur > -AR_SPUR_FEEQ_BOUND_HT40) && 
                 (cur_bb_spur < AR_SPUR_FEEQ_BOUND_HT40)) {
                 bb_spur = cur_bb_spur;
@@ -1187,7 +1188,7 @@ ar9280SpurMitigate(struct ath_hal *ah, c
      * in 11A mode the denominator of spur_freq_sd should be 40 and
      * it should be 44 in 11G
      */
-    denominator = IEEE80211_IS_CHAN_2GHZ(ichan) ? 44 : 40;
+    denominator = IEEE80211_IS_CHAN_2GHZ(chan) ? 44 : 40;
     spur_freq_sd = ((bb_spur_off * 2048) / denominator) & 0x3ff;
 
     newVal = (AR_PHY_TIMING11_USE_SPUR_IN_AGC |



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