summaryrefslogtreecommitdiffstats
path: root/net/wireless/trace.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2022-06-10 11:07:55 +0200
committerJohannes Berg <johannes.berg@intel.com>2022-06-20 12:56:11 +0200
commitf2a0290b2df2b0e65ab78b71c4a15e732afd4458 (patch)
tree8e3f641dfd925f1a349697c37c6596da3c7fe62a /net/wireless/trace.h
parentc8a11ed5539f6df98d06259b5177975162b88510 (diff)
downloadlinux-f2a0290b2df2b0e65ab78b71c4a15e732afd4458.tar.bz2
wifi: cfg80211: add optional link add/remove callbacks
Add some optional callbacks for link add/remove so that drivers can react here. Initially, I thought it would be sufficient to just create the link in start_ap etc., but it turns out that's not so simple, since there are quite a few callbacks that can be called: if they're erroneously without start_ap, things might crash. Thus it might be easier for drivers to allocate all the necessary data structures immediately, to not have to worry about it in each callback, since cfg80211 checks that the link ID is valid (has been added.) Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/trace.h')
-rw-r--r--net/wireless/trace.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index 92742430958e..65f8b814ecd0 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2064,7 +2064,7 @@ TRACE_EVENT(rdev_set_noack_map,
WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map)
);
-TRACE_EVENT(rdev_get_channel,
+DECLARE_EVENT_CLASS(wiphy_wdev_link_evt,
TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
unsigned int link_id),
TP_ARGS(wiphy, wdev, link_id),
@@ -2082,6 +2082,12 @@ TRACE_EVENT(rdev_get_channel,
WIPHY_PR_ARG, WDEV_PR_ARG, __entry->link_id)
);
+DEFINE_EVENT(wiphy_wdev_link_evt, rdev_get_channel,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ unsigned int link_id),
+ TP_ARGS(wiphy, wdev, link_id)
+);
+
TRACE_EVENT(rdev_return_chandef,
TP_PROTO(struct wiphy *wiphy, int ret,
struct cfg80211_chan_def *chandef),
@@ -2823,6 +2829,18 @@ TRACE_EVENT(rdev_set_radar_background,
WIPHY_PR_ARG, CHAN_DEF_PR_ARG)
);
+DEFINE_EVENT(wiphy_wdev_link_evt, rdev_add_intf_link,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ unsigned int link_id),
+ TP_ARGS(wiphy, wdev, link_id)
+);
+
+DEFINE_EVENT(wiphy_wdev_link_evt, rdev_del_intf_link,
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev,
+ unsigned int link_id),
+ TP_ARGS(wiphy, wdev, link_id)
+);
+
/*************************************************************
* cfg80211 exported functions traces *
*************************************************************/