summaryrefslogtreecommitdiffstats
path: root/net/wireless/trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-10-24 10:17:18 +0200
committerJohannes Berg <johannes.berg@intel.com>2012-10-30 09:11:34 +0100
commitc8442118ad9cd05cfe3b993f058e70ab25b1009a (patch)
treee9d454ef6461e70cf99de76f9dda52952b665e44 /net/wireless/trace.h
parentnl80211: move "can set channel" check (diff)
downloadlinux-c8442118ad9cd05cfe3b993f058e70ab25b1009a.tar.xz
linux-c8442118ad9cd05cfe3b993f058e70ab25b1009a.zip
cfg80211: allow per interface TX power setting
The TX power setting is currently per wiphy (hardware device) but with multi-channel capabilities that doesn't make much sense any more. Allow drivers (and mac80211) to advertise support for per-interface TX power configuration. When the TX power is configured for the wiphy, the wdev will be NULL and the driver can still handle that, but when a wdev is given the TX power can be set only for that wdev now. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/trace.h')
-rw-r--r--net/wireless/trace.h24
1 files changed, 13 insertions, 11 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 0ca71caf85fb..8e03c6382a8a 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -26,7 +26,7 @@
#define WIPHY_PR_ARG MAC_PR_ARG(wiphy_mac)
#define WDEV_ENTRY __field(u32, id)
-#define WDEV_ASSIGN (__entry->id) = (wdev->identifier)
+#define WDEV_ASSIGN (__entry->id) = (wdev ? wdev->identifier : 0)
#define WDEV_PR_FMT ", wdev id: %u"
#define WDEV_PR_ARG (__entry->id)
@@ -260,11 +260,6 @@ DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna,
TP_ARGS(wiphy)
);
-DEFINE_EVENT(wiphy_only_evt, rdev_get_tx_power,
- TP_PROTO(struct wiphy *wiphy),
- TP_ARGS(wiphy)
-);
-
DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll,
TP_PROTO(struct wiphy *wiphy),
TP_ARGS(wiphy)
@@ -1230,22 +1225,29 @@ TRACE_EVENT(rdev_set_wiphy_params,
WIPHY_PR_ARG, __entry->changed)
);
+DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
+ TP_ARGS(wiphy, wdev)
+);
+
TRACE_EVENT(rdev_set_tx_power,
- TP_PROTO(struct wiphy *wiphy, enum nl80211_tx_power_setting type,
- int mbm),
- TP_ARGS(wiphy, type, mbm),
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ enum nl80211_tx_power_setting type, int mbm),
+ TP_ARGS(wiphy, wdev, type, mbm),
TP_STRUCT__entry(
WIPHY_ENTRY
+ WDEV_ENTRY
__field(enum nl80211_tx_power_setting, type)
__field(int, mbm)
),
TP_fast_assign(
WIPHY_ASSIGN;
+ WDEV_ASSIGN;
__entry->type = type;
__entry->mbm = mbm;
),
- TP_printk(WIPHY_PR_FMT ", type: %d, mbm: %d",
- WIPHY_PR_ARG, __entry->type, __entry->mbm)
+ TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", type: %d, mbm: %d",
+ WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm)
);
TRACE_EVENT(rdev_return_int_int,