From owner-freebsd-wireless@FreeBSD.ORG Fri Oct 14 01:38:31 2011 Return-Path: Delivered-To: wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C782D1065670 for ; Fri, 14 Oct 2011 01:38:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-yw0-f54.google.com (mail-yw0-f54.google.com [209.85.213.54]) by mx1.freebsd.org (Postfix) with ESMTP id 837818FC0C for ; Fri, 14 Oct 2011 01:38:31 +0000 (UTC) Received: by ywp17 with SMTP id 17so2325191ywp.13 for ; Thu, 13 Oct 2011 18:38:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=Wok9ZMqL8AYsO/daMagPAMXxURzhPEVeyRQht6VLye0=; b=T270B2Y4TNtmOX8sj2E93iuXbPzMlcsJwznHPArL8/ISXgUdzB8x3PDQ3pYGPPJojB q07cnk2sUVTVGy8S/J4a6ukRY/uzTpTlEWXiZu+NiZEO0iBuSI7VEd4WBP12YeRRaS0w ML8tvEEjzlDh8WNlP1udgVAre6yy5vWx0uYLQ= MIME-Version: 1.0 Received: by 10.236.197.69 with SMTP id s45mr8567260yhn.54.1318556310667; Thu, 13 Oct 2011 18:38:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.236.109.167 with HTTP; Thu, 13 Oct 2011 18:38:30 -0700 (PDT) Date: Fri, 14 Oct 2011 09:38:30 +0800 X-Google-Sender-Auth: pNFMX8Wz3MGUB_tMzFH-goideUY Message-ID: From: Adrian Chadd To: Sceak Content-Type: text/plain; charset=ISO-8859-1 Cc: wireless@freebsd.org Subject: Re: AR9285 RX sensitivity (was Re: Scanning with ath) X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 14 Oct 2011 01:38:31 -0000 Hi, Right. Please enable hal/ath debugging: options ATH_DEBUG options AH_DEBUG options ATH_DIAGAPI Then enable diversity debugging: sysctl dev.ath.0.hal.debug=0x00100000 The relevant code is in sys/dev/ath/ath_hal/ar9002/ar9285_diversity.c . I "stole" the tx antenna switch hooks to implement the ar9285 RX antenna diversity. It's a hack which I'll make go away at some point (or if someone would like a mini-project, please step up and let me know.) sysctl dev.ath.0.txantenna thus: 0 = variable RX diversity 1 = RX prefer antenna A 2 = RX prefer antenna B You could try setting it to 1 or 2 and doing some scans. "Variable" allows the hardware to choose which antenna to use. There's more complicated software-driven AR9285 diversity which I've included the code for, but it's disabled at the moment due to a lack of time to thoroughly debug issues (much like what you were seeing, but when doing live traffic.) I'm happy to help out anyone who would like to toy around with AR9285 software driven diversity, I have plenty of documentation and notes which I can share. Adrian