blob: f06ec9b61b63e63f1ad979009862c087f7108012 [file] [log] [blame]
Kai Liu4cf21392017-12-15 21:14:08 +08001/* Copyright (c) 2016-2018, The Linux Foundation. All rights reserved.
2 *
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
6 *
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
11 */
12#ifndef _NET_CNSS_LOGGER_H_
13#define _NET_CNSS_LOGGER_H_
14
15struct sk_buff;
16struct wiphy;
17
18#ifdef CONFIG_CNSS_LOGGER
19int cnss_logger_event_register(int radio, int event,
20 int (*cb)(struct sk_buff *skb));
21int cnss_logger_event_unregister(int radio, int event,
22 int (*cb)(struct sk_buff *skb));
23int cnss_logger_device_register(struct wiphy *wiphy, const char *name);
24int cnss_logger_device_unregister(int radio, struct wiphy *wiphy);
25int cnss_logger_nl_ucast(struct sk_buff *skb, int portid, int flag);
26int cnss_logger_nl_bcast(struct sk_buff *skb, int portid, int flag);
27#else
28static inline int cnss_logger_event_register(int radio, int event,
29 int (*cb)(struct sk_buff *skb))
30{
31 return 0;
32}
33static inline int cnss_logger_event_unregister(int radio, int event,
34 int (*cb)(struct sk_buff *skb))
35{
36 return 0;
37}
38static inline int cnss_logger_device_register(struct wiphy *wiphy,
39 const char *name)
40{
41 return 0;
42}
43static inline int cnss_logger_device_unregister(int radio, struct wiphy *wiphy)
44{
45 return 0;
46}
47static inline int cnss_logger_nl_ucast(struct sk_buff *skb, int portid,
48 int flag)
49{
50 return 0;
51}
52static inline int cnss_logger_nl_bcast(struct sk_buff *skb, int portid,
53 int flag)
54{
55 return 0;
56}
57#endif /* CONFIG_CNSS_LOGGER */
58#endif /* _NET_CNSS_H_ */
59