wda.h 1.9 KB

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