0001
0002
0003
0004
0005
0006
0007
0008
0009 #ifndef CW1200_DEBUG_H_INCLUDED
0010 #define CW1200_DEBUG_H_INCLUDED
0011
0012 struct cw1200_debug_priv {
0013 struct dentry *debugfs_phy;
0014 int tx;
0015 int tx_agg;
0016 int rx;
0017 int rx_agg;
0018 int tx_multi;
0019 int tx_multi_frames;
0020 int tx_cache_miss;
0021 int tx_align;
0022 int tx_ttl;
0023 int tx_burst;
0024 int ba_cnt;
0025 int ba_acc;
0026 int ba_cnt_rx;
0027 int ba_acc_rx;
0028 };
0029
0030 int cw1200_debug_init(struct cw1200_common *priv);
0031 void cw1200_debug_release(struct cw1200_common *priv);
0032
0033 static inline void cw1200_debug_txed(struct cw1200_common *priv)
0034 {
0035 ++priv->debug->tx;
0036 }
0037
0038 static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
0039 {
0040 ++priv->debug->tx_agg;
0041 }
0042
0043 static inline void cw1200_debug_txed_multi(struct cw1200_common *priv,
0044 int count)
0045 {
0046 ++priv->debug->tx_multi;
0047 priv->debug->tx_multi_frames += count;
0048 }
0049
0050 static inline void cw1200_debug_rxed(struct cw1200_common *priv)
0051 {
0052 ++priv->debug->rx;
0053 }
0054
0055 static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
0056 {
0057 ++priv->debug->rx_agg;
0058 }
0059
0060 static inline void cw1200_debug_tx_cache_miss(struct cw1200_common *priv)
0061 {
0062 ++priv->debug->tx_cache_miss;
0063 }
0064
0065 static inline void cw1200_debug_tx_align(struct cw1200_common *priv)
0066 {
0067 ++priv->debug->tx_align;
0068 }
0069
0070 static inline void cw1200_debug_tx_ttl(struct cw1200_common *priv)
0071 {
0072 ++priv->debug->tx_ttl;
0073 }
0074
0075 static inline void cw1200_debug_tx_burst(struct cw1200_common *priv)
0076 {
0077 ++priv->debug->tx_burst;
0078 }
0079
0080 static inline void cw1200_debug_ba(struct cw1200_common *priv,
0081 int ba_cnt, int ba_acc,
0082 int ba_cnt_rx, int ba_acc_rx)
0083 {
0084 priv->debug->ba_cnt = ba_cnt;
0085 priv->debug->ba_acc = ba_acc;
0086 priv->debug->ba_cnt_rx = ba_cnt_rx;
0087 priv->debug->ba_acc_rx = ba_acc_rx;
0088 }
0089
0090 #endif