aboutsummaryrefslogtreecommitdiff
path: root/include/net/htc_net_debug.h
blob: 75932881571cda1e9d18904f70fa86ababba7cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Copyright (c) 2015, HTC Corporation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
#ifndef _HTC_NET_DEBUG_H
#define _HTC_NET_DEBUG_H

#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/debugfs.h>
#include <linux/sched.h>
#if 0
#include <linux/ipc_logging.h>
#endif

#ifdef CONFIG_HTC_NET_DEBUG
extern int htc_net_debug_dump;
extern int htc_net_debug_print;
extern int htc_net_debug_enable;

extern void net_dbg_log_event(const char * event, ...);
extern void net_dumplog(void);

#define NET_DEBUG(fmt, args...) \
do{ \
	if(htc_net_debug_enable) \
		net_dbg_log_event("[NET]" fmt, ##args); \
} while(0)
#else
static inline void net_dumplog(void)
{
}

#define NET_DEBUG(fmt, args...) do { } while(0)
#endif

#endif /* end of _HTC_NET_DEBUG_H */