From owner-svn-src-all@FreeBSD.ORG Fri Mar 25 00:45:25 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 6F033106566C; Fri, 25 Mar 2011 00:45:25 +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 4465B8FC0A; Fri, 25 Mar 2011 00:45:25 +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 p2P0jPDt062546; Fri, 25 Mar 2011 00:45:25 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2P0jPIA062544; Fri, 25 Mar 2011 00:45:25 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103250045.p2P0jPIA062544@svn.freebsd.org> From: Adrian Chadd Date: Fri, 25 Mar 2011 00:45:25 +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: r219980 - head/sys/dev/ath/ath_hal 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: Fri, 25 Mar 2011 00:45:25 -0000 Author: adrian Date: Fri Mar 25 00:45:24 2011 New Revision: 219980 URL: http://svn.freebsd.org/changeset/base/219980 Log: After discussion with Felix Fietkau (nbd) about the ath9k Merlin LNA bit settings, it seems that our defines are backwards and don't match what is in the EEPROM documentation or internal driver. The ath9k code used to have a bitfield here, rather than a uint8_t, and there were #defines used to swap the order based on the endian of the platform - this wasn't because of nybble or bit ordering of the underlying host but because of what the compiler was doing. This may be the reason for the backwards field numbers, as ath9k had similar issues. Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Modified: head/sys/dev/ath/ath_hal/ah_eeprom_v14.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Mar 25 00:40:08 2011 (r219979) +++ head/sys/dev/ath/ath_hal/ah_eeprom_v14.h Fri Mar 25 00:45:24 2011 (r219980) @@ -217,14 +217,14 @@ typedef struct ModalEepHeader { uint8_t ob_ch1; // 1 -> ob and db become chain specific from AR9280 uint8_t db_ch1; // 1 uint8_t flagBits; // 1 -#define AR5416_EEP_FLAG_USEANT1 0x01 /* +1 configured antenna */ -#define AR5416_EEP_FLAG_FORCEXPAON 0x02 /* force XPA bit for 5G */ -#define AR5416_EEP_FLAG_LOCALBIAS 0x04 /* enable local bias */ -#define AR5416_EEP_FLAG_FEMBANDSELECT 0x08 /* FEM band select used */ -#define AR5416_EEP_FLAG_XLNABUFIN 0x10 -#define AR5416_EEP_FLAG_XLNAISEL 0x60 -#define AR5416_EEP_FLAG_XLNAISEL_S 5 -#define AR5416_EEP_FLAG_XLNABUFMODE 0x80 +#define AR5416_EEP_FLAG_USEANT1 0x80 /* +1 configured antenna */ +#define AR5416_EEP_FLAG_FORCEXPAON 0x40 /* force XPA bit for 5G */ +#define AR5416_EEP_FLAG_LOCALBIAS 0x20 /* enable local bias */ +#define AR5416_EEP_FLAG_FEMBANDSELECT 0x10 /* FEM band select used */ +#define AR5416_EEP_FLAG_XLNABUFIN 0x08 +#define AR5416_EEP_FLAG_XLNAISEL1 0x04 +#define AR5416_EEP_FLAG_XLNAISEL2 0x02 +#define AR5416_EEP_FLAG_XLNABUFMODE 0x01 uint8_t miscBits; // [0..1]: bb_tx_dac_scale_cck uint16_t xpaBiasLvlFreq[3]; // 3 uint8_t futureModal[6]; // 6