summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/ath_hal/ah_internal.h
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2015-03-29 21:50:21 +0000
committeradrian <adrian@FreeBSD.org>2015-03-29 21:50:21 +0000
commit2bbb9a72759a8c50ac155a6fca9ad3e01dd24388 (patch)
tree55126fbece1b43a96fb42233d3cf3f87063c22c6 /sys/dev/ath/ath_hal/ah_internal.h
parent598c20db1bc5970bf44e7a46a80910feca0c69cd (diff)
downloadFreeBSD-src-2bbb9a72759a8c50ac155a6fca9ad3e01dd24388.zip
FreeBSD-src-2bbb9a72759a8c50ac155a6fca9ad3e01dd24388.tar.gz
Move the HAL channel survey support out to be in the top-level HAL,
rathe than private in each HAL module. Whilst here, modify ath_hal_private to always have the per-channel noisefloor stats, rather than conditionally. This just makes life easier in general (no strange ABI differences between different HAL compile options.) Add a couple of methods (clear/reset, add) rather than using hand-rolled versions of things.
Diffstat (limited to 'sys/dev/ath/ath_hal/ah_internal.h')
-rw-r--r--sys/dev/ath/ath_hal/ah_internal.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ah_internal.h b/sys/dev/ath/ath_hal/ah_internal.h
index 33d11fd..0c855d4 100644
--- a/sys/dev/ath/ath_hal/ah_internal.h
+++ b/sys/dev/ath/ath_hal/ah_internal.h
@@ -422,9 +422,13 @@ struct ath_hal_private {
uint32_t ah_fatalState[6]; /* AR_ISR+shadow regs */
int ah_rxornIsFatal; /* how to treat HAL_INT_RXORN */
-#ifndef ATH_NF_PER_CHAN
+ /* Only used if ATH_NF_PER_CHAN is defined */
HAL_NFCAL_HIST_FULL nf_cal_hist;
-#endif /* ! ATH_NF_PER_CHAN */
+
+ /*
+ * Channel survey history - current channel only.
+ */
+ HAL_CHANNEL_SURVEY ah_chansurvey; /* channel survey */
};
#define AH_PRIVATE(_ah) ((struct ath_hal_private *)(_ah))
@@ -1029,4 +1033,15 @@ ath_hal_getantennaallowed(struct ath_hal *ah,
*/
extern int ath_hal_mhz2ieee_2ghz(struct ath_hal *, HAL_CHANNEL_INTERNAL *);
+/*
+ * Clear the channel survey data.
+ */
+extern void ath_hal_survey_clear(struct ath_hal *ah);
+
+/*
+ * Add a sample to the channel survey data.
+ */
+extern void ath_hal_survey_add_sample(struct ath_hal *ah,
+ HAL_SURVEY_SAMPLE *hs);
+
#endif /* _ATH_AH_INTERAL_H_ */
OpenPOWER on IntegriCloud