From owner-svn-src-all@FreeBSD.ORG Sat Nov 19 21:12:35 2011 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 B61B61065676; Sat, 19 Nov 2011 21:12:35 +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 A5B608FC15; Sat, 19 Nov 2011 21:12:35 +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 pAJLCZ3V060603; Sat, 19 Nov 2011 21:12:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id pAJLCZv3060601; Sat, 19 Nov 2011 21:12:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201111192112.pAJLCZv3060601@svn.freebsd.org> From: Adrian Chadd Date: Sat, 19 Nov 2011 21:12:35 +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: r227741 - 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: Sat, 19 Nov 2011 21:12:35 -0000 Author: adrian Date: Sat Nov 19 21:12:35 2011 New Revision: 227741 URL: http://svn.freebsd.org/changeset/base/227741 Log: Add some (totally untested!) code to correctly set the RF half/quarter mode configuration registers. This is apparently required for correct behaviour, but also requires the chip to actually officially support it. Sponsored by: Hobnob, Inc. 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 Sat Nov 19 21:05:31 2011 (r227740) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_reset.c Sat Nov 19 21:12:35 2011 (r227741) @@ -724,6 +724,20 @@ ar5416SetRfMode(struct ath_hal *ah, cons rfMode |= IEEE80211_IS_CHAN_5GHZ(chan) ? AR_PHY_MODE_RF5GHZ : AR_PHY_MODE_RF2GHZ; } + + /* + * Set half/quarter mode flags if required. + * + * This doesn't change the IFS timings at all; that needs to + * be done as part of the MAC setup. Similarly, the PLL + * configuration also needs some changes for the half/quarter + * rate clock. + */ + if (IEEE80211_IS_CHAN_HALF(chan)) + rfMode |= AR_PHY_MODE_HALF; + else if (IEEE80211_IS_CHAN_QUARTER(chan)) + rfMode |= AR_PHY_MODE_QUARTER; + OS_REG_WRITE(ah, AR_PHY_MODE, rfMode); }