From owner-freebsd-wireless@FreeBSD.ORG Sat May 23 08:04:03 2015 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B08DAFB for ; Sat, 23 May 2015 08:04:03 +0000 (UTC) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 266CB1FFE for ; Sat, 23 May 2015 08:04:03 +0000 (UTC) Received: by igcau1 with SMTP id au1so5943363igc.1 for ; Sat, 23 May 2015 01:04:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=YOgRaCwAcRprfe45mtb7q7AkD1cOiN+FmLm2Tavl5kg=; b=Uvqi3rcFY79xS4ZngaOi4NvJoQptl/6MBSrTR5vSNe184Eisv9uI2c+BoksmSsySKJ 2wpAhrCQ7KchBlIGo03x+bhN/Zv7+s08t+SZc5MvkldTsdO8FOT3ZttDaQ9oxm/ldAub z+XjNikO/42A2h56RzpqMdPcqpszx4joq6ud8gxhNbSVhIh7CDPVgzDCBsD2WO8hPvIY ynk7TS8Lrh36KRaozsO33Noa/SXHBegQBvA1itOgyCJ2slPYWR2uHC2IxRWxmKn3jbkX rz+/YTLLmMmadHfhSG3ebDgN/pLEC9rtuHSwSa+SOiIYpPz9AyfFyRbiDzoHzH1vdrF3 msPg== MIME-Version: 1.0 X-Received: by 10.50.73.198 with SMTP id n6mr10488197igv.32.1432368242519; Sat, 23 May 2015 01:04:02 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.36.38.133 with HTTP; Sat, 23 May 2015 01:04:02 -0700 (PDT) In-Reply-To: <201505230802.t4N82sLA097528@svn.freebsd.org> References: <201505230802.t4N82sLA097528@svn.freebsd.org> Date: Sat, 23 May 2015 01:04:02 -0700 X-Google-Sender-Auth: hC7ga3F7FhUrrX8h_JIvfdRkNuM Message-ID: Subject: Fwd: svn commit: r283309 - head/sys/contrib/dev/ath/ath_hal/ar9300 From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 08:04:03 -0000 If you're using the carambola 2, you'll want to update. This makes it behave much, much better! -adrian ---------- Forwarded message ---------- From: Adrian Chadd Date: 23 May 2015 at 01:02 Subject: svn commit: r283309 - head/sys/contrib/dev/ath/ath_hal/ar9300 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: adrian Date: Sat May 23 08:02:54 2015 New Revision: 283309 URL: https://svnweb.freebsd.org/changeset/base/283309 Log: Add support for the tuning cap for Hornet/AR9331 boards. This dramatically improves RX sensitivity and behaviour on the AR9331 hardware I have, including the Carambola 2. Tested: * AR9331, Carambola 2 board Submitted by: Zilvinas Valinskas Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat May 23 01:17:50 2015 (r283308) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_eeprom.c Sat May 23 08:02:54 2015 (r283309) @@ -4476,8 +4476,16 @@ HAL_BOOL ar9300_tuning_caps_apply(struct if ((eep->base_eep_header.feature_enable & 0x40) >> 6) { tuning_caps_params &= 0x7f; - if (AR_SREV_HORNET(ah) || AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { + /* XXX TODO: ath9k skips it for Wasp and Honeybee/AR9531, not Poseidon */ + if (AR_SREV_POSEIDON(ah) || AR_SREV_WASP(ah)) { return AH_TRUE; + } else if (AR_SREV_HORNET(ah)) { + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC, + tuning_caps_params); + OS_REG_RMW_FIELD(ah, + AR_HORNET_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPOUTDAC, + tuning_caps_params); } else if (AR_SREV_SCORPION(ah)) { OS_REG_RMW_FIELD(ah, AR_SCORPION_CH0_XTAL, AR_OSPREY_CHO_XTAL_CAPINDAC,