brcms_trace_brcmsmac_tx.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. * Copyright (c) 2011 Broadcom Corporation
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  11. * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  13. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #if !defined(__TRACE_BRCMSMAC_TX_H) || defined(TRACE_HEADER_MULTI_READ)
  17. #define __TRACE_BRCMSMAC_TX_H
  18. #include <linux/tracepoint.h>
  19. #undef TRACE_SYSTEM
  20. #define TRACE_SYSTEM brcmsmac_tx
  21. TRACE_EVENT(brcms_txdesc,
  22. TP_PROTO(const struct device *dev,
  23. void *txh, size_t txh_len),
  24. TP_ARGS(dev, txh, txh_len),
  25. TP_STRUCT__entry(
  26. __string(dev, dev_name(dev))
  27. __dynamic_array(u8, txh, txh_len)
  28. ),
  29. TP_fast_assign(
  30. __assign_str(dev, dev_name(dev));
  31. memcpy(__get_dynamic_array(txh), txh, txh_len);
  32. ),
  33. TP_printk("[%s] txdesc", __get_str(dev))
  34. );
  35. TRACE_EVENT(brcms_txstatus,
  36. TP_PROTO(const struct device *dev, u16 framelen, u16 frameid,
  37. u16 status, u16 lasttxtime, u16 sequence, u16 phyerr,
  38. u16 ackphyrxsh),
  39. TP_ARGS(dev, framelen, frameid, status, lasttxtime, sequence, phyerr,
  40. ackphyrxsh),
  41. TP_STRUCT__entry(
  42. __string(dev, dev_name(dev))
  43. __field(u16, framelen)
  44. __field(u16, frameid)
  45. __field(u16, status)
  46. __field(u16, lasttxtime)
  47. __field(u16, sequence)
  48. __field(u16, phyerr)
  49. __field(u16, ackphyrxsh)
  50. ),
  51. TP_fast_assign(
  52. __assign_str(dev, dev_name(dev));
  53. __entry->framelen = framelen;
  54. __entry->frameid = frameid;
  55. __entry->status = status;
  56. __entry->lasttxtime = lasttxtime;
  57. __entry->sequence = sequence;
  58. __entry->phyerr = phyerr;
  59. __entry->ackphyrxsh = ackphyrxsh;
  60. ),
  61. TP_printk("[%s] FrameId %#04x TxStatus %#04x LastTxTime %#04x "
  62. "Seq %#04x PHYTxStatus %#04x RxAck %#04x",
  63. __get_str(dev), __entry->frameid, __entry->status,
  64. __entry->lasttxtime, __entry->sequence, __entry->phyerr,
  65. __entry->ackphyrxsh)
  66. );
  67. TRACE_EVENT(brcms_ampdu_session,
  68. TP_PROTO(const struct device *dev, unsigned max_ampdu_len,
  69. u16 max_ampdu_frames, u16 ampdu_len, u16 ampdu_frames,
  70. u16 dma_len),
  71. TP_ARGS(dev, max_ampdu_len, max_ampdu_frames, ampdu_len, ampdu_frames,
  72. dma_len),
  73. TP_STRUCT__entry(
  74. __string(dev, dev_name(dev))
  75. __field(unsigned, max_ampdu_len)
  76. __field(u16, max_ampdu_frames)
  77. __field(u16, ampdu_len)
  78. __field(u16, ampdu_frames)
  79. __field(u16, dma_len)
  80. ),
  81. TP_fast_assign(
  82. __assign_str(dev, dev_name(dev));
  83. __entry->max_ampdu_len = max_ampdu_len;
  84. __entry->max_ampdu_frames = max_ampdu_frames;
  85. __entry->ampdu_len = ampdu_len;
  86. __entry->ampdu_frames = ampdu_frames;
  87. __entry->dma_len = dma_len;
  88. ),
  89. TP_printk("[%s] ampdu session max_len=%u max_frames=%u len=%u frames=%u dma_len=%u",
  90. __get_str(dev), __entry->max_ampdu_len,
  91. __entry->max_ampdu_frames, __entry->ampdu_len,
  92. __entry->ampdu_frames, __entry->dma_len)
  93. );
  94. #endif /* __TRACE_BRCMSMAC_TX_H */
  95. #ifdef CONFIG_BRCM_TRACING
  96. #undef TRACE_INCLUDE_PATH
  97. #define TRACE_INCLUDE_PATH .
  98. #undef TRACE_INCLUDE_FILE
  99. #define TRACE_INCLUDE_FILE brcms_trace_brcmsmac_tx
  100. #include <trace/define_trace.h>
  101. #endif /* CONFIG_BRCM_TRACING */