From owner-svn-src-all@FreeBSD.ORG Sat Aug 9 18:17:17 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 920EE203 for ; Sat, 9 Aug 2014 18:17:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63B0627AB for ; Sat, 9 Aug 2014 18:17:17 +0000 (UTC) Received: from adrian (uid 753) (envelope-from adrian@FreeBSD.org) id 2727 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sat, 09 Aug 2014 18:17:17 +0000 From: Adrian Chadd Date: Sat, 9 Aug 2014 18:17:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269761 - in head/tools/tools/ath: athpoke athregs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e665ad.2727.4918fd5@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Sat, 09 Aug 2014 18:17:17 -0000 Author: adrian Date: Sat Aug 9 18:17:16 2014 New Revision: 269761 URL: http://svnweb.freebsd.org/changeset/base/269761 Log: Update athpoke/athregs to use the modified register read diagnostic API. Modified: head/tools/tools/ath/athpoke/athpoke.c head/tools/tools/ath/athregs/dumpregs.c Modified: head/tools/tools/ath/athpoke/athpoke.c ============================================================================== --- head/tools/tools/ath/athpoke/athpoke.c Sat Aug 9 18:15:28 2014 (r269760) +++ head/tools/tools/ath/athpoke/athpoke.c Sat Aug 9 18:17:16 2014 (r269761) @@ -123,7 +123,7 @@ static uint32_t regread(int s, struct ath_diag *atd, uint32_t r) { HAL_REGRANGE ra; - uint32_t v[2]; + uint32_t v[3]; ra.start = r; ra.end = 0; @@ -135,7 +135,7 @@ regread(int s, struct ath_diag *atd, uin atd->ad_id = HAL_DIAG_REGS | ATH_DIAG_IN | ATH_DIAG_DYN; if (ioctl(s, SIOCGATHDIAG, atd) < 0) err(1, atd->ad_name); - return v[1]; + return v[2]; } static void Modified: head/tools/tools/ath/athregs/dumpregs.c ============================================================================== --- head/tools/tools/ath/athregs/dumpregs.c Sat Aug 9 18:15:28 2014 (r269760) +++ head/tools/tools/ath/athregs/dumpregs.c Sat Aug 9 18:17:16 2014 (r269761) @@ -182,8 +182,9 @@ main(int argc, char *argv[]) dp = (u_int32_t *)atd.ad_out_data; ep = (u_int32_t *)(atd.ad_out_data + atd.ad_out_size); while (dp < ep) { - u_int r = dp[0] >> 16; /* start of range */ - u_int e = dp[0] & 0xffff; /* end of range */ + u_int r = dp[0]; /* start of range */ + u_int e = dp[1]; /* end of range */ + dp++; dp++; /* convert offsets to indices */ r >>= 2; e >>= 2; @@ -611,7 +612,7 @@ ath_hal_setupdiagregs(const HAL_REGRANGE space = 0; for (i = 0; i < nr; i++) { - u_int n = 2 * sizeof(u_int32_t); /* reg range + first */ + u_int n = sizeof(HAL_REGRANGE) + sizeof(u_int32_t); /* reg range + first */ if (regs[i].end) { if (regs[i].end < regs[i].start) { fprintf(stderr, "%s: bad register range, "