From owner-svn-src-head@freebsd.org Fri Jul 8 22:37:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 204D0B84054; Fri, 8 Jul 2016 22:37:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1091171D; Fri, 8 Jul 2016 22:37:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u68Mbr2V001056; Fri, 8 Jul 2016 22:37:53 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u68MbrLt001055; Fri, 8 Jul 2016 22:37:53 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201607082237.u68MbrLt001055@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 8 Jul 2016 22:37:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r302466 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jul 2016 22:37:54 -0000 Author: adrian Date: Fri Jul 8 22:37:52 2016 New Revision: 302466 URL: https://svnweb.freebsd.org/changeset/base/302466 Log: [ath_hal] Add setting positioning bit and clear sounding-disable bit. * If fast_ts is set then the TX timestamp is the fast timestamp, not normal TSF. * If the TX descriptor has the position bit set then request locationing and clear sounding-disable. This way we (a) get the response with the TX timestamp from the location side of things, and (b) we get a CSI dump of the response ACK, which we will eventually use in the locationing path. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Fri Jul 8 22:32:03 2016 (r302465) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_xmit_ds.c Fri Jul 8 22:37:52 2016 (r302466) @@ -335,6 +335,9 @@ ar9300_proc_tx_desc(struct ath_hal *ah, ts->ts_ba_low = ads->status5; ts->ts_ba_high = ads->status6; } + if (ads->status8 & AR_tx_fast_ts) { + ts->ts_flags |= HAL_TX_FAST_TS; + } /* * Extract the transmit rate. @@ -624,6 +627,11 @@ ar9300_set_11n_tx_desc( ads->ds_ctl18 = 0; ads->ds_ctl19 = AR_not_sounding; /* set not sounding for normal frame */ + /* ToA/ToD positioning */ + if (flags & HAL_TXDESC_POS) { + ads->ds_ctl12 |= AR_loc_mode; + ads->ds_ctl19 &= ~AR_not_sounding; + } /* * Clear Ness1/2/3 (Number of Extension Spatial Streams) fields.