summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/ath/ath5k/base.h
diff options
context:
space:
mode:
authorBruno Randolf <br1@einfach.org>2010-03-09 16:55:17 +0900
committerJohn W. Linville <linville@tuxdriver.com>2010-03-10 17:44:30 -0500
commit604eeadd1880bddfb155369491cc13fb8d3f9df6 (patch)
treec9a7357fa34d9751c0dc2b36fb1004281a083cfb /drivers/net/wireless/ath/ath5k/base.h
parent5a7d05830de1ecfdaf0a9fb43e4aa08abbdbfe9f (diff)
ath5k: add antenna statistics and debugfs file for antenna settings
keep statistics about which antenna was used for TX and RX. this is used only for debugging right now, but might have other applications later. add a new file 'antenna' in debugfs (/sys/kernel/debug/ath5k/phy0/antenna) to show antenna use statistics and antenna diversity related register values. it can also be used to set the antenna mode until we have proper support for that in iw: - echo diversity > antenna: use default antenna mode (RX and TX diversity) - echo fixed-a > antenna: use fixed antenna A for RX and TX - echo fixed-b > antenna: use fixed antenna B for RX and TX - echo clear > antenna: reset antenna statistics Signed-off-by: Bruno Randolf <br1@einfach.org> Acked-by: Nick Kossifidis <mickflemm@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/base.h')
-rw-r--r--drivers/net/wireless/ath/ath5k/base.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 7e1a88a5abdb..ca525842d827 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -105,6 +105,12 @@ struct ath5k_rfkill {
struct tasklet_struct toggleq;
};
+/* statistics (only used for debugging now) */
+struct ath5k_statistics {
+ unsigned int antenna_rx[5]; /* frames count per antenna RX */
+ unsigned int antenna_tx[5]; /* frames count per antenna TX */
+};
+
#if CHAN_DEBUG
#define ATH_CHAN_MAX (26+26+26+200+200)
#else
@@ -191,6 +197,8 @@ struct ath5k_softc {
int power_level; /* Requested tx power in dbm */
bool assoc; /* associate state */
bool enable_beacon; /* true if beacons are on */
+
+ struct ath5k_statistics stats;
};
#define ath5k_hw_hasbssidmask(_ah) \