From owner-svn-src-all@FreeBSD.ORG Fri Apr 19 21:49:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B0AA5703; Fri, 19 Apr 2013 21:49:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A28EBE6; Fri, 19 Apr 2013 21:49:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3JLnBRM081140; Fri, 19 Apr 2013 21:49:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3JLnBMV081139; Fri, 19 Apr 2013 21:49:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304192149.r3JLnBMV081139@svn.freebsd.org> From: Adrian Chadd Date: Fri, 19 Apr 2013 21:49:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249662 - head/sys/dev/ath 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: Fri, 19 Apr 2013 21:49:11 -0000 Author: adrian Date: Fri Apr 19 21:49:11 2013 New Revision: 249662 URL: http://svnweb.freebsd.org/changeset/base/249662 Log: Initialise the chainmask fields regardless of whether 11n support is compiled in or not. This fixes issues with people running -HEAD but who build modules without doing a "make buildkernel KERNCONF=XXX", thus picking up opt_*.h. The resulting module wouldn't have 11n enabled and the chainmask configuration would just be plain wrong. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Fri Apr 19 21:09:27 2013 (r249661) +++ head/sys/dev/ath/if_ath.c Fri Apr 19 21:49:11 2013 (r249662) @@ -721,6 +721,14 @@ ath_attach(u_int16_t devid, struct ath_s } /* + * Query the TX/RX chainmask configuration. + * + * This is only relevant for 11n devices. + */ + ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask); + ath_hal_gettxchainmask(ah, &sc->sc_txchainmask); + + /* * Disable MRR with protected frames by default. * Only 802.11n series NICs can handle this. */ @@ -777,14 +785,6 @@ ath_attach(u_int16_t devid, struct ath_s */ (void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 0, &txs); (void) ath_hal_getcapability(ah, HAL_CAP_STREAMS, 1, &rxs); - - ath_hal_getrxchainmask(ah, &sc->sc_rxchainmask); - ath_hal_gettxchainmask(ah, &sc->sc_txchainmask); - - device_printf(sc->sc_dev, "Chainmasks: TX=0x%x; RX=0x%x\n", - sc->sc_txchainmask, - sc->sc_rxchainmask); - ic->ic_txstream = txs; ic->ic_rxstream = rxs;