From owner-freebsd-current@FreeBSD.ORG Tue Mar 8 07:08:10 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B3D101065677; Tue, 8 Mar 2011 07:08:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id E57458FC16; Tue, 8 Mar 2011 07:08:09 +0000 (UTC) Received: by wwc33 with SMTP id 33so588554wwc.31 for ; Mon, 07 Mar 2011 23:08:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:cc:content-type; bh=lrxnb1lAG1GNossG5fLlcvtkCSbDhGkd+OV5/UayV5U=; b=ozqiQACv/EIzLT1FyIEwdxEA6po42eKIZT4vVCzltkkn14g1ccSG07pTHKSDerUHSB kU++WyCzqOAGqBuZOPqRPN+NtJVk/qskclS6pgauFu2e3BHs/DqrjTuWrBJq/LfJRncU Y8SvK4O17/Na9nMxNI4/rAHg5sCfNlXsVzjlw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; b=k0dTDYFyutYjZ7+1m0tV8wmhrd9PLzWlpr2gMFJUDAiNYXSWIIhfIuF7Oi3CA5RLf7 v6GpkGeodg1+r3RMWk7ItsRZDCqV82EA9P6Orz0qhZ2WSh397elEAVaFxOoutJIDCGCF ZsyTl07nswQw9yXZoj0xZFUZ7GL6Re1+3/EAA= MIME-Version: 1.0 Received: by 10.227.147.20 with SMTP id j20mr4180311wbv.159.1299568088279; Mon, 07 Mar 2011 23:08:08 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.227.133.4 with HTTP; Mon, 7 Mar 2011 23:08:08 -0800 (PST) Date: Tue, 8 Mar 2011 15:08:08 +0800 X-Google-Sender-Auth: hKr4aNZ7UtFhTeBIHNnVZWaXRr4 Message-ID: From: Adrian Chadd To: freebsd-mobile@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: FreeBSD Net , freebsd-current@freebsd.org Subject: Request to test if_ath - TX power control changes X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Mar 2011 07:08:10 -0000 Hi everyone, This patch introduces open-loop TX power control for the AR9280 (Merlin) and tidies up some of the code duplication between the AR5416 and AR9285 power control code. If you're using an AR9280 then please, -please- test this out and get back to me. I'd also appreciate EEPROM dumps (via ath_prom_read) so I can see what your card has programmed in it. Doubly so if you're using an AR9280 in 5ghz mode. If you're using a non-AR9280 chip (ie, AR5416, AR9160, AR9285), then i'd also appreciate further testing. I'd like to make sure I haven't introduced regressions here! Although legacy rate TX'ing seems to work with this patch, if your AR9280 uses open-loop TX power control then the output from your card is very likely going to be quite distorted. It's bad for you, bad for your card and bad for your surroundings. Besides some further code restructuring (which won't change functionality), I'm going to take a break from making any further changes that aren't bugfixes until the AR9285 related bugs Ian was seeing are found/fixed, along with any and all regressions people report with the driver. This is your opportunity to get me to find/fix performance, stability and other issues that have crept up, so it's in the best interests of everyone (including you!) to test this stuff as thoroughly as possible before 9.0-RELEASE comes out. Thanks! Adrian On 8 March 2011 14:59, Adrian Chadd wrote: > Author: adrian > Date: Tue Mar 8 06:59:59 2011 > New Revision: 219393 > URL: http://svn.freebsd.org/changeset/base/219393 > > Log: > Implement open-loop TX power control (OLC) for Merlin (AR9280) and > generally tidy up the TX power programming code. > > Enforce that the TX power offset for Merlin is -5 dBm, rather than > any other value programmable in the EEPROM. This requires some > further code to be ported over from ath9k, so until that is done > and tested, fail to attach NICs whose TX power offset isn't -5 > dBm. > > This improves both legacy and HT transmission on my merlin board. > It allows for stable MCS TX up to MCS15. > > Specifics: > > * Refactor out a bunch of the TX power calibration code - > setting/obtaining the power detector / gain boundaries, > programming the PDADC > * Take the -5 dBm TX power offset into account on Merlin - > "0" in the per-rate TX power register means -5 dBm, not > 0 dBm > * When doing OLC > * Enforce min (0) and max (AR5416_MAX_RATE_POWER) when fiddling > with the TX power, to avoid the TX power values from wrapping > when low. > * Implement the 1 dBm cck power offset when doing OLC > * Implement temperature compensation for 2.4ghz mode when doing OLC > * Implement an AR9280 specific TX power calibration routine which > includes the OLC twiddles, leaving the earlier chipset path > (AR5416, AR9160) alone > > Whilst here, use these refactored routines for the AR9285 TX power > calibration/programming code and enforce correct overflow/underflow > handling when fiddling with TX power values. > > Obtained from: linux ath9k > >