linux/drivers/net/wireless/mediatek/mt76/mt7921/mt7921_trace.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: ISC */
   2/*
   3 * Copyright (C) 2021 Lorenzo Bianconi <lorenzo@kernel.org>
   4 */
   5
   6#if !defined(__MT7921_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
   7#define __MT7921_TRACE_H
   8
   9#include <linux/tracepoint.h>
  10#include "mt7921.h"
  11
  12#undef TRACE_SYSTEM
  13#define TRACE_SYSTEM mt7921
  14
  15#define MAXNAME         32
  16#define DEV_ENTRY       __array(char, wiphy_name, 32)
  17#define DEV_ASSIGN      strlcpy(__entry->wiphy_name,    \
  18                                wiphy_name(mt76_hw(dev)->wiphy), MAXNAME)
  19#define DEV_PR_FMT      "%s"
  20#define DEV_PR_ARG      __entry->wiphy_name
  21#define LP_STATE_PR_ARG __entry->lp_state ? "lp ready" : "lp not ready"
  22
  23TRACE_EVENT(lp_event,
  24        TP_PROTO(struct mt7921_dev *dev, u8 lp_state),
  25
  26        TP_ARGS(dev, lp_state),
  27
  28        TP_STRUCT__entry(
  29                DEV_ENTRY
  30                __field(u8, lp_state)
  31        ),
  32
  33        TP_fast_assign(
  34                DEV_ASSIGN;
  35                __entry->lp_state = lp_state;
  36        ),
  37
  38        TP_printk(
  39                DEV_PR_FMT " %s",
  40                DEV_PR_ARG, LP_STATE_PR_ARG
  41        )
  42);
  43
  44#endif
  45
  46#undef TRACE_INCLUDE_PATH
  47#define TRACE_INCLUDE_PATH .
  48#undef TRACE_INCLUDE_FILE
  49#define TRACE_INCLUDE_FILE mt7921_trace
  50
  51#include <trace/define_trace.h>
  52