From owner-svn-src-head@freebsd.org Wed Aug 5 21:16:13 2015 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 535E59B4AA1; Wed, 5 Aug 2015 21:16:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::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 441D0EAB; Wed, 5 Aug 2015 21:16:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.14.9/8.14.9) with ESMTP id t75LGDJv041548; Wed, 5 Aug 2015 21:16:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.14.9/8.14.9/Submit) id t75LGDgr041547; Wed, 5 Aug 2015 21:16:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201508052116.t75LGDgr041547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Wed, 5 Aug 2015 21:16:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r286342 - 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.20 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: Wed, 05 Aug 2015 21:16:13 -0000 Author: adrian Date: Wed Aug 5 21:16:12 2015 New Revision: 286342 URL: https://svnweb.freebsd.org/changeset/base/286342 Log: Add a missing method - ath_hal_settsf64(). This is required for TDMA slave mode. Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Wed Aug 5 21:11:32 2015 (r286341) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Wed Aug 5 21:16:12 2015 (r286342) @@ -97,6 +97,18 @@ ar9300_freebsd_get_cts_timeout(struct at return ath_hal_mac_usec(ah, clks); /* convert from system clocks */ } +static void +ar9300_freebsd_set_tsf64(struct ath_hal *ah, uint64_t tsf64) +{ + + /* + * XXX TODO: read ar5416SetTsf64() - we should wait before we do + * this. + */ + OS_REG_WRITE(ah, AR_TSF_L32, tsf64 & 0xffffffff); + OS_REG_WRITE(ah, AR_TSF_U32, (tsf64 >> 32) & 0xffffffff); +} + void ar9300_attach_freebsd_ops(struct ath_hal *ah) { @@ -182,6 +194,7 @@ ar9300_attach_freebsd_ops(struct ath_hal ah->ah_getTsf32 = ar9300_get_tsf32; ah->ah_getTsf64 = ar9300_get_tsf64; ah->ah_resetTsf = ar9300_reset_tsf; + ah->ah_setTsf64 = ar9300_freebsd_set_tsf64; ah->ah_detectCardPresent = ar9300_detect_card_present; // ah->ah_updateMibCounters = ar9300_update_mib_counters; ah->ah_getRfGain = ar9300_get_rfgain;