wda.h 2.1 KB

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