From owner-svn-src-head@FreeBSD.ORG Wed Apr 13 15:12:49 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F3B9F1065689; Wed, 13 Apr 2011 15:12:48 +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 C60A78FC16; Wed, 13 Apr 2011 15:12:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3DFCmeX096516; Wed, 13 Apr 2011 15:12:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3DFCmuL096513; Wed, 13 Apr 2011 15:12:48 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201104131512.p3DFCmuL096513@svn.freebsd.org> From: Adrian Chadd Date: Wed, 13 Apr 2011 15:12:48 +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: r220600 - in head/sys/dev/ath/ath_hal: . ar9002 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Apr 2011 15:12:49 -0000 Author: adrian Date: Wed Apr 13 15:12:48 2011 New Revision: 220600 URL: http://svn.freebsd.org/changeset/base/220600 Log: Add in the last bit of the HAL support for Kite diversity. * add a new method, specifically for doing per-RX packet antenna diversity * set that HAL method only if it's Kite and a Kite chip that does diversity. Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Wed Apr 13 15:08:51 2011 (r220599) +++ head/sys/dev/ath/ath_hal/ah.h Wed Apr 13 15:12:48 2011 (r220600) @@ -767,6 +767,9 @@ struct ath_hal { const struct ieee80211_channel *); void __ahdecl(*ah_procMibEvent)(struct ath_hal *, const HAL_NODE_STATS *); + void __ahdecl(*ah_rxAntCombDiversity)(struct ath_hal *, + struct ath_rx_status *, + unsigned long, int); /* Misc Functions */ HAL_STATUS __ahdecl(*ah_getCapability)(struct ath_hal *, Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed Apr 13 15:08:51 2011 (r220599) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Wed Apr 13 15:12:48 2011 (r220600) @@ -34,6 +34,8 @@ #include "ar9002/ar9280v2.ini" /* XXX ini for tx/rx gain */ #include "ar9002/ar9285_cal.h" +#include "ar9002/ar9285_phy.h" +#include "ar9002/ar9285_diversity.h" static const HAL_PERCAL_DATA ar9280_iq_cal = { /* single sample */ .calName = "IQ", .calType = IQ_MISMATCH_CAL, @@ -262,6 +264,12 @@ ar9285Attach(uint16_t devid, HAL_SOFTC s goto bad; } + /* Print out whether the EEPROM settings enable AR9285 diversity */ + if (ar9285_check_div_comb(ah)) { + ath_hal_printf(ah, "[ath] Enabling diversity for Kite\n"); + ah->ah_rxAntCombDiversity = ar9285_ant_comb_scan; + } + /* Disable 11n for the AR2427 */ if (devid == AR2427_DEVID_PCIE) AH_PRIVATE(ah)->ah_caps.halHTSupport = AH_FALSE;