From owner-svn-src-all@FreeBSD.ORG Sat Mar 19 14:38:29 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B7031065676; Sat, 19 Mar 2011 14:38:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F3648FC1C; Sat, 19 Mar 2011 14:38:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p2JEcTdF025887; Sat, 19 Mar 2011 14:38:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p2JEcTbb025885; Sat, 19 Mar 2011 14:38:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201103191438.p2JEcTbb025885@svn.freebsd.org> From: Adrian Chadd Date: Sat, 19 Mar 2011 14:38:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r219773 - head/sys/dev/ath/ath_hal X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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, 19 Mar 2011 14:38:29 -0000 Author: adrian Date: Sat Mar 19 14:38:28 2011 New Revision: 219773 URL: http://svn.freebsd.org/changeset/base/219773 Log: Add in the channel survey data structures. These will be filled out by the HAL at some point in the future. Modified: head/sys/dev/ath/ath_hal/ah.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Sat Mar 19 14:37:13 2011 (r219772) +++ head/sys/dev/ath/ath_hal/ah.h Sat Mar 19 14:38:28 2011 (r219773) @@ -596,6 +596,33 @@ struct ath_rx_status; struct ieee80211_channel; /* + * This is a channel survey sample entry. + * + * The AR5212 ANI routines fill these samples. The ANI code then uses it + * when calculating listen time; it is also exported via a diagnostic + * API. + */ +typedef struct { + uint32_t seq_num; + uint32_t tx_busy; + uint32_t rx_busy; + uint32_t chan_busy; + uint32_t cycle_count; +} HAL_SURVEY_SAMPLE; + +/* + * This provides 3.2 seconds of sample space given an + * ANI time of 1/10th of a second. This may not be enough! + */ +#define CHANNEL_SURVEY_SAMPLE_COUNT 32 + +typedef struct { + HAL_SURVEY_SAMPLE samples[CHANNEL_SURVEY_SAMPLE_COUNT]; + uint32_t cur_sample; /* current sample in sequence */ + uint32_t cur_seq; /* current sequence number */ +} HAL_CHANNEL_SURVEY; + +/* * Hardware Access Layer (HAL) API. * * Clients of the HAL call ath_hal_attach to obtain a reference to an