aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/trace.h
diff options
context:
space:
mode:
authorAntonio Quartulli <antonio@open-mesh.com>2014-05-19 21:53:20 +0200
committerJohannes Berg <johannes.berg@intel.com>2014-05-21 09:15:16 +0200
commitcca674d47e59665630f3005291b61bb883015fc5 (patch)
treebd83cc2c0b576cdc7adae72ca7c170c1e1648fa8 /net/mac80211/trace.h
parentcfg80211: export expected throughput through get_station() (diff)
downloadlinux-dev-cca674d47e59665630f3005291b61bb883015fc5.tar.xz
linux-dev-cca674d47e59665630f3005291b61bb883015fc5.zip
mac80211: export the expected throughput
Add get_expected_throughput() API to mac80211 so that each driver can implement its own version based on the RC algorithm they are using (might be using an HW RC algo). The API returns a value expressed in Kbps. Also, add the new get_expected_throughput() member to the rate_control_ops structure in order to be able to query the RC algorithm (this patch provides an implementation of this API for both minstrel and minstrel_ht). The related member in the station_info object is now filled accordingly when dumping a station. Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Antonio Quartulli <antonio@open-mesh.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/trace.h')
-rw-r--r--net/mac80211/trace.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index a0b0aea76525..942f64b8ce0e 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -184,6 +184,20 @@ TRACE_EVENT(drv_return_bool,
"true" : "false")
);
+TRACE_EVENT(drv_return_u32,
+ TP_PROTO(struct ieee80211_local *local, u32 ret),
+ TP_ARGS(local, ret),
+ TP_STRUCT__entry(
+ LOCAL_ENTRY
+ __field(u32, ret)
+ ),
+ TP_fast_assign(
+ LOCAL_ASSIGN;
+ __entry->ret = ret;
+ ),
+ TP_printk(LOCAL_PR_FMT " - %u", LOCAL_PR_ARG, __entry->ret)
+);
+
TRACE_EVENT(drv_return_u64,
TP_PROTO(struct ieee80211_local *local, u64 ret),
TP_ARGS(local, ret),
@@ -1499,6 +1513,24 @@ DEFINE_EVENT(local_sdata_evt, drv_leave_ibss,
TP_ARGS(local, sdata)
);
+TRACE_EVENT(drv_get_expected_throughput,
+ TP_PROTO(struct ieee80211_sta *sta),
+
+ TP_ARGS(sta),
+
+ TP_STRUCT__entry(
+ STA_ENTRY
+ ),
+
+ TP_fast_assign(
+ STA_ASSIGN;
+ ),
+
+ TP_printk(
+ STA_PR_FMT, STA_PR_ARG
+ )
+);
+
/*
* Tracing for API calls that drivers call.
*/