cnss_logger.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. struct sk_buff;
  15. struct wiphy;
  16. #ifdef CONFIG_CNSS_LOGGER
  17. int cnss_logger_event_register(int radio, int event,
  18. int (*cb)(struct sk_buff *skb));
  19. int cnss_logger_event_unregister(int radio, int event,
  20. int (*cb)(struct sk_buff *skb));
  21. int cnss_logger_device_register(struct wiphy *wiphy, const char *name);
  22. int cnss_logger_device_unregister(int radio, struct wiphy *wiphy);
  23. int cnss_logger_nl_ucast(struct sk_buff *skb, int portid, int flag);
  24. int cnss_logger_nl_bcast(struct sk_buff *skb, int portid, int flag);
  25. #else
  26. static inline int cnss_logger_event_register(int radio, int event,
  27. int (*cb)(struct sk_buff *skb))
  28. {
  29. return 0;
  30. }
  31. static inline int cnss_logger_event_unregister(int radio, int event,
  32. int (*cb)(struct sk_buff *skb))
  33. {
  34. return 0;
  35. }
  36. static inline int cnss_logger_device_register(struct wiphy *wiphy,
  37. const char *name)
  38. {
  39. return 0;
  40. }
  41. static inline int cnss_logger_device_unregister(int radio, struct wiphy *wiphy)
  42. {
  43. return 0;
  44. }
  45. static inline int cnss_logger_nl_ucast(struct sk_buff *skb, int portid,
  46. int flag)
  47. {
  48. return 0;
  49. }
  50. static inline int cnss_logger_nl_bcast(struct sk_buff *skb, int portid,
  51. int flag)
  52. {
  53. return 0;
  54. }
  55. #endif /* CONFIG_CNSS_LOGGER */
  56. #endif /* _NET_CNSS_H_ */