From owner-svn-src-all@FreeBSD.ORG Tue Feb 24 00:29:32 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 83EEC1065687; Tue, 24 Feb 2009 00:29:32 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5717F8FC1B; Tue, 24 Feb 2009 00:29:32 +0000 (UTC) (envelope-from sam@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n1O0TWUo044320; Tue, 24 Feb 2009 00:29:32 GMT (envelope-from sam@svn.freebsd.org) Received: (from sam@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n1O0TWTw044319; Tue, 24 Feb 2009 00:29:32 GMT (envelope-from sam@svn.freebsd.org) Message-Id: <200902240029.n1O0TWTw044319@svn.freebsd.org> From: Sam Leffler Date: Tue, 24 Feb 2009 00:29:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r188975 - head/sys/dev/ath/ath_hal/ar5416 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Feb 2009 00:29:33 -0000 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 |