summaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.h
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2014-10-26 00:32:53 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-11-04 10:15:09 +0100
commit5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93 (patch)
tree3a53814de5743eb3fdf491609a050a417632c9f4 /net/mac80211/trace.h
parentieee80211: add "max length of AMPDU" enum for VHT (diff)
downloadlinux-5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93.tar.xz
linux-5b3dc42b1b0db0264bbbe4ae44c15ab97bfd1e93.zip
mac80211: add support for driver tx power reporting
The configured tx power is often limited by hardware capabilities, channel settings, antenna configuration, etc. Signed-off-by: Felix Fietkau <nbd@openwrt.org> [fix tracing compilation] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r--net/mac80211/trace.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index 976606aebac9..aeeace5ba47b 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -2150,6 +2150,33 @@ DEFINE_EVENT(local_sdata_evt, drv_post_channel_switch,
TP_ARGS(local, sdata)
);
+TRACE_EVENT(drv_get_txpower,
+ TP_PROTO(struct ieee80211_local *local,
+ struct ieee80211_sub_if_data *sdata,
+ int dbm, int ret),
+
+ TP_ARGS(local, sdata, dbm, ret),
+
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ VIF_ENTRY
+ __field(int, dbm)
+ __field(int, ret)
+ ),
+
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ VIF_ASSIGN;
+ __entry->dbm = dbm;
+ __entry->ret = ret;
+ ),
+
+ TP_printk(
+ LOCAL_PR_FMT VIF_PR_FMT " dbm:%d ret:%d",
+ LOCAL_PR_ARG, VIF_PR_ARG, __entry->dbm, __entry->ret
+ )
+);
+
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
#undef TRACE_SYSTEM