From owner-svn-src-all@FreeBSD.ORG Wed Oct 31 21:03:56 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 705D82B5; Wed, 31 Oct 2012 21:03:56 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 579AC8FC08; Wed, 31 Oct 2012 21:03:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9VL3uW5030381; Wed, 31 Oct 2012 21:03:56 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9VL3ucb030375; Wed, 31 Oct 2012 21:03:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201210312103.q9VL3ucb030375@svn.freebsd.org> From: Adrian Chadd Date: Wed, 31 Oct 2012 21:03:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242408 - in head/sys/dev/ath/ath_hal: ar5212 ar5416 ar9002 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 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: Wed, 31 Oct 2012 21:03:56 -0000 Author: adrian Date: Wed Oct 31 21:03:55 2012 New Revision: 242408 URL: http://svn.freebsd.org/changeset/base/242408 Log: HAL updates! * Add some more ANI spur immunity levels. * For AR5111 radios attached to an AR5212, limit the 5GHz channels that are available. A later revision of the AR5111 supports the 4.9GHz PSB channels but right now there's no check in place for the radio revision. If someone wants PSB support on AR5212+AR5111 radios then please let me know and I'll add the relevant version check. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Wed Oct 31 21:00:01 2012 (r242407) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_attach.c Wed Oct 31 21:03:55 2012 (r242408) @@ -786,7 +786,29 @@ ar5212FillCapabilityInfo(struct ath_hal else pCap->halHigh2GhzChan = 2732; - pCap->halLow5GhzChan = 4915; + /* + * For AR5111 version < 4, the lowest centre frequency supported is + * 5130MHz. For AR5111 version 4, the 4.9GHz channels are supported + * but only in 10MHz increments. + * + * In addition, the programming method is wrong - it uses the IEEE + * channel number to calculate the frequency, rather than the + * channel centre. Since half/quarter rates re-use some of the + * 5GHz channel IEEE numbers, this will result in a badly programmed + * synth. + * + * Until the relevant support is written, just limit lower frequency + * support for AR5111 so things aren't incorrectly programmed. + * + * XXX It's also possible this code doesn't correctly limit the + * centre frequencies of potential channels; this is very important + * for half/quarter rate! + */ + if (AH_RADIO_MAJOR(ah) == AR_RAD5111_SREV_MAJOR) { + pCap->halLow5GhzChan = 5120; /* XXX lowest centre = 5130MHz */ + } else { + pCap->halLow5GhzChan = 4915; + } pCap->halHigh5GhzChan = 6100; pCap->halCipherCkipSupport = AH_FALSE; Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Oct 31 21:00:01 2012 (r242407) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c Wed Oct 31 21:03:55 2012 (r242408) @@ -47,8 +47,8 @@ ar5416AniSetup(struct ath_hal *ah) .coarseHigh = { -14, -14, -14, -14, -12 }, .coarseLow = { -64, -64, -64, -64, -70 }, .firpwr = { -78, -78, -78, -78, -80 }, - .maxSpurImmunityLevel = 2, - .cycPwrThr1 = { 2, 4, 6 }, + .maxSpurImmunityLevel = 7, + .cycPwrThr1 = { 2, 4, 6, 8, 10, 12, 14, 16 }, .maxFirstepLevel = 2, /* levels 0..2 */ .firstep = { 0, 4, 8 }, .ofdmTrigHigh = 500, @@ -61,7 +61,6 @@ ar5416AniSetup(struct ath_hal *ah) }; /* NB: disable ANI noise immmunity for reliable RIFS rx */ AH5416(ah)->ah_ani_function &= ~(1 << HAL_ANI_NOISE_IMMUNITY_LEVEL); - ar5416AniAttach(ah, &aniparams, &aniparams, AH_TRUE); } /* Modified: head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Wed Oct 31 21:00:01 2012 (r242407) +++ head/sys/dev/ath/ath_hal/ar9002/ar9280_attach.c Wed Oct 31 21:03:55 2012 (r242408) @@ -82,8 +82,8 @@ ar9280AniSetup(struct ath_hal *ah) .coarseHigh = { -14, -14, -14, -14, -12 }, .coarseLow = { -64, -64, -64, -64, -70 }, .firpwr = { -78, -78, -78, -78, -80 }, - .maxSpurImmunityLevel = 2, - .cycPwrThr1 = { 2, 4, 6 }, + .maxSpurImmunityLevel = 7, + .cycPwrThr1 = { 2, 4, 6, 8, 10, 12, 14, 16 }, .maxFirstepLevel = 2, /* levels 0..2 */ .firstep = { 0, 4, 8 }, .ofdmTrigHigh = 500, Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed Oct 31 21:00:01 2012 (r242407) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed Oct 31 21:03:55 2012 (r242408) @@ -87,8 +87,8 @@ ar9285AniSetup(struct ath_hal *ah) .coarseHigh = { -14, -14, -14, -14, -12 }, .coarseLow = { -64, -64, -64, -64, -70 }, .firpwr = { -78, -78, -78, -78, -80 }, - .maxSpurImmunityLevel = 2, - .cycPwrThr1 = { 2, 4, 6 }, + .maxSpurImmunityLevel = 7, + .cycPwrThr1 = { 2, 4, 6, 8, 10, 12, 14, 16 }, .maxFirstepLevel = 2, /* levels 0..2 */ .firstep = { 0, 4, 8 }, .ofdmTrigHigh = 500, Modified: head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Wed Oct 31 21:00:01 2012 (r242407) +++ head/sys/dev/ath/ath_hal/ar9002/ar9287_attach.c Wed Oct 31 21:03:55 2012 (r242408) @@ -86,8 +86,8 @@ ar9287AniSetup(struct ath_hal *ah) .coarseHigh = { -14, -14, -14, -14, -12 }, .coarseLow = { -64, -64, -64, -64, -70 }, .firpwr = { -78, -78, -78, -78, -80 }, - .maxSpurImmunityLevel = 2, - .cycPwrThr1 = { 2, 4, 6 }, + .maxSpurImmunityLevel = 7, + .cycPwrThr1 = { 2, 4, 6, 8, 10, 12, 14, 16 }, .maxFirstepLevel = 2, /* levels 0..2 */ .firstep = { 0, 4, 8 }, .ofdmTrigHigh = 500,