From owner-freebsd-wireless@FreeBSD.ORG Sun Sep 2 05:00:33 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BA751065677 for ; Sun, 2 Sep 2012 05:00:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id E4EE88FC0C for ; Sun, 2 Sep 2012 05:00:32 +0000 (UTC) Received: by dadr6 with SMTP id r6so2767496dad.13 for ; Sat, 01 Sep 2012 22:00:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=LEQ4pS148/+XM/tZenhjJXdDm73KGxy3bTw0d9Gzh5s=; b=onQ0V4lCU2ZTnmIp8GBlu8Mx6xj/Pl9VID8UHKW+VA2iAWiNrG6xzt7jUwwylCKHKY WsoI7G9y4tkddBY+viuPfmYSSrj1qZs1XiDRB+Nqbmd/9HcCFHCeFuJWx0st/+CsfMck UgpqziV4MtXF8GlpHbO1uPHpsrCvpPAzxwERq8cmcZ4n24hYihkuFx5EZe3zYQpHZyRz QHjleTtp+nkN81l/EPX6Rr5a4L5F+DFrT1vllK1qPsPJA144lRDhsZmugNXwBO1JwoNC I1bxaghOr7FWRxut0hMbjTC6fe3cGPqFtwm9Z6bU2rtAcdQLV6DmgaGL/2ewd81SaUF1 fmkQ== MIME-Version: 1.0 Received: by 10.68.204.169 with SMTP id kz9mr820382pbc.39.1346562032626; Sat, 01 Sep 2012 22:00:32 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.68.36.106 with HTTP; Sat, 1 Sep 2012 22:00:32 -0700 (PDT) Date: Sat, 1 Sep 2012 22:00:32 -0700 X-Google-Sender-Auth: vHKsq1wenwctiUsZ0esHFbRKG9E Message-ID: From: Adrian Chadd To: "Wright, Brett" Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-wireless@freebsd.org Subject: AR5212 radar detection (was Fwd: svn commit: r240001 - head/sys/dev/ath/ath_hal/ar5212) 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: Sun, 02 Sep 2012 05:00:33 -0000 Hi, I've been doing some testing with this here AR5212 and straight pulse detection (with no tuning for traffic interference or adjacent traffic.) This does fix most of the pulse detection issues I was seeing. Everything except around 10uS pulses detect okay. So next, NF calibration and tuning. Good luck brett! Adrian ---------- Forwarded message ---------- From: Adrian Chadd Date: 1 September 2012 21:56 Subject: svn commit: r240001 - head/sys/dev/ath/ath_hal/ar5212 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Author: adrian Date: Sun Sep 2 04:56:29 2012 New Revision: 240001 URL: http://svn.freebsd.org/changeset/base/240001 Log: AR5212 radar pulse fixes. Fix the strong signal diversity capability setting - I had totally messed up the indentation. Set the default values to match what's in the .ini for now, rather than what values I had previously gleaned from places. This seems to work quite well for the early AR5212 NICs I have. Of course, later NICs have different PHYs and the radar configuration is very card/board dependent.. Tested: * ath1: AR5212 mac 5.3 RF5111 phy 4.1 ath1: 2GHz radio: 0x0023; 5GHz radio: 0x0017 This detects 1, 5, 25, 50, 75, 100uS pulses reliably (with no interference.) However, 10uS pulses don't detect reliably. That may be around the transition between short and long pulses so some further tuning may improve things. Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Modified: head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Sep 2 04:39:07 2012 (r240000) +++ head/sys/dev/ath/ath_hal/ar5212/ar5212_misc.c Sun Sep 2 04:56:29 2012 (r240001) @@ -960,13 +960,13 @@ ar5212SetCapability(struct ath_hal *ah, case 1: /* setting */ if (ahp->ah_phyPowerOn) { if (capability == HAL_CAP_STRONG_DIV) { - } - v = OS_REG_READ(ah, AR_PHY_CCK_DETECT); - if (setting) - v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - else - v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; - OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, v); + v = OS_REG_READ(ah, AR_PHY_CCK_DETECT); + if (setting) + v |= AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; + else + v &= ~AR_PHY_CCK_DETECT_BB_ENABLE_ANT_FAST_DIV; + OS_REG_WRITE(ah, AR_PHY_CCK_DETECT, v); + } } ahp->ah_diversity = (setting != 0); return AH_TRUE; @@ -1243,11 +1243,11 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_ /* * Parameters for the AR5212 PHY. */ -#define AR5212_DFS_FIRPWR -41 -#define AR5212_DFS_RRSSI 12 -#define AR5212_DFS_HEIGHT 20 -#define AR5212_DFS_PRSSI 22 -#define AR5212_DFS_INBAND 6 +#define AR5212_DFS_FIRPWR -35 +#define AR5212_DFS_RRSSI 20 +#define AR5212_DFS_HEIGHT 14 +#define AR5212_DFS_PRSSI 6 +#define AR5212_DFS_INBAND 4 /* * Default parameters for the AR5413 PHY. @@ -1261,7 +1261,6 @@ ar5212EnableDfs(struct ath_hal *ah, HAL_ #define AR5413_DFS_RELSTEP 31 #define AR5413_DFS_MAXLEN 255 - HAL_BOOL ar5212GetDfsDefaultThresh(struct ath_hal *ah, HAL_PHYERR_PARAM *pe) {