Files
mt76/mt76x02_trace.h
T
Felix Fietkau 33f29d2345 wifi: mt76: relicense to BSD-3-Clause-Clear
MediaTek has asked to switch from the ISC license to BSD-3-Clause-Clear,
in order to improve clarity and the legal integrity of the code.

The BSD-3-Clause license includes the "no endorsement" clause, which is
important for protecting the reputation of the original authors and
contributors by preventing unauthorized use of their names for endorsement
purposes.

This clause is absent in the BSD-2-Clause license, which is more permissive
but lacks this specific protection.

This change also cleans up the license of some Kconfig/Makefile files,
which were accidentally marked as GPL.

The GPL 2.0 remains in use on mt76x0, as well as two source files in mt7615
for which the license situation still needs to be clarified.

Signed-off-by: Felix Fietkau <[email protected]>
2025-10-13 11:11:19 +02:00

88 lines
1.8 KiB
C

/* SPDX-License-Identifier: BSD-3-Clause-Clear */
/*
* Copyright (C) 2016 Felix Fietkau <[email protected]>
*/
#if !defined(__MT76x02_TRACE_H) || defined(TRACE_HEADER_MULTI_READ)
#define __MT76x02_TRACE_H
#include <linux/tracepoint.h>
#include "mt76x02.h"
#undef TRACE_SYSTEM
#define TRACE_SYSTEM mt76x02
#define MAXNAME 32
#define DEV_ENTRY __array(char, wiphy_name, 32)
#define DEV_ASSIGN strscpy(__entry->wiphy_name, \
wiphy_name(mt76_hw(dev)->wiphy), MAXNAME)
#define DEV_PR_FMT "%s"
#define DEV_PR_ARG __entry->wiphy_name
#define TXID_ENTRY __field(u8, wcid) __field(u8, pktid)
#define TXID_PR_FMT " [%d:%d]"
#define TXID_PR_ARG __entry->wcid, __entry->pktid
DECLARE_EVENT_CLASS(dev_evt,
TP_PROTO(struct mt76x02_dev *dev),
TP_ARGS(dev),
TP_STRUCT__entry(
DEV_ENTRY
),
TP_fast_assign(
DEV_ASSIGN;
),
TP_printk(DEV_PR_FMT, DEV_PR_ARG)
);
DEFINE_EVENT(dev_evt, mac_txstat_poll,
TP_PROTO(struct mt76x02_dev *dev),
TP_ARGS(dev)
);
TRACE_EVENT(mac_txstat_fetch,
TP_PROTO(struct mt76x02_dev *dev,
struct mt76x02_tx_status *stat),
TP_ARGS(dev, stat),
TP_STRUCT__entry(
DEV_ENTRY
TXID_ENTRY
__field(bool, success)
__field(bool, aggr)
__field(bool, ack_req)
__field(u16, rate)
__field(u8, retry)
),
TP_fast_assign(
DEV_ASSIGN;
__entry->success = stat->success;
__entry->aggr = stat->aggr;
__entry->ack_req = stat->ack_req;
__entry->wcid = stat->wcid;
__entry->pktid = stat->pktid;
__entry->rate = stat->rate;
__entry->retry = stat->retry;
),
TP_printk(
DEV_PR_FMT TXID_PR_FMT
" success:%d aggr:%d ack_req:%d"
" rate:%04x retry:%d",
DEV_PR_ARG, TXID_PR_ARG,
__entry->success, __entry->aggr, __entry->ack_req,
__entry->rate, __entry->retry
)
);
#endif
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE mt76x02_trace
#include <trace/define_trace.h>