wda.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /* Copyright (c) 2018,2021, The Linux Foundation. All rights reserved.
  3. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
  4. */
  5. #include <linux/version.h>
  6. #undef TRACE_SYSTEM
  7. #define TRACE_SYSTEM wda
  8. #undef TRACE_INCLUDE_PATH
  9. #if defined(RMNET_LA_PLATFORM)
  10. #define TRACE_INCLUDE_PATH ../../../../vendor/qcom/opensource/datarmnet/core
  11. #elif defined(__arch_um__)
  12. #define TRACE_INCLUDE_PATH ../../datarmnet/core
  13. #elif defined(RMNET_TRACE_INCLUDE_LE)
  14. #define TRACE_INCLUDE_PATH ../../../../../../../datarmnet/core
  15. #else
  16. #define TRACE_INCLUDE_PATH ../../../../../../../src/datarmnet/core
  17. #endif /* defined(RMNET_LA_PLATFORM) */
  18. #define TRACE_INCLUDE_FILE wda
  19. #if !defined(_TRACE_WDA_H) || defined(TRACE_HEADER_MULTI_READ)
  20. #define _TRACE_WDA_H
  21. #include <linux/tracepoint.h>
  22. TRACE_EVENT(wda_set_powersave_mode,
  23. TP_PROTO(int enable),
  24. TP_ARGS(enable),
  25. TP_STRUCT__entry(
  26. __field(int, enable)
  27. ),
  28. TP_fast_assign(
  29. __entry->enable = enable;
  30. ),
  31. TP_printk("set powersave mode to %s",
  32. __entry->enable ? "enable" : "disable")
  33. );
  34. TRACE_EVENT(wda_client_state_up,
  35. TP_PROTO(u32 instance, u32 ep_type, u32 iface),
  36. TP_ARGS(instance, ep_type, iface),
  37. TP_STRUCT__entry(
  38. __field(u32, instance)
  39. __field(u32, ep_type)
  40. __field(u32, iface)
  41. ),
  42. TP_fast_assign(
  43. __entry->instance = instance;
  44. __entry->ep_type = ep_type;
  45. __entry->iface = iface;
  46. ),
  47. TP_printk("Client: Connected with WDA instance=%u ep_type=%u i_id=%u",
  48. __entry->instance, __entry->ep_type, __entry->iface)
  49. );
  50. TRACE_EVENT(wda_client_state_down,
  51. TP_PROTO(int from_cb),
  52. TP_ARGS(from_cb),
  53. TP_STRUCT__entry(
  54. __field(int, from_cb)
  55. ),
  56. TP_fast_assign(
  57. __entry->from_cb = from_cb;
  58. ),
  59. TP_printk("Client: Connection with WDA lost Exit by callback %d",
  60. __entry->from_cb)
  61. );
  62. #endif /* _TRACE_WDA_H */
  63. /* This part must be outside protection */
  64. #include <trace/define_trace.h>