From 336cfe471e282c8a7ff694c593687126ee9d7ca6 Mon Sep 17 00:00:00 2001 From: Adrian Chadd Date: Sat, 19 Mar 2011 14:38:28 +0000 Subject: [PATCH] Add in the channel survey data structures. These will be filled out by the HAL at some point in the future. --- sys/dev/ath/ath_hal/ah.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/sys/dev/ath/ath_hal/ah.h b/sys/dev/ath/ath_hal/ah.h index 60fae593e6f..9b1b8b4c9bb 100644 --- a/sys/dev/ath/ath_hal/ah.h +++ b/sys/dev/ath/ath_hal/ah.h @@ -595,6 +595,33 @@ struct ath_tx_status; 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. * -- 2.45.2