From owner-svn-src-all@freebsd.org Fri Feb 3 05:15:10 2017 Return-Path: Delivered-To: svn-src-all@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 556D7CCE019; Fri, 3 Feb 2017 05:15:10 +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 F1AF8790; Fri, 3 Feb 2017 05:15:09 +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 v135F9Uc089044; Fri, 3 Feb 2017 05:15:09 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v135F84O089041; Fri, 3 Feb 2017 05:15:08 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201702030515.v135F84O089041@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Fri, 3 Feb 2017 05:15:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r313135 - head/sys/dev/ath/ath_hal X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 03 Feb 2017 05:15:10 -0000 Author: adrian Date: Fri Feb 3 05:15:08 2017 New Revision: 313135 URL: https://svnweb.freebsd.org/changeset/base/313135 Log: [ath_hal] prepare for CAC quiet time. To support DFS, the NIC needs to be very quiet during this time. No transmissions including ACKs are allowed. This is just the initial HAL glue. Modified: head/sys/dev/ath/ath_hal/ah.c head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.c ============================================================================== --- head/sys/dev/ath/ath_hal/ah.c Fri Feb 3 03:57:06 2017 (r313134) +++ head/sys/dev/ath/ath_hal/ah.c Fri Feb 3 05:15:08 2017 (r313135) @@ -1429,6 +1429,21 @@ ath_hal_getcca(struct ath_hal *ah) } /* + * Set the current state of self-generated ACK and RTS/CTS frames. + * + * For correct DFS operation, the device should not even /ACK/ frames + * that are sent to it during CAC or CSA. + */ +void +ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena) +{ + + if (ah->ah_setDfsCacTxQuiet == NULL) + return; + ah->ah_setDfsCacTxQuiet(ah, ena); +} + +/* * This routine is only needed when supporting EEPROM-in-RAM setups * (eg embedded SoCs and on-board PCI/PCIe devices.) */ Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Feb 3 03:57:06 2017 (r313134) +++ head/sys/dev/ath/ath_hal/ah.h Fri Feb 3 05:15:08 2017 (r313135) @@ -1395,6 +1395,7 @@ struct ath_hal { struct ath_rx_status *rxs, uint64_t fulltsf, const char *buf, HAL_DFS_EVENT *event); HAL_BOOL __ahdecl(*ah_isFastClockEnabled)(struct ath_hal *ah); + void __ahdecl(*ah_setDfsCacTxQuiet)(struct ath_hal *, HAL_BOOL); /* Spectral Scan functions */ void __ahdecl(*ah_spectralConfigure)(struct ath_hal *ah, @@ -1660,6 +1661,11 @@ void __ahdecl ath_hal_setcca(struct ath_ int __ahdecl ath_hal_getcca(struct ath_hal *ah); /* + * Enable/disable and get self-gen frame (ACK, CTS) for CAC. + */ +void __ahdecl ath_hal_set_dfs_cac_tx_quiet(struct ath_hal *ah, HAL_BOOL ena); + +/* * Read EEPROM data from ah_eepromdata */ HAL_BOOL __ahdecl ath_hal_EepromDataRead(struct ath_hal *ah,