diff options
author | Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> | 2011-09-30 17:52:09 +0200 |
---|---|---|
committer | Philippe LANGLAIS <philippe.langlais@stericsson.com> | 2011-10-13 10:21:35 +0200 |
commit | a84a4713de0500ab8feeea453bdb463e652dce91 (patch) | |
tree | 39628d19729769446c3e5de7b3afe23eed811975 /drivers/staging/cw1200/wsm.h | |
parent | 6e3981004bc9090a5886de6f0b668af66f9463a6 (diff) |
cw1200: New debugfs entry for firmware counters
New R/O entry /sys/kernel/debug/ieee80211/phy0/cw1200/counters
provides access to low-level PHY counters in firmware.
ST-Ericsson ID: 365735
Change-Id: I6fdfade61791cdf3dc28e1477ae3d7bf5a217d1f
Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32996
Reviewed-by: QABUILD
Reviewed-by: Bartosz MARKOWSKI <bartosz.markowski@tieto.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33537
Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/cw1200/wsm.h')
-rw-r--r-- | drivers/staging/cw1200/wsm.h | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/drivers/staging/cw1200/wsm.h b/drivers/staging/cw1200/wsm.h index adb34765c5c..11e18005200 100644 --- a/drivers/staging/cw1200/wsm.h +++ b/drivers/staging/cw1200/wsm.h @@ -1266,7 +1266,39 @@ static inline int wsm_set_rcpi_rssi_threshold(struct cw1200_common *priv, sizeof(*arg)); } -static inline int wsm_get_station_id(struct cw1200_common *priv, u8 * mac) +struct wsm_counters_table { + __le32 countPlcpErrors; + __le32 countFcsErrors; + __le32 countTxPackets; + __le32 countRxPackets; + __le32 countRxPacketErrors; + __le32 countRxDecryptionFailures; + __le32 countRxMicFailures; + __le32 countRxNoKeyFailures; + __le32 countTxMulticastFrames; + __le32 countTxFramesSuccess; + __le32 countTxFrameFailures; + __le32 countTxFramesRetried; + __le32 countTxFramesMultiRetried; + __le32 countRxFrameDuplicates; + __le32 countRtsSuccess; + __le32 countRtsFailures; + __le32 countAckFailures; + __le32 countRxMulticastFrames; + __le32 countRxFramesSuccess; + __le32 countRxCMACICVErrors; + __le32 countRxCMACReplays; + __le32 countRxMgmtCCMPReplays; +}; + +static inline int wsm_get_counters_table(struct cw1200_common *priv, + struct wsm_counters_table *arg) +{ + return wsm_read_mib(priv, WSM_MIB_ID_COUNTERS_TABLE, + arg, sizeof(*arg)); +} + +static inline int wsm_get_station_id(struct cw1200_common *priv, u8 *mac) { return wsm_read_mib(priv, WSM_MIB_ID_DOT11_STATION_ID, mac, ETH_ALEN); } |