From a84a4713de0500ab8feeea453bdb463e652dce91 Mon Sep 17 00:00:00 2001 From: Dmitry Tarnyagin Date: Fri, 30 Sep 2011 17:52:09 +0200 Subject: 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 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/32996 Reviewed-by: QABUILD Reviewed-by: Bartosz MARKOWSKI Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/33537 Reviewed-by: Philippe LANGLAIS --- drivers/staging/cw1200/wsm.h | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'drivers/staging/cw1200/wsm.h') 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); } -- cgit v1.2.3