Kai Liu | 4cf2139 | 2017-12-15 21:14:08 +0800 | [diff] [blame] | 1 | /* 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 | |
| 15 | struct sk_buff; |
| 16 | struct wiphy; |
| 17 | |
| 18 | #ifdef CONFIG_CNSS_LOGGER |
| 19 | int cnss_logger_event_register(int radio, int event, |
| 20 | int (*cb)(struct sk_buff *skb)); |
| 21 | int cnss_logger_event_unregister(int radio, int event, |
| 22 | int (*cb)(struct sk_buff *skb)); |
| 23 | int cnss_logger_device_register(struct wiphy *wiphy, const char *name); |
| 24 | int cnss_logger_device_unregister(int radio, struct wiphy *wiphy); |
| 25 | int cnss_logger_nl_ucast(struct sk_buff *skb, int portid, int flag); |
| 26 | int cnss_logger_nl_bcast(struct sk_buff *skb, int portid, int flag); |
| 27 | #else |
| 28 | static inline int cnss_logger_event_register(int radio, int event, |
| 29 | int (*cb)(struct sk_buff *skb)) |
| 30 | { |
| 31 | return 0; |
| 32 | } |
| 33 | static inline int cnss_logger_event_unregister(int radio, int event, |
| 34 | int (*cb)(struct sk_buff *skb)) |
| 35 | { |
| 36 | return 0; |
| 37 | } |
| 38 | static inline int cnss_logger_device_register(struct wiphy *wiphy, |
| 39 | const char *name) |
| 40 | { |
| 41 | return 0; |
| 42 | } |
| 43 | static inline int cnss_logger_device_unregister(int radio, struct wiphy *wiphy) |
| 44 | { |
| 45 | return 0; |
| 46 | } |
| 47 | static inline int cnss_logger_nl_ucast(struct sk_buff *skb, int portid, |
| 48 | int flag) |
| 49 | { |
| 50 | return 0; |
| 51 | } |
| 52 | static 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 | |