Linux Audio

Check our new training course

Loading...
v6.8
 1/* SPDX-License-Identifier: GPL-2.0-only */
 2/*
 3 * DebugFS code for ST-Ericsson CW1200 mac80211 driver
 4 *
 5 * Copyright (c) 2011, ST-Ericsson
 6 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
 
 
 
 
 7 */
 8
 9#ifndef CW1200_DEBUG_H_INCLUDED
10#define CW1200_DEBUG_H_INCLUDED
11
12struct 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;
28};
29
30int cw1200_debug_init(struct cw1200_common *priv);
31void cw1200_debug_release(struct cw1200_common *priv);
32
33static inline void cw1200_debug_txed(struct cw1200_common *priv)
34{
35	++priv->debug->tx;
36}
37
38static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
39{
40	++priv->debug->tx_agg;
41}
42
43static inline void cw1200_debug_txed_multi(struct cw1200_common *priv,
44					   int count)
45{
46	++priv->debug->tx_multi;
47	priv->debug->tx_multi_frames += count;
48}
49
50static inline void cw1200_debug_rxed(struct cw1200_common *priv)
51{
52	++priv->debug->rx;
53}
54
55static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
56{
57	++priv->debug->rx_agg;
58}
59
60static inline void cw1200_debug_tx_cache_miss(struct cw1200_common *priv)
61{
62	++priv->debug->tx_cache_miss;
63}
64
65static inline void cw1200_debug_tx_align(struct cw1200_common *priv)
66{
67	++priv->debug->tx_align;
68}
69
70static inline void cw1200_debug_tx_ttl(struct cw1200_common *priv)
71{
72	++priv->debug->tx_ttl;
73}
74
75static inline void cw1200_debug_tx_burst(struct cw1200_common *priv)
76{
77	++priv->debug->tx_burst;
78}
79
80static 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)
83{
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;
88}
89
90#endif /* CW1200_DEBUG_H_INCLUDED */
v4.6
 
 1/*
 2 * DebugFS code for ST-Ericsson CW1200 mac80211 driver
 3 *
 4 * Copyright (c) 2011, ST-Ericsson
 5 * Author: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
 6 *
 7 * This program is free software; you can redistribute it and/or modify
 8 * it under the terms of the GNU General Public License version 2 as
 9 * published by the Free Software Foundation.
10 */
11
12#ifndef CW1200_DEBUG_H_INCLUDED
13#define CW1200_DEBUG_H_INCLUDED
14
15struct cw1200_debug_priv {
16	struct dentry *debugfs_phy;
17	int tx;
18	int tx_agg;
19	int rx;
20	int rx_agg;
21	int tx_multi;
22	int tx_multi_frames;
23	int tx_cache_miss;
24	int tx_align;
25	int tx_ttl;
26	int tx_burst;
27	int ba_cnt;
28	int ba_acc;
29	int ba_cnt_rx;
30	int ba_acc_rx;
31};
32
33int cw1200_debug_init(struct cw1200_common *priv);
34void cw1200_debug_release(struct cw1200_common *priv);
35
36static inline void cw1200_debug_txed(struct cw1200_common *priv)
37{
38	++priv->debug->tx;
39}
40
41static inline void cw1200_debug_txed_agg(struct cw1200_common *priv)
42{
43	++priv->debug->tx_agg;
44}
45
46static inline void cw1200_debug_txed_multi(struct cw1200_common *priv,
47					   int count)
48{
49	++priv->debug->tx_multi;
50	priv->debug->tx_multi_frames += count;
51}
52
53static inline void cw1200_debug_rxed(struct cw1200_common *priv)
54{
55	++priv->debug->rx;
56}
57
58static inline void cw1200_debug_rxed_agg(struct cw1200_common *priv)
59{
60	++priv->debug->rx_agg;
61}
62
63static inline void cw1200_debug_tx_cache_miss(struct cw1200_common *priv)
64{
65	++priv->debug->tx_cache_miss;
66}
67
68static inline void cw1200_debug_tx_align(struct cw1200_common *priv)
69{
70	++priv->debug->tx_align;
71}
72
73static inline void cw1200_debug_tx_ttl(struct cw1200_common *priv)
74{
75	++priv->debug->tx_ttl;
76}
77
78static inline void cw1200_debug_tx_burst(struct cw1200_common *priv)
79{
80	++priv->debug->tx_burst;
81}
82
83static inline void cw1200_debug_ba(struct cw1200_common *priv,
84				   int ba_cnt, int ba_acc,
85				   int ba_cnt_rx, int ba_acc_rx)
86{
87	priv->debug->ba_cnt = ba_cnt;
88	priv->debug->ba_acc = ba_acc;
89	priv->debug->ba_cnt_rx = ba_cnt_rx;
90	priv->debug->ba_acc_rx = ba_acc_rx;
91}
92
93#endif /* CW1200_DEBUG_H_INCLUDED */