WIP FPC-III support
[linux/fpc-iii.git] / drivers / net / wireless / st / cw1200 / debug.h
blob80bc1567533ade9550fcac3e0fecdf9eaa303200
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * DebugFS code for ST-Ericsson CW1200 mac80211 driver
5 * Copyright (c) 2011, ST-Ericsson
6 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
7 */
9 #ifndef CW1200_DEBUG_H_INCLUDED
10 #define CW1200_DEBUG_H_INCLUDED
12 struct cw1200_debug_priv {
13 struct dentry *debugfs_phy;
14 int tx;
15 int tx_agg;
16 int rx;
17 int rx_agg;
18 int tx_multi;
19 int tx_multi_frames;
20 int tx_cache_miss;
21 int tx_align;
22 int tx_ttl;
23 int tx_burst;
24 int ba_cnt;
25 int ba_acc;
26 int ba_cnt_rx;
27 int ba_acc_rx;
30 int cw1200_debug_init(struct cw1200_common *priv);
31 void cw1200_debug_release(struct cw1200_common *priv);
33 static inline void cw1200_debug_txed(struct cw1200_common *priv)
35 ++priv->debug->tx;
38 static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
40 ++priv->debug->tx_agg;
43 static inline void cw1200_debug_txed_multi(struct cw1200_common *priv,
44 int count)
46 ++priv->debug->tx_multi;
47 priv->debug->tx_multi_frames += count;
50 static inline void cw1200_debug_rxed(struct cw1200_common *priv)
52 ++priv->debug->rx;
55 static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
57 ++priv->debug->rx_agg;
60 static inline void cw1200_debug_tx_cache_miss(struct cw1200_common *priv)
62 ++priv->debug->tx_cache_miss;
65 static inline void cw1200_debug_tx_align(struct cw1200_common *priv)
67 ++priv->debug->tx_align;
70 static inline void cw1200_debug_tx_ttl(struct cw1200_common *priv)
72 ++priv->debug->tx_ttl;
75 static inline void cw1200_debug_tx_burst(struct cw1200_common *priv)
77 ++priv->debug->tx_burst;
80 static inline void cw1200_debug_ba(struct cw1200_common *priv,
81 int ba_cnt, int ba_acc,
82 int ba_cnt_rx, int ba_acc_rx)
84 priv->debug->ba_cnt = ba_cnt;
85 priv->debug->ba_acc = ba_acc;
86 priv->debug->ba_cnt_rx = ba_cnt_rx;
87 priv->debug->ba_acc_rx = ba_acc_rx;
90 #endif /* CW1200_DEBUG_H_INCLUDED */