diff options
author | Beni Lev <beni.lev@intel.com> | 2012-07-31 11:48:27 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2012-10-18 04:53:37 -0400 |
commit | 14e8a3c47e808772a5ba8118ef1f9a8d604dbbe5 (patch) | |
tree | 58228452c7c533812adaae14520fe3f9379baa92 /net | |
parent | e35e4d28b687d4e849573419fdcf90f1cce2a14c (diff) |
cfg80211: add tracing to rdev-ops
Add tracing to make debugging cfg80211/mac80211
(or full-mac driver) interaction easier.
Signed-off-by: Beni Lev <beni.lev@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Hila Gonen <hila.gonen@intel.com>
Tested-by: Hila Gonen <hila.gonen@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
[add a cast to int to sizeof() to avoid warning]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/Makefile | 4 | ||||
-rw-r--r-- | net/wireless/rdev-ops.h | 459 | ||||
-rw-r--r-- | net/wireless/trace.c | 7 | ||||
-rw-r--r-- | net/wireless/trace.h | 1750 |
4 files changed, 2141 insertions, 79 deletions
diff --git a/net/wireless/Makefile b/net/wireless/Makefile index 0f7e0d621ab0..a761670af31d 100644 --- a/net/wireless/Makefile +++ b/net/wireless/Makefile | |||
@@ -10,11 +10,13 @@ obj-$(CONFIG_WEXT_SPY) += wext-spy.o | |||
10 | obj-$(CONFIG_WEXT_PRIV) += wext-priv.o | 10 | obj-$(CONFIG_WEXT_PRIV) += wext-priv.o |
11 | 11 | ||
12 | cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o | 12 | cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o |
13 | cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o | 13 | cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o |
14 | cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o | 14 | cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o |
15 | cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o | 15 | cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o |
16 | cfg80211-$(CONFIG_CFG80211_INTERNAL_REGDB) += regdb.o | 16 | cfg80211-$(CONFIG_CFG80211_INTERNAL_REGDB) += regdb.o |
17 | 17 | ||
18 | CFLAGS_trace.o := -I$(src) | ||
19 | |||
18 | ccflags-y += -D__CHECK_ENDIAN__ | 20 | ccflags-y += -D__CHECK_ENDIAN__ |
19 | 21 | ||
20 | $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk | 22 | $(obj)/regdb.c: $(src)/db.txt $(src)/genregdb.awk |
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h index b6fad29d656b..4a88a39b1319 100644 --- a/net/wireless/rdev-ops.h +++ b/net/wireless/rdev-ops.h | |||
@@ -4,21 +4,32 @@ | |||
4 | #include <linux/rtnetlink.h> | 4 | #include <linux/rtnetlink.h> |
5 | #include <net/cfg80211.h> | 5 | #include <net/cfg80211.h> |
6 | #include "core.h" | 6 | #include "core.h" |
7 | #include "trace.h" | ||
7 | 8 | ||
8 | static inline int rdev_suspend(struct cfg80211_registered_device *rdev) | 9 | static inline int rdev_suspend(struct cfg80211_registered_device *rdev) |
9 | { | 10 | { |
10 | return rdev->ops->suspend(&rdev->wiphy, rdev->wowlan); | 11 | int ret; |
12 | trace_rdev_suspend(&rdev->wiphy, rdev->wowlan); | ||
13 | ret = rdev->ops->suspend(&rdev->wiphy, rdev->wowlan); | ||
14 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
15 | return ret; | ||
11 | } | 16 | } |
12 | 17 | ||
13 | static inline int rdev_resume(struct cfg80211_registered_device *rdev) | 18 | static inline int rdev_resume(struct cfg80211_registered_device *rdev) |
14 | { | 19 | { |
15 | return rdev->ops->resume(&rdev->wiphy); | 20 | int ret; |
21 | trace_rdev_resume(&rdev->wiphy); | ||
22 | ret = rdev->ops->resume(&rdev->wiphy); | ||
23 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
24 | return ret; | ||
16 | } | 25 | } |
17 | 26 | ||
18 | static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev, | 27 | static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev, |
19 | bool enabled) | 28 | bool enabled) |
20 | { | 29 | { |
30 | trace_rdev_set_wakeup(&rdev->wiphy, enabled); | ||
21 | rdev->ops->set_wakeup(&rdev->wiphy, enabled); | 31 | rdev->ops->set_wakeup(&rdev->wiphy, enabled); |
32 | trace_rdev_return_void(&rdev->wiphy); | ||
22 | } | 33 | } |
23 | 34 | ||
24 | static inline struct wireless_dev | 35 | static inline struct wireless_dev |
@@ -26,15 +37,23 @@ static inline struct wireless_dev | |||
26 | enum nl80211_iftype type, u32 *flags, | 37 | enum nl80211_iftype type, u32 *flags, |
27 | struct vif_params *params) | 38 | struct vif_params *params) |
28 | { | 39 | { |
29 | return rdev->ops->add_virtual_intf(&rdev->wiphy, name, type, flags, | 40 | struct wireless_dev *ret; |
30 | params); | 41 | trace_rdev_add_virtual_intf(&rdev->wiphy, name, type); |
42 | ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, type, flags, | ||
43 | params); | ||
44 | trace_rdev_return_wdev(&rdev->wiphy, ret); | ||
45 | return ret; | ||
31 | } | 46 | } |
32 | 47 | ||
33 | static inline int | 48 | static inline int |
34 | rdev_del_virtual_intf(struct cfg80211_registered_device *rdev, | 49 | rdev_del_virtual_intf(struct cfg80211_registered_device *rdev, |
35 | struct wireless_dev *wdev) | 50 | struct wireless_dev *wdev) |
36 | { | 51 | { |
37 | return rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); | 52 | int ret; |
53 | trace_rdev_del_virtual_intf(&rdev->wiphy, wdev); | ||
54 | ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); | ||
55 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
56 | return ret; | ||
38 | } | 57 | } |
39 | 58 | ||
40 | static inline int | 59 | static inline int |
@@ -42,8 +61,12 @@ rdev_change_virtual_intf(struct cfg80211_registered_device *rdev, | |||
42 | struct net_device *dev, enum nl80211_iftype type, | 61 | struct net_device *dev, enum nl80211_iftype type, |
43 | u32 *flags, struct vif_params *params) | 62 | u32 *flags, struct vif_params *params) |
44 | { | 63 | { |
45 | return rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, | 64 | int ret; |
46 | params); | 65 | trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type); |
66 | ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, | ||
67 | params); | ||
68 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
69 | return ret; | ||
47 | } | 70 | } |
48 | 71 | ||
49 | static inline int rdev_add_key(struct cfg80211_registered_device *rdev, | 72 | static inline int rdev_add_key(struct cfg80211_registered_device *rdev, |
@@ -51,8 +74,12 @@ static inline int rdev_add_key(struct cfg80211_registered_device *rdev, | |||
51 | bool pairwise, const u8 *mac_addr, | 74 | bool pairwise, const u8 *mac_addr, |
52 | struct key_params *params) | 75 | struct key_params *params) |
53 | { | 76 | { |
54 | return rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise, | 77 | int ret; |
78 | trace_rdev_add_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); | ||
79 | ret = rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise, | ||
55 | mac_addr, params); | 80 | mac_addr, params); |
81 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
82 | return ret; | ||
56 | } | 83 | } |
57 | 84 | ||
58 | static inline int | 85 | static inline int |
@@ -60,16 +87,24 @@ rdev_get_key(struct cfg80211_registered_device *rdev, struct net_device *netdev, | |||
60 | u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, | 87 | u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, |
61 | void (*callback)(void *cookie, struct key_params*)) | 88 | void (*callback)(void *cookie, struct key_params*)) |
62 | { | 89 | { |
63 | return rdev->ops->get_key(&rdev->wiphy, netdev, key_index, pairwise, | 90 | int ret; |
91 | trace_rdev_get_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); | ||
92 | ret = rdev->ops->get_key(&rdev->wiphy, netdev, key_index, pairwise, | ||
64 | mac_addr, cookie, callback); | 93 | mac_addr, cookie, callback); |
94 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
95 | return ret; | ||
65 | } | 96 | } |
66 | 97 | ||
67 | static inline int rdev_del_key(struct cfg80211_registered_device *rdev, | 98 | static inline int rdev_del_key(struct cfg80211_registered_device *rdev, |
68 | struct net_device *netdev, u8 key_index, | 99 | struct net_device *netdev, u8 key_index, |
69 | bool pairwise, const u8 *mac_addr) | 100 | bool pairwise, const u8 *mac_addr) |
70 | { | 101 | { |
71 | return rdev->ops->del_key(&rdev->wiphy, netdev, key_index, pairwise, | 102 | int ret; |
103 | trace_rdev_del_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); | ||
104 | ret = rdev->ops->del_key(&rdev->wiphy, netdev, key_index, pairwise, | ||
72 | mac_addr); | 105 | mac_addr); |
106 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
107 | return ret; | ||
73 | } | 108 | } |
74 | 109 | ||
75 | static inline int | 110 | static inline int |
@@ -77,96 +112,154 @@ rdev_set_default_key(struct cfg80211_registered_device *rdev, | |||
77 | struct net_device *netdev, u8 key_index, bool unicast, | 112 | struct net_device *netdev, u8 key_index, bool unicast, |
78 | bool multicast) | 113 | bool multicast) |
79 | { | 114 | { |
80 | return rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index, | 115 | int ret; |
116 | trace_rdev_set_default_key(&rdev->wiphy, netdev, key_index, | ||
117 | unicast, multicast); | ||
118 | ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index, | ||
81 | unicast, multicast); | 119 | unicast, multicast); |
120 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
121 | return ret; | ||
82 | } | 122 | } |
83 | 123 | ||
84 | static inline int | 124 | static inline int |
85 | rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev, | 125 | rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev, |
86 | struct net_device *netdev, u8 key_index) | 126 | struct net_device *netdev, u8 key_index) |
87 | { | 127 | { |
88 | return rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, | 128 | int ret; |
129 | trace_rdev_set_default_mgmt_key(&rdev->wiphy, netdev, key_index); | ||
130 | ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, | ||
89 | key_index); | 131 | key_index); |
132 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
133 | return ret; | ||
90 | } | 134 | } |
91 | 135 | ||
92 | static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, | 136 | static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, |
93 | struct net_device *dev, | 137 | struct net_device *dev, |
94 | struct cfg80211_ap_settings *settings) | 138 | struct cfg80211_ap_settings *settings) |
95 | { | 139 | { |
96 | return rdev->ops->start_ap(&rdev->wiphy, dev, settings); | 140 | int ret; |
141 | trace_rdev_start_ap(&rdev->wiphy, dev, settings); | ||
142 | ret = rdev->ops->start_ap(&rdev->wiphy, dev, settings); | ||
143 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
144 | return ret; | ||
97 | } | 145 | } |
98 | 146 | ||
99 | static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, | 147 | static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, |
100 | struct net_device *dev, | 148 | struct net_device *dev, |
101 | struct cfg80211_beacon_data *info) | 149 | struct cfg80211_beacon_data *info) |
102 | { | 150 | { |
103 | return rdev->ops->change_beacon(&rdev->wiphy, dev, info); | 151 | int ret; |
152 | trace_rdev_change_beacon(&rdev->wiphy, dev, info); | ||
153 | ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info); | ||
154 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
155 | return ret; | ||
104 | } | 156 | } |
105 | 157 | ||
106 | static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev, | 158 | static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev, |
107 | struct net_device *dev) | 159 | struct net_device *dev) |
108 | { | 160 | { |
109 | return rdev->ops->stop_ap(&rdev->wiphy, dev); | 161 | int ret; |
162 | trace_rdev_stop_ap(&rdev->wiphy, dev); | ||
163 | ret = rdev->ops->stop_ap(&rdev->wiphy, dev); | ||
164 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
165 | return ret; | ||
110 | } | 166 | } |
111 | 167 | ||
112 | static inline int rdev_add_station(struct cfg80211_registered_device *rdev, | 168 | static inline int rdev_add_station(struct cfg80211_registered_device *rdev, |
113 | struct net_device *dev, u8 *mac, | 169 | struct net_device *dev, u8 *mac, |
114 | struct station_parameters *params) | 170 | struct station_parameters *params) |
115 | { | 171 | { |
116 | return rdev->ops->add_station(&rdev->wiphy, dev, mac, params); | 172 | int ret; |
173 | trace_rdev_add_station(&rdev->wiphy, dev, mac, params); | ||
174 | ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params); | ||
175 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
176 | return ret; | ||
117 | } | 177 | } |
118 | 178 | ||
119 | static inline int rdev_del_station(struct cfg80211_registered_device *rdev, | 179 | static inline int rdev_del_station(struct cfg80211_registered_device *rdev, |
120 | struct net_device *dev, u8 *mac) | 180 | struct net_device *dev, u8 *mac) |
121 | { | 181 | { |
122 | return rdev->ops->del_station(&rdev->wiphy, dev, mac); | 182 | int ret; |
183 | trace_rdev_del_station(&rdev->wiphy, dev, mac); | ||
184 | ret = rdev->ops->del_station(&rdev->wiphy, dev, mac); | ||
185 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
186 | return ret; | ||
123 | } | 187 | } |
124 | 188 | ||
125 | static inline int rdev_change_station(struct cfg80211_registered_device *rdev, | 189 | static inline int rdev_change_station(struct cfg80211_registered_device *rdev, |
126 | struct net_device *dev, u8 *mac, | 190 | struct net_device *dev, u8 *mac, |
127 | struct station_parameters *params) | 191 | struct station_parameters *params) |
128 | { | 192 | { |
129 | return rdev->ops->change_station(&rdev->wiphy, dev, mac, params); | 193 | int ret; |
194 | trace_rdev_change_station(&rdev->wiphy, dev, mac, params); | ||
195 | ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params); | ||
196 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
197 | return ret; | ||
130 | } | 198 | } |
131 | 199 | ||
132 | static inline int rdev_get_station(struct cfg80211_registered_device *rdev, | 200 | static inline int rdev_get_station(struct cfg80211_registered_device *rdev, |
133 | struct net_device *dev, u8 *mac, | 201 | struct net_device *dev, u8 *mac, |
134 | struct station_info *sinfo) | 202 | struct station_info *sinfo) |
135 | { | 203 | { |
136 | return rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); | 204 | int ret; |
205 | trace_rdev_get_station(&rdev->wiphy, dev, mac); | ||
206 | ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); | ||
207 | trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); | ||
208 | return ret; | ||
137 | } | 209 | } |
138 | 210 | ||
139 | static inline int rdev_dump_station(struct cfg80211_registered_device *rdev, | 211 | static inline int rdev_dump_station(struct cfg80211_registered_device *rdev, |
140 | struct net_device *dev, int idx, u8 *mac, | 212 | struct net_device *dev, int idx, u8 *mac, |
141 | struct station_info *sinfo) | 213 | struct station_info *sinfo) |
142 | { | 214 | { |
143 | return rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); | 215 | int ret; |
216 | trace_rdev_dump_station(&rdev->wiphy, dev, idx, mac); | ||
217 | ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); | ||
218 | trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); | ||
219 | return ret; | ||
144 | } | 220 | } |
145 | 221 | ||
146 | static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev, | 222 | static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev, |
147 | struct net_device *dev, u8 *dst, u8 *next_hop) | 223 | struct net_device *dev, u8 *dst, u8 *next_hop) |
148 | { | 224 | { |
149 | return rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); | 225 | int ret; |
226 | trace_rdev_add_mpath(&rdev->wiphy, dev, dst, next_hop); | ||
227 | ret = rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); | ||
228 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
229 | return ret; | ||
150 | } | 230 | } |
151 | 231 | ||
152 | static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev, | 232 | static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev, |
153 | struct net_device *dev, u8 *dst) | 233 | struct net_device *dev, u8 *dst) |
154 | { | 234 | { |
155 | return rdev->ops->del_mpath(&rdev->wiphy, dev, dst); | 235 | int ret; |
236 | trace_rdev_del_mpath(&rdev->wiphy, dev, dst); | ||
237 | ret = rdev->ops->del_mpath(&rdev->wiphy, dev, dst); | ||
238 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
239 | return ret; | ||
156 | } | 240 | } |
157 | 241 | ||
158 | static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev, | 242 | static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev, |
159 | struct net_device *dev, u8 *dst, | 243 | struct net_device *dev, u8 *dst, |
160 | u8 *next_hop) | 244 | u8 *next_hop) |
161 | { | 245 | { |
162 | return rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); | 246 | int ret; |
247 | trace_rdev_change_mpath(&rdev->wiphy, dev, dst, next_hop); | ||
248 | ret = rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); | ||
249 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
250 | return ret; | ||
163 | } | 251 | } |
164 | 252 | ||
165 | static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev, | 253 | static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev, |
166 | struct net_device *dev, u8 *dst, u8 *next_hop, | 254 | struct net_device *dev, u8 *dst, u8 *next_hop, |
167 | struct mpath_info *pinfo) | 255 | struct mpath_info *pinfo) |
168 | { | 256 | { |
169 | return rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); | 257 | int ret; |
258 | trace_rdev_get_mpath(&rdev->wiphy, dev, dst, next_hop); | ||
259 | ret = rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); | ||
260 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); | ||
261 | return ret; | ||
262 | |||
170 | } | 263 | } |
171 | 264 | ||
172 | static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, | 265 | static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, |
@@ -174,15 +267,23 @@ static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, | |||
174 | u8 *next_hop, struct mpath_info *pinfo) | 267 | u8 *next_hop, struct mpath_info *pinfo) |
175 | 268 | ||
176 | { | 269 | { |
177 | return rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, | 270 | int ret; |
271 | trace_rdev_dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop); | ||
272 | ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, | ||
178 | pinfo); | 273 | pinfo); |
274 | trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); | ||
275 | return ret; | ||
179 | } | 276 | } |
180 | 277 | ||
181 | static inline int | 278 | static inline int |
182 | rdev_get_mesh_config(struct cfg80211_registered_device *rdev, | 279 | rdev_get_mesh_config(struct cfg80211_registered_device *rdev, |
183 | struct net_device *dev, struct mesh_config *conf) | 280 | struct net_device *dev, struct mesh_config *conf) |
184 | { | 281 | { |
185 | return rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); | 282 | int ret; |
283 | trace_rdev_get_mesh_config(&rdev->wiphy, dev); | ||
284 | ret = rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); | ||
285 | trace_rdev_return_int_mesh_config(&rdev->wiphy, ret, conf); | ||
286 | return ret; | ||
186 | } | 287 | } |
187 | 288 | ||
188 | static inline int | 289 | static inline int |
@@ -190,7 +291,11 @@ rdev_update_mesh_config(struct cfg80211_registered_device *rdev, | |||
190 | struct net_device *dev, u32 mask, | 291 | struct net_device *dev, u32 mask, |
191 | const struct mesh_config *nconf) | 292 | const struct mesh_config *nconf) |
192 | { | 293 | { |
193 | return rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); | 294 | int ret; |
295 | trace_rdev_update_mesh_config(&rdev->wiphy, dev, mask, nconf); | ||
296 | ret = rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); | ||
297 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
298 | return ret; | ||
194 | } | 299 | } |
195 | 300 | ||
196 | static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, | 301 | static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, |
@@ -198,14 +303,22 @@ static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, | |||
198 | const struct mesh_config *conf, | 303 | const struct mesh_config *conf, |
199 | const struct mesh_setup *setup) | 304 | const struct mesh_setup *setup) |
200 | { | 305 | { |
201 | return rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); | 306 | int ret; |
307 | trace_rdev_join_mesh(&rdev->wiphy, dev, conf, setup); | ||
308 | ret = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); | ||
309 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
310 | return ret; | ||
202 | } | 311 | } |
203 | 312 | ||
204 | 313 | ||
205 | static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev, | 314 | static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev, |
206 | struct net_device *dev) | 315 | struct net_device *dev) |
207 | { | 316 | { |
208 | return rdev->ops->leave_mesh(&rdev->wiphy, dev); | 317 | int ret; |
318 | trace_rdev_leave_mesh(&rdev->wiphy, dev); | ||
319 | ret = rdev->ops->leave_mesh(&rdev->wiphy, dev); | ||
320 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
321 | return ret; | ||
209 | } | 322 | } |
210 | 323 | ||
211 | static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, | 324 | static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, |
@@ -213,7 +326,11 @@ static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, | |||
213 | struct bss_parameters *params) | 326 | struct bss_parameters *params) |
214 | 327 | ||
215 | { | 328 | { |
216 | return rdev->ops->change_bss(&rdev->wiphy, dev, params); | 329 | int ret; |
330 | trace_rdev_change_bss(&rdev->wiphy, dev, params); | ||
331 | ret = rdev->ops->change_bss(&rdev->wiphy, dev, params); | ||
332 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
333 | return ret; | ||
217 | } | 334 | } |
218 | 335 | ||
219 | static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, | 336 | static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, |
@@ -221,7 +338,11 @@ static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, | |||
221 | struct ieee80211_txq_params *params) | 338 | struct ieee80211_txq_params *params) |
222 | 339 | ||
223 | { | 340 | { |
224 | return rdev->ops->set_txq_params(&rdev->wiphy, dev, params); | 341 | int ret; |
342 | trace_rdev_set_txq_params(&rdev->wiphy, dev, params); | ||
343 | ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params); | ||
344 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
345 | return ret; | ||
225 | } | 346 | } |
226 | 347 | ||
227 | static inline int | 348 | static inline int |
@@ -229,7 +350,11 @@ rdev_libertas_set_mesh_channel(struct cfg80211_registered_device *rdev, | |||
229 | struct net_device *dev, | 350 | struct net_device *dev, |
230 | struct ieee80211_channel *chan) | 351 | struct ieee80211_channel *chan) |
231 | { | 352 | { |
232 | return rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); | 353 | int ret; |
354 | trace_rdev_libertas_set_mesh_channel(&rdev->wiphy, dev, chan); | ||
355 | ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); | ||
356 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
357 | return ret; | ||
233 | } | 358 | } |
234 | 359 | ||
235 | static inline int | 360 | static inline int |
@@ -237,97 +362,154 @@ rdev_set_monitor_channel(struct cfg80211_registered_device *rdev, | |||
237 | struct ieee80211_channel *chan, | 362 | struct ieee80211_channel *chan, |
238 | enum nl80211_channel_type channel_type) | 363 | enum nl80211_channel_type channel_type) |
239 | { | 364 | { |
240 | return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, | 365 | int ret; |
241 | channel_type); | 366 | trace_rdev_set_monitor_channel(&rdev->wiphy, chan, channel_type); |
367 | ret = rdev->ops->set_monitor_channel(&rdev->wiphy, chan, channel_type); | ||
368 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
369 | return ret; | ||
242 | } | 370 | } |
243 | 371 | ||
244 | static inline int rdev_scan(struct cfg80211_registered_device *rdev, | 372 | static inline int rdev_scan(struct cfg80211_registered_device *rdev, |
245 | struct cfg80211_scan_request *request) | 373 | struct cfg80211_scan_request *request) |
246 | { | 374 | { |
247 | return rdev->ops->scan(&rdev->wiphy, request); | 375 | int ret; |
376 | trace_rdev_scan(&rdev->wiphy, request); | ||
377 | ret = rdev->ops->scan(&rdev->wiphy, request); | ||
378 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
379 | return ret; | ||
248 | } | 380 | } |
249 | 381 | ||
250 | static inline int rdev_auth(struct cfg80211_registered_device *rdev, | 382 | static inline int rdev_auth(struct cfg80211_registered_device *rdev, |
251 | struct net_device *dev, | 383 | struct net_device *dev, |
252 | struct cfg80211_auth_request *req) | 384 | struct cfg80211_auth_request *req) |
253 | { | 385 | { |
254 | return rdev->ops->auth(&rdev->wiphy, dev, req); | 386 | int ret; |
387 | trace_rdev_auth(&rdev->wiphy, dev, req); | ||
388 | ret = rdev->ops->auth(&rdev->wiphy, dev, req); | ||
389 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
390 | return ret; | ||
255 | } | 391 | } |
256 | 392 | ||
257 | static inline int rdev_assoc(struct cfg80211_registered_device *rdev, | 393 | static inline int rdev_assoc(struct cfg80211_registered_device *rdev, |
258 | struct net_device *dev, | 394 | struct net_device *dev, |
259 | struct cfg80211_assoc_request *req) | 395 | struct cfg80211_assoc_request *req) |
260 | { | 396 | { |
261 | return rdev->ops->assoc(&rdev->wiphy, dev, req); | 397 | int ret; |
398 | trace_rdev_assoc(&rdev->wiphy, dev, req); | ||
399 | ret = rdev->ops->assoc(&rdev->wiphy, dev, req); | ||
400 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
401 | return ret; | ||
262 | } | 402 | } |
263 | 403 | ||
264 | static inline int rdev_deauth(struct cfg80211_registered_device *rdev, | 404 | static inline int rdev_deauth(struct cfg80211_registered_device *rdev, |
265 | struct net_device *dev, | 405 | struct net_device *dev, |
266 | struct cfg80211_deauth_request *req) | 406 | struct cfg80211_deauth_request *req) |
267 | { | 407 | { |
268 | return rdev->ops->deauth(&rdev->wiphy, dev, req); | 408 | int ret; |
409 | trace_rdev_deauth(&rdev->wiphy, dev, req); | ||
410 | ret = rdev->ops->deauth(&rdev->wiphy, dev, req); | ||
411 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
412 | return ret; | ||
269 | } | 413 | } |
270 | 414 | ||
271 | static inline int rdev_disassoc(struct cfg80211_registered_device *rdev, | 415 | static inline int rdev_disassoc(struct cfg80211_registered_device *rdev, |
272 | struct net_device *dev, | 416 | struct net_device *dev, |
273 | struct cfg80211_disassoc_request *req) | 417 | struct cfg80211_disassoc_request *req) |
274 | { | 418 | { |
275 | return rdev->ops->disassoc(&rdev->wiphy, dev, req); | 419 | int ret; |
420 | trace_rdev_disassoc(&rdev->wiphy, dev, req); | ||
421 | ret = rdev->ops->disassoc(&rdev->wiphy, dev, req); | ||
422 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
423 | return ret; | ||
276 | } | 424 | } |
277 | 425 | ||
278 | static inline int rdev_connect(struct cfg80211_registered_device *rdev, | 426 | static inline int rdev_connect(struct cfg80211_registered_device *rdev, |
279 | struct net_device *dev, | 427 | struct net_device *dev, |
280 | struct cfg80211_connect_params *sme) | 428 | struct cfg80211_connect_params *sme) |
281 | { | 429 | { |
282 | return rdev->ops->connect(&rdev->wiphy, dev, sme); | 430 | int ret; |
431 | trace_rdev_connect(&rdev->wiphy, dev, sme); | ||
432 | ret = rdev->ops->connect(&rdev->wiphy, dev, sme); | ||
433 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
434 | return ret; | ||
283 | } | 435 | } |
284 | 436 | ||
285 | static inline int rdev_disconnect(struct cfg80211_registered_device *rdev, | 437 | static inline int rdev_disconnect(struct cfg80211_registered_device *rdev, |
286 | struct net_device *dev, u16 reason_code) | 438 | struct net_device *dev, u16 reason_code) |
287 | { | 439 | { |
288 | return rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); | 440 | int ret; |
441 | trace_rdev_disconnect(&rdev->wiphy, dev, reason_code); | ||
442 | ret = rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); | ||
443 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
444 | return ret; | ||
289 | } | 445 | } |
290 | 446 | ||
291 | static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev, | 447 | static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev, |
292 | struct net_device *dev, | 448 | struct net_device *dev, |
293 | struct cfg80211_ibss_params *params) | 449 | struct cfg80211_ibss_params *params) |
294 | { | 450 | { |
295 | return rdev->ops->join_ibss(&rdev->wiphy, dev, params); | 451 | int ret; |
452 | trace_rdev_join_ibss(&rdev->wiphy, dev, params); | ||
453 | ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params); | ||
454 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
455 | return ret; | ||
296 | } | 456 | } |
297 | 457 | ||
298 | static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev, | 458 | static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev, |
299 | struct net_device *dev) | 459 | struct net_device *dev) |
300 | { | 460 | { |
301 | return rdev->ops->leave_ibss(&rdev->wiphy, dev); | 461 | int ret; |
462 | trace_rdev_leave_ibss(&rdev->wiphy, dev); | ||
463 | ret = rdev->ops->leave_ibss(&rdev->wiphy, dev); | ||
464 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
465 | return ret; | ||
302 | } | 466 | } |
303 | 467 | ||
304 | static inline int | 468 | static inline int |
305 | rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) | 469 | rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) |
306 | { | 470 | { |
307 | return rdev->ops->set_wiphy_params(&rdev->wiphy, changed); | 471 | int ret; |
472 | trace_rdev_set_wiphy_params(&rdev->wiphy, changed); | ||
473 | ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); | ||
474 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
475 | return ret; | ||
308 | } | 476 | } |
309 | 477 | ||
310 | static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, | 478 | static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, |
311 | enum nl80211_tx_power_setting type, int mbm) | 479 | enum nl80211_tx_power_setting type, int mbm) |
312 | { | 480 | { |
313 | return rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); | 481 | int ret; |
482 | trace_rdev_set_tx_power(&rdev->wiphy, type, mbm); | ||
483 | ret = rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); | ||
484 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
485 | return ret; | ||
314 | } | 486 | } |
315 | 487 | ||
316 | static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, | 488 | static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, |
317 | int *dbm) | 489 | int *dbm) |
318 | { | 490 | { |
319 | return rdev->ops->get_tx_power(&rdev->wiphy, dbm); | 491 | int ret; |
492 | trace_rdev_get_tx_power(&rdev->wiphy); | ||
493 | ret = rdev->ops->get_tx_power(&rdev->wiphy, dbm); | ||
494 | trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm); | ||
495 | return ret; | ||
320 | } | 496 | } |
321 | 497 | ||
322 | static inline int rdev_set_wds_peer(struct cfg80211_registered_device *rdev, | 498 | static inline int rdev_set_wds_peer(struct cfg80211_registered_device *rdev, |
323 | struct net_device *dev, const u8 *addr) | 499 | struct net_device *dev, const u8 *addr) |
324 | { | 500 | { |
325 | return rdev->ops->set_wds_peer(&rdev->wiphy, dev, addr); | 501 | int ret; |
502 | trace_rdev_set_wds_peer(&rdev->wiphy, dev, addr); | ||
503 | ret = rdev->ops->set_wds_peer(&rdev->wiphy, dev, addr); | ||
504 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
505 | return ret; | ||
326 | } | 506 | } |
327 | 507 | ||
328 | static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) | 508 | static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) |
329 | { | 509 | { |
510 | trace_rdev_rfkill_poll(&rdev->wiphy); | ||
330 | rdev->ops->rfkill_poll(&rdev->wiphy); | 511 | rdev->ops->rfkill_poll(&rdev->wiphy); |
512 | trace_rdev_return_void(&rdev->wiphy); | ||
331 | } | 513 | } |
332 | 514 | ||
333 | 515 | ||
@@ -335,7 +517,11 @@ static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) | |||
335 | static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev, | 517 | static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev, |
336 | void *data, int len) | 518 | void *data, int len) |
337 | { | 519 | { |
338 | return rdev->ops->testmode_cmd(&rdev->wiphy, data, len); | 520 | int ret; |
521 | trace_rdev_testmode_cmd(&rdev->wiphy); | ||
522 | ret = rdev->ops->testmode_cmd(&rdev->wiphy, data, len); | ||
523 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
524 | return ret; | ||
339 | } | 525 | } |
340 | 526 | ||
341 | static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, | 527 | static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, |
@@ -343,8 +529,11 @@ static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, | |||
343 | struct netlink_callback *cb, void *data, | 529 | struct netlink_callback *cb, void *data, |
344 | int len) | 530 | int len) |
345 | { | 531 | { |
346 | return rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, | 532 | int ret; |
347 | len); | 533 | trace_rdev_testmode_dump(&rdev->wiphy); |
534 | ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len); | ||
535 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
536 | return ret; | ||
348 | } | 537 | } |
349 | #endif | 538 | #endif |
350 | 539 | ||
@@ -353,34 +542,57 @@ rdev_set_bitrate_mask(struct cfg80211_registered_device *rdev, | |||
353 | struct net_device *dev, const u8 *peer, | 542 | struct net_device *dev, const u8 *peer, |
354 | const struct cfg80211_bitrate_mask *mask) | 543 | const struct cfg80211_bitrate_mask *mask) |
355 | { | 544 | { |
356 | return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask); | 545 | int ret; |
546 | trace_rdev_set_bitrate_mask(&rdev->wiphy, dev, peer, mask); | ||
547 | ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask); | ||
548 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
549 | return ret; | ||
357 | } | 550 | } |
358 | 551 | ||
359 | static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev, | 552 | static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev, |
360 | struct net_device *netdev, int idx, | 553 | struct net_device *netdev, int idx, |
361 | struct survey_info *info) | 554 | struct survey_info *info) |
362 | { | 555 | { |
363 | return rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); | 556 | int ret; |
557 | trace_rdev_dump_survey(&rdev->wiphy, netdev, idx); | ||
558 | ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); | ||
559 | if (ret < 0) | ||
560 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
561 | else | ||
562 | trace_rdev_return_int_survey_info(&rdev->wiphy, ret, info); | ||
563 | return ret; | ||
364 | } | 564 | } |
365 | 565 | ||
366 | static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev, | 566 | static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev, |
367 | struct net_device *netdev, | 567 | struct net_device *netdev, |
368 | struct cfg80211_pmksa *pmksa) | 568 | struct cfg80211_pmksa *pmksa) |
369 | { | 569 | { |
370 | return rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); | 570 | int ret; |
571 | trace_rdev_set_pmksa(&rdev->wiphy, netdev, pmksa); | ||
572 | ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); | ||
573 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
574 | return ret; | ||
371 | } | 575 | } |
372 | 576 | ||
373 | static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev, | 577 | static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev, |
374 | struct net_device *netdev, | 578 | struct net_device *netdev, |
375 | struct cfg80211_pmksa *pmksa) | 579 | struct cfg80211_pmksa *pmksa) |
376 | { | 580 | { |
377 | return rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); | 581 | int ret; |
582 | trace_rdev_del_pmksa(&rdev->wiphy, netdev, pmksa); | ||
583 | ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); | ||
584 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
585 | return ret; | ||
378 | } | 586 | } |
379 | 587 | ||
380 | static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev, | 588 | static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev, |
381 | struct net_device *netdev) | 589 | struct net_device *netdev) |
382 | { | 590 | { |
383 | return rdev->ops->flush_pmksa(&rdev->wiphy, netdev); | 591 | int ret; |
592 | trace_rdev_flush_pmksa(&rdev->wiphy, netdev); | ||
593 | ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev); | ||
594 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
595 | return ret; | ||
384 | } | 596 | } |
385 | 597 | ||
386 | static inline int | 598 | static inline int |
@@ -390,15 +602,24 @@ rdev_remain_on_channel(struct cfg80211_registered_device *rdev, | |||
390 | enum nl80211_channel_type channel_type, | 602 | enum nl80211_channel_type channel_type, |
391 | unsigned int duration, u64 *cookie) | 603 | unsigned int duration, u64 *cookie) |
392 | { | 604 | { |
393 | return rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, | 605 | int ret; |
606 | trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, channel_type, | ||
607 | duration); | ||
608 | ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, | ||
394 | channel_type, duration, cookie); | 609 | channel_type, duration, cookie); |
610 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); | ||
611 | return ret; | ||
395 | } | 612 | } |
396 | 613 | ||
397 | static inline int | 614 | static inline int |
398 | rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, | 615 | rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, |
399 | struct wireless_dev *wdev, u64 cookie) | 616 | struct wireless_dev *wdev, u64 cookie) |
400 | { | 617 | { |
401 | return rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); | 618 | int ret; |
619 | trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); | ||
620 | ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); | ||
621 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
622 | return ret; | ||
402 | } | 623 | } |
403 | 624 | ||
404 | static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, | 625 | static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, |
@@ -409,72 +630,113 @@ static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, | |||
409 | const u8 *buf, size_t len, bool no_cck, | 630 | const u8 *buf, size_t len, bool no_cck, |
410 | bool dont_wait_for_ack, u64 *cookie) | 631 | bool dont_wait_for_ack, u64 *cookie) |
411 | { | 632 | { |
412 | return rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, | 633 | int ret; |
634 | trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan, channel_type, | ||
635 | channel_type_valid, wait, no_cck, dont_wait_for_ack); | ||
636 | ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, | ||
413 | channel_type, channel_type_valid, wait, buf, | 637 | channel_type, channel_type_valid, wait, buf, |
414 | len, no_cck, dont_wait_for_ack, cookie); | 638 | len, no_cck, dont_wait_for_ack, cookie); |
639 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); | ||
640 | return ret; | ||
415 | } | 641 | } |
416 | 642 | ||
417 | static inline int | 643 | static inline int |
418 | rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, | 644 | rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, |
419 | struct wireless_dev *wdev, u64 cookie) | 645 | struct wireless_dev *wdev, u64 cookie) |
420 | { | 646 | { |
421 | return rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); | 647 | int ret; |
648 | trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); | ||
649 | ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); | ||
650 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
651 | return ret; | ||
422 | } | 652 | } |
423 | 653 | ||
424 | static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev, | 654 | static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev, |
425 | struct net_device *dev, bool enabled, | 655 | struct net_device *dev, bool enabled, |
426 | int timeout) | 656 | int timeout) |
427 | { | 657 | { |
428 | return rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); | 658 | int ret; |
659 | trace_rdev_set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); | ||
660 | ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); | ||
661 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
662 | return ret; | ||
429 | } | 663 | } |
430 | 664 | ||
431 | static inline int | 665 | static inline int |
432 | rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev, | 666 | rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev, |
433 | struct net_device *dev, s32 rssi_thold, u32 rssi_hyst) | 667 | struct net_device *dev, s32 rssi_thold, u32 rssi_hyst) |
434 | { | 668 | { |
435 | return rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, | 669 | int ret; |
436 | rssi_hyst); | 670 | trace_rdev_set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, |
671 | rssi_hyst); | ||
672 | ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, | ||
673 | rssi_hyst); | ||
674 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
675 | return ret; | ||
437 | } | 676 | } |
438 | 677 | ||
439 | static inline int | 678 | static inline int |
440 | rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev, | 679 | rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev, |
441 | struct net_device *dev, u32 rate, u32 pkts, u32 intvl) | 680 | struct net_device *dev, u32 rate, u32 pkts, u32 intvl) |
442 | { | 681 | { |
443 | return rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, | 682 | int ret; |
683 | trace_rdev_set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, intvl); | ||
684 | ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, | ||
444 | intvl); | 685 | intvl); |
686 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
687 | return ret; | ||
445 | } | 688 | } |
446 | 689 | ||
447 | static inline void | 690 | static inline void |
448 | rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev, | 691 | rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev, |
449 | struct wireless_dev *wdev, u16 frame_type, bool reg) | 692 | struct wireless_dev *wdev, u16 frame_type, bool reg) |
450 | { | 693 | { |
451 | rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, | 694 | trace_rdev_mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); |
452 | reg); | 695 | rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); |
696 | trace_rdev_return_void(&rdev->wiphy); | ||
453 | } | 697 | } |
454 | 698 | ||
455 | static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, | 699 | static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, |
456 | u32 tx_ant, u32 rx_ant) | 700 | u32 tx_ant, u32 rx_ant) |
457 | { | 701 | { |
458 | return rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); | 702 | int ret; |
703 | trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant); | ||
704 | ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); | ||
705 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
706 | return ret; | ||
459 | } | 707 | } |
460 | 708 | ||
461 | static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, | 709 | static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, |
462 | u32 *tx_ant, u32 *rx_ant) | 710 | u32 *tx_ant, u32 *rx_ant) |
463 | { | 711 | { |
464 | return rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); | 712 | int ret; |
713 | trace_rdev_get_antenna(&rdev->wiphy); | ||
714 | ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); | ||
715 | if (ret) | ||
716 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
717 | else | ||
718 | trace_rdev_return_int_tx_rx(&rdev->wiphy, ret, *tx_ant, | ||
719 | *rx_ant); | ||
720 | return ret; | ||
465 | } | 721 | } |
466 | 722 | ||
467 | static inline int rdev_set_ringparam(struct cfg80211_registered_device *rdev, | 723 | static inline int rdev_set_ringparam(struct cfg80211_registered_device *rdev, |
468 | u32 tx, u32 rx) | 724 | u32 tx, u32 rx) |
469 | { | 725 | { |
470 | return rdev->ops->set_ringparam(&rdev->wiphy, tx, rx); | 726 | int ret; |
727 | trace_rdev_set_ringparam(&rdev->wiphy, tx, rx); | ||
728 | ret = rdev->ops->set_ringparam(&rdev->wiphy, tx, rx); | ||
729 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
730 | return ret; | ||
471 | } | 731 | } |
472 | 732 | ||
473 | static inline void rdev_get_ringparam(struct cfg80211_registered_device *rdev, | 733 | static inline void rdev_get_ringparam(struct cfg80211_registered_device *rdev, |
474 | u32 *tx, u32 *tx_max, u32 *rx, | 734 | u32 *tx, u32 *tx_max, u32 *rx, |
475 | u32 *rx_max) | 735 | u32 *rx_max) |
476 | { | 736 | { |
737 | trace_rdev_get_ringparam(&rdev->wiphy); | ||
477 | rdev->ops->get_ringparam(&rdev->wiphy, tx, tx_max, rx, rx_max); | 738 | rdev->ops->get_ringparam(&rdev->wiphy, tx, tx_max, rx, rx_max); |
739 | trace_rdev_return_void_tx_rx(&rdev->wiphy, *tx, *tx_max, *rx, *rx_max); | ||
478 | } | 740 | } |
479 | 741 | ||
480 | static inline int | 742 | static inline int |
@@ -482,20 +744,32 @@ rdev_sched_scan_start(struct cfg80211_registered_device *rdev, | |||
482 | struct net_device *dev, | 744 | struct net_device *dev, |
483 | struct cfg80211_sched_scan_request *request) | 745 | struct cfg80211_sched_scan_request *request) |
484 | { | 746 | { |
485 | return rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); | 747 | int ret; |
748 | trace_rdev_sched_scan_start(&rdev->wiphy, dev, request); | ||
749 | ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); | ||
750 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
751 | return ret; | ||
486 | } | 752 | } |
487 | 753 | ||
488 | static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev, | 754 | static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev, |
489 | struct net_device *dev) | 755 | struct net_device *dev) |
490 | { | 756 | { |
491 | return rdev->ops->sched_scan_stop(&rdev->wiphy, dev); | 757 | int ret; |
758 | trace_rdev_sched_scan_stop(&rdev->wiphy, dev); | ||
759 | ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev); | ||
760 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
761 | return ret; | ||
492 | } | 762 | } |
493 | 763 | ||
494 | static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev, | 764 | static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev, |
495 | struct net_device *dev, | 765 | struct net_device *dev, |
496 | struct cfg80211_gtk_rekey_data *data) | 766 | struct cfg80211_gtk_rekey_data *data) |
497 | { | 767 | { |
498 | return rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); | 768 | int ret; |
769 | trace_rdev_set_rekey_data(&rdev->wiphy, dev); | ||
770 | ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); | ||
771 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
772 | return ret; | ||
499 | } | 773 | } |
500 | 774 | ||
501 | static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, | 775 | static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, |
@@ -503,56 +777,85 @@ static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, | |||
503 | u8 action_code, u8 dialog_token, | 777 | u8 action_code, u8 dialog_token, |
504 | u16 status_code, const u8 *buf, size_t len) | 778 | u16 status_code, const u8 *buf, size_t len) |
505 | { | 779 | { |
506 | return rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code, | 780 | int ret; |
507 | dialog_token, status_code, buf, len); | 781 | trace_rdev_tdls_mgmt(&rdev->wiphy, dev, peer, action_code, |
782 | dialog_token, status_code, buf, len); | ||
783 | ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code, | ||
784 | dialog_token, status_code, buf, len); | ||
785 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
786 | return ret; | ||
508 | } | 787 | } |
509 | 788 | ||
510 | static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev, | 789 | static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev, |
511 | struct net_device *dev, u8 *peer, | 790 | struct net_device *dev, u8 *peer, |
512 | enum nl80211_tdls_operation oper) | 791 | enum nl80211_tdls_operation oper) |
513 | { | 792 | { |
514 | return rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); | 793 | int ret; |
794 | trace_rdev_tdls_oper(&rdev->wiphy, dev, peer, oper); | ||
795 | ret = rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); | ||
796 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
797 | return ret; | ||
515 | } | 798 | } |
516 | 799 | ||
517 | static inline int rdev_probe_client(struct cfg80211_registered_device *rdev, | 800 | static inline int rdev_probe_client(struct cfg80211_registered_device *rdev, |
518 | struct net_device *dev, const u8 *peer, | 801 | struct net_device *dev, const u8 *peer, |
519 | u64 *cookie) | 802 | u64 *cookie) |
520 | { | 803 | { |
521 | return rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); | 804 | int ret; |
805 | trace_rdev_probe_client(&rdev->wiphy, dev, peer); | ||
806 | ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); | ||
807 | trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); | ||
808 | return ret; | ||
522 | } | 809 | } |
523 | 810 | ||
524 | static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev, | 811 | static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev, |
525 | struct net_device *dev, u16 noack_map) | 812 | struct net_device *dev, u16 noack_map) |
526 | { | 813 | { |
527 | return rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); | 814 | int ret; |
815 | trace_rdev_set_noack_map(&rdev->wiphy, dev, noack_map); | ||
816 | ret = rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); | ||
817 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
818 | return ret; | ||
528 | } | 819 | } |
529 | 820 | ||
530 | static inline int | 821 | static inline int |
531 | rdev_get_et_sset_count(struct cfg80211_registered_device *rdev, | 822 | rdev_get_et_sset_count(struct cfg80211_registered_device *rdev, |
532 | struct net_device *dev, int sset) | 823 | struct net_device *dev, int sset) |
533 | { | 824 | { |
534 | return rdev->ops->get_et_sset_count(&rdev->wiphy, dev, sset); | 825 | int ret; |
826 | trace_rdev_get_et_sset_count(&rdev->wiphy, dev, sset); | ||
827 | ret = rdev->ops->get_et_sset_count(&rdev->wiphy, dev, sset); | ||
828 | trace_rdev_return_int(&rdev->wiphy, ret); | ||
829 | return ret; | ||
535 | } | 830 | } |
536 | 831 | ||
537 | static inline void rdev_get_et_stats(struct cfg80211_registered_device *rdev, | 832 | static inline void rdev_get_et_stats(struct cfg80211_registered_device *rdev, |
538 | struct net_device *dev, | 833 | struct net_device *dev, |
539 | struct ethtool_stats *stats, u64 *data) | 834 | struct ethtool_stats *stats, u64 *data) |
540 | { | 835 | { |
836 | trace_rdev_get_et_stats(&rdev->wiphy, dev); | ||
541 | rdev->ops->get_et_stats(&rdev->wiphy, dev, stats, data); | 837 | rdev->ops->get_et_stats(&rdev->wiphy, dev, stats, data); |
838 | trace_rdev_return_void(&rdev->wiphy); | ||
542 | } | 839 | } |
543 | 840 | ||
544 | static inline void rdev_get_et_strings(struct cfg80211_registered_device *rdev, | 841 | static inline void rdev_get_et_strings(struct cfg80211_registered_device *rdev, |
545 | struct net_device *dev, u32 sset, | 842 | struct net_device *dev, u32 sset, |
546 | u8 *data) | 843 | u8 *data) |
547 | { | 844 | { |
845 | trace_rdev_get_et_strings(&rdev->wiphy, dev, sset); | ||
548 | rdev->ops->get_et_strings(&rdev->wiphy, dev, sset, data); | 846 | rdev->ops->get_et_strings(&rdev->wiphy, dev, sset, data); |
847 | trace_rdev_return_void(&rdev->wiphy); | ||
549 | } | 848 | } |
550 | 849 | ||
551 | static inline struct ieee80211_channel | 850 | static inline struct ieee80211_channel |
552 | *rdev_get_channel(struct cfg80211_registered_device *rdev, | 851 | *rdev_get_channel(struct cfg80211_registered_device *rdev, |
553 | struct wireless_dev *wdev, enum nl80211_channel_type *type) | 852 | struct wireless_dev *wdev, enum nl80211_channel_type *type) |
554 | { | 853 | { |
555 | return rdev->ops->get_channel(&rdev->wiphy, wdev, type); | 854 | struct ieee80211_channel *ret; |
855 | trace_rdev_get_channel(&rdev->wiphy, wdev); | ||
856 | ret = rdev->ops->get_channel(&rdev->wiphy, wdev, type); | ||
857 | trace_rdev_return_channel(&rdev->wiphy, ret, *type); | ||
858 | return ret; | ||
556 | } | 859 | } |
557 | 860 | ||
558 | #endif /* __CFG80211_RDEV_OPS */ | 861 | #endif /* __CFG80211_RDEV_OPS */ |
diff --git a/net/wireless/trace.c b/net/wireless/trace.c new file mode 100644 index 000000000000..95f997fad755 --- /dev/null +++ b/net/wireless/trace.c | |||
@@ -0,0 +1,7 @@ | |||
1 | #include <linux/module.h> | ||
2 | |||
3 | #ifndef __CHECKER__ | ||
4 | #define CREATE_TRACE_POINTS | ||
5 | #include "trace.h" | ||
6 | |||
7 | #endif | ||
diff --git a/net/wireless/trace.h b/net/wireless/trace.h new file mode 100644 index 000000000000..0940e9103776 --- /dev/null +++ b/net/wireless/trace.h | |||
@@ -0,0 +1,1750 @@ | |||
1 | #undef TRACE_SYSTEM | ||
2 | #define TRACE_SYSTEM cfg80211 | ||
3 | |||
4 | #if !defined(__RDEV_OPS_TRACE) || defined(TRACE_HEADER_MULTI_READ) | ||
5 | #define __RDEV_OPS_TRACE | ||
6 | |||
7 | #include <linux/tracepoint.h> | ||
8 | |||
9 | #include <linux/rtnetlink.h> | ||
10 | #include <net/cfg80211.h> | ||
11 | #include "core.h" | ||
12 | |||
13 | #define MAC_ENTRY(entry_mac) __array(u8, entry_mac, ETH_ALEN) | ||
14 | #define MAC_ASSIGN(entry_mac, given_mac) do { \ | ||
15 | if (given_mac) \ | ||
16 | memcpy(__entry->entry_mac, given_mac, ETH_ALEN); \ | ||
17 | else \ | ||
18 | memset(__entry->entry_mac, 0, ETH_ALEN); \ | ||
19 | } while (0) | ||
20 | #define MAC_PR_FMT "%pM" | ||
21 | #define MAC_PR_ARG(entry_mac) (__entry->entry_mac) | ||
22 | |||
23 | #define WIPHY_ENTRY MAC_ENTRY(wiphy_mac) | ||
24 | #define WIPHY_ASSIGN MAC_ASSIGN(wiphy_mac, wiphy->perm_addr) | ||
25 | #define WIPHY_PR_FMT "wiphy " MAC_PR_FMT | ||
26 | #define WIPHY_PR_ARG MAC_PR_ARG(wiphy_mac) | ||
27 | |||
28 | #define WDEV_ENTRY __field(u32, id) | ||
29 | #define WDEV_ASSIGN (__entry->id) = (wdev->identifier) | ||
30 | #define WDEV_PR_FMT ", wdev id: %u" | ||
31 | #define WDEV_PR_ARG (__entry->id) | ||
32 | |||
33 | #define NETDEV_ENTRY __array(char, name, IFNAMSIZ) \ | ||
34 | MAC_ENTRY(netdev_addr) \ | ||
35 | __field(int, ifindex) | ||
36 | #define NETDEV_ASSIGN \ | ||
37 | do { \ | ||
38 | memcpy(__entry->name, netdev->name, IFNAMSIZ); \ | ||
39 | MAC_ASSIGN(netdev_addr, netdev->dev_addr); \ | ||
40 | (__entry->ifindex) = (netdev->ifindex); \ | ||
41 | } while (0) | ||
42 | #define NETDEV_PR_FMT ", netdev - name: %s, addr: " MAC_PR_FMT \ | ||
43 | ", intf index: %d" | ||
44 | #define NETDEV_PR_ARG (__entry->name), MAC_PR_ARG(netdev_addr), \ | ||
45 | (__entry->ifindex) | ||
46 | |||
47 | #define MESH_CFG_ENTRY __field(u16, dot11MeshRetryTimeout) \ | ||
48 | __field(u16, dot11MeshConfirmTimeout) \ | ||
49 | __field(u16, dot11MeshHoldingTimeout) \ | ||
50 | __field(u16, dot11MeshMaxPeerLinks) \ | ||
51 | __field(u8, dot11MeshMaxRetries) \ | ||
52 | __field(u8, dot11MeshTTL) \ | ||
53 | __field(u8, element_ttl) \ | ||
54 | __field(bool, auto_open_plinks) \ | ||
55 | __field(u32, dot11MeshNbrOffsetMaxNeighbor) \ | ||
56 | __field(u8, dot11MeshHWMPmaxPREQretries) \ | ||
57 | __field(u32, path_refresh_time) \ | ||
58 | __field(u32, dot11MeshHWMPactivePathTimeout) \ | ||
59 | __field(u16, min_discovery_timeout) \ | ||
60 | __field(u16, dot11MeshHWMPpreqMinInterval) \ | ||
61 | __field(u16, dot11MeshHWMPperrMinInterval) \ | ||
62 | __field(u16, dot11MeshHWMPnetDiameterTraversalTime) \ | ||
63 | __field(u8, dot11MeshHWMPRootMode) \ | ||
64 | __field(u16, dot11MeshHWMPRannInterval) \ | ||
65 | __field(bool, dot11MeshGateAnnouncementProtocol) \ | ||
66 | __field(bool, dot11MeshForwarding) \ | ||
67 | __field(s32, rssi_threshold) \ | ||
68 | __field(u16, ht_opmode) \ | ||
69 | __field(u32, dot11MeshHWMPactivePathToRootTimeout) \ | ||
70 | __field(u16, dot11MeshHWMProotInterval) \ | ||
71 | __field(u16, dot11MeshHWMPconfirmationInterval) | ||
72 | #define MESH_CFG_ASSIGN \ | ||
73 | do { \ | ||
74 | __entry->dot11MeshRetryTimeout = conf->dot11MeshRetryTimeout; \ | ||
75 | __entry->dot11MeshConfirmTimeout = \ | ||
76 | conf->dot11MeshConfirmTimeout; \ | ||
77 | __entry->dot11MeshHoldingTimeout = \ | ||
78 | conf->dot11MeshHoldingTimeout; \ | ||
79 | __entry->dot11MeshMaxPeerLinks = conf->dot11MeshMaxPeerLinks; \ | ||
80 | __entry->dot11MeshMaxRetries = conf->dot11MeshMaxRetries; \ | ||
81 | __entry->dot11MeshTTL = conf->dot11MeshTTL; \ | ||
82 | __entry->element_ttl = conf->element_ttl; \ | ||
83 | __entry->auto_open_plinks = conf->auto_open_plinks; \ | ||
84 | __entry->dot11MeshNbrOffsetMaxNeighbor = \ | ||
85 | conf->dot11MeshNbrOffsetMaxNeighbor; \ | ||
86 | __entry->dot11MeshHWMPmaxPREQretries = \ | ||
87 | conf->dot11MeshHWMPmaxPREQretries; \ | ||
88 | __entry->path_refresh_time = conf->path_refresh_time; \ | ||
89 | __entry->dot11MeshHWMPactivePathTimeout = \ | ||
90 | conf->dot11MeshHWMPactivePathTimeout; \ | ||
91 | __entry->min_discovery_timeout = conf->min_discovery_timeout; \ | ||
92 | __entry->dot11MeshHWMPpreqMinInterval = \ | ||
93 | conf->dot11MeshHWMPpreqMinInterval; \ | ||
94 | __entry->dot11MeshHWMPperrMinInterval = \ | ||
95 | conf->dot11MeshHWMPperrMinInterval; \ | ||
96 | __entry->dot11MeshHWMPnetDiameterTraversalTime = \ | ||
97 | conf->dot11MeshHWMPnetDiameterTraversalTime; \ | ||
98 | __entry->dot11MeshHWMPRootMode = conf->dot11MeshHWMPRootMode; \ | ||
99 | __entry->dot11MeshHWMPRannInterval = \ | ||
100 | conf->dot11MeshHWMPRannInterval; \ | ||
101 | __entry->dot11MeshGateAnnouncementProtocol = \ | ||
102 | conf->dot11MeshGateAnnouncementProtocol; \ | ||
103 | __entry->dot11MeshForwarding = conf->dot11MeshForwarding; \ | ||
104 | __entry->rssi_threshold = conf->rssi_threshold; \ | ||
105 | __entry->ht_opmode = conf->ht_opmode; \ | ||
106 | __entry->dot11MeshHWMPactivePathToRootTimeout = \ | ||
107 | conf->dot11MeshHWMPactivePathToRootTimeout; \ | ||
108 | __entry->dot11MeshHWMProotInterval = \ | ||
109 | conf->dot11MeshHWMProotInterval; \ | ||
110 | __entry->dot11MeshHWMPconfirmationInterval = \ | ||
111 | conf->dot11MeshHWMPconfirmationInterval; \ | ||
112 | } while (0) | ||
113 | |||
114 | #define CHAN_ENTRY __field(enum ieee80211_band, band) \ | ||
115 | __field(u16, center_freq) | ||
116 | #define CHAN_ASSIGN(chan) \ | ||
117 | do { \ | ||
118 | if (chan) { \ | ||
119 | __entry->band = chan->band; \ | ||
120 | __entry->center_freq = chan->center_freq; \ | ||
121 | } else { \ | ||
122 | __entry->band = 0; \ | ||
123 | __entry->center_freq = 0; \ | ||
124 | } \ | ||
125 | } while (0) | ||
126 | #define CHAN_PR_FMT ", band: %d, freq: %u" | ||
127 | #define CHAN_PR_ARG __entry->band, __entry->center_freq | ||
128 | |||
129 | #define SINFO_ENTRY __field(int, generation) \ | ||
130 | __field(u32, connected_time) \ | ||
131 | __field(u32, inactive_time) \ | ||
132 | __field(u32, rx_bytes) \ | ||
133 | __field(u32, tx_bytes) \ | ||
134 | __field(u32, rx_packets) \ | ||
135 | __field(u32, tx_packets) \ | ||
136 | __field(u32, tx_retries) \ | ||
137 | __field(u32, tx_failed) \ | ||
138 | __field(u32, rx_dropped_misc) \ | ||
139 | __field(u32, beacon_loss_count) \ | ||
140 | __field(u16, llid) \ | ||
141 | __field(u16, plid) \ | ||
142 | __field(u8, plink_state) | ||
143 | #define SINFO_ASSIGN \ | ||
144 | do { \ | ||
145 | __entry->generation = sinfo->generation; \ | ||
146 | __entry->connected_time = sinfo->connected_time; \ | ||
147 | __entry->inactive_time = sinfo->inactive_time; \ | ||
148 | __entry->rx_bytes = sinfo->rx_bytes; \ | ||
149 | __entry->tx_bytes = sinfo->tx_bytes; \ | ||
150 | __entry->rx_packets = sinfo->rx_packets; \ | ||
151 | __entry->tx_packets = sinfo->tx_packets; \ | ||
152 | __entry->tx_retries = sinfo->tx_retries; \ | ||
153 | __entry->tx_failed = sinfo->tx_failed; \ | ||
154 | __entry->rx_dropped_misc = sinfo->rx_dropped_misc; \ | ||
155 | __entry->beacon_loss_count = sinfo->beacon_loss_count; \ | ||
156 | __entry->llid = sinfo->llid; \ | ||
157 | __entry->plid = sinfo->plid; \ | ||
158 | __entry->plink_state = sinfo->plink_state; \ | ||
159 | } while (0) | ||
160 | |||
161 | #define BOOL_TO_STR(bo) (bo) ? "true" : "false" | ||
162 | |||
163 | /************************************************************* | ||
164 | * rdev->ops traces * | ||
165 | *************************************************************/ | ||
166 | |||
167 | TRACE_EVENT(rdev_suspend, | ||
168 | TP_PROTO(struct wiphy *wiphy, struct cfg80211_wowlan *wow), | ||
169 | TP_ARGS(wiphy, wow), | ||
170 | TP_STRUCT__entry( | ||
171 | WIPHY_ENTRY | ||
172 | __field(bool, any) | ||
173 | __field(bool, disconnect) | ||
174 | __field(bool, magic_pkt) | ||
175 | __field(bool, gtk_rekey_failure) | ||
176 | __field(bool, eap_identity_req) | ||
177 | __field(bool, four_way_handshake) | ||
178 | __field(bool, rfkill_release) | ||
179 | __field(bool, valid_wow) | ||
180 | ), | ||
181 | TP_fast_assign( | ||
182 | WIPHY_ASSIGN; | ||
183 | if (wow) { | ||
184 | __entry->any = wow->any; | ||
185 | __entry->disconnect = wow->disconnect; | ||
186 | __entry->magic_pkt = wow->magic_pkt; | ||
187 | __entry->gtk_rekey_failure = wow->gtk_rekey_failure; | ||
188 | __entry->eap_identity_req = wow->eap_identity_req; | ||
189 | __entry->four_way_handshake = wow->four_way_handshake; | ||
190 | __entry->rfkill_release = wow->rfkill_release; | ||
191 | __entry->valid_wow = true; | ||
192 | } else { | ||
193 | __entry->valid_wow = false; | ||
194 | } | ||
195 | ), | ||
196 | TP_printk(WIPHY_PR_FMT ", wow%s - any: %d, disconnect: %d, " | ||
197 | "magic pkt: %d, gtk rekey failure: %d, eap identify req: %d, " | ||
198 | "four way handshake: %d, rfkill release: %d.", | ||
199 | WIPHY_PR_ARG, __entry->valid_wow ? "" : "(Not configured!)", | ||
200 | __entry->any, __entry->disconnect, __entry->magic_pkt, | ||
201 | __entry->gtk_rekey_failure, __entry->eap_identity_req, | ||
202 | __entry->four_way_handshake, __entry->rfkill_release) | ||
203 | ); | ||
204 | |||
205 | TRACE_EVENT(rdev_return_int, | ||
206 | TP_PROTO(struct wiphy *wiphy, int ret), | ||
207 | TP_ARGS(wiphy, ret), | ||
208 | TP_STRUCT__entry( | ||
209 | WIPHY_ENTRY | ||
210 | __field(int, ret) | ||
211 | ), | ||
212 | TP_fast_assign( | ||
213 | WIPHY_ASSIGN; | ||
214 | __entry->ret = ret; | ||
215 | ), | ||
216 | TP_printk(WIPHY_PR_FMT ", returned: %d", WIPHY_PR_ARG, __entry->ret) | ||
217 | ); | ||
218 | |||
219 | TRACE_EVENT(rdev_scan, | ||
220 | TP_PROTO(struct wiphy *wiphy, struct cfg80211_scan_request *request), | ||
221 | TP_ARGS(wiphy, request), | ||
222 | TP_STRUCT__entry( | ||
223 | WIPHY_ENTRY | ||
224 | ), | ||
225 | TP_fast_assign( | ||
226 | WIPHY_ASSIGN; | ||
227 | ), | ||
228 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) | ||
229 | ); | ||
230 | |||
231 | DECLARE_EVENT_CLASS(wiphy_only_evt, | ||
232 | TP_PROTO(struct wiphy *wiphy), | ||
233 | TP_ARGS(wiphy), | ||
234 | TP_STRUCT__entry( | ||
235 | WIPHY_ENTRY | ||
236 | ), | ||
237 | TP_fast_assign( | ||
238 | WIPHY_ASSIGN; | ||
239 | ), | ||
240 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) | ||
241 | ); | ||
242 | |||
243 | DEFINE_EVENT(wiphy_only_evt, rdev_resume, | ||
244 | TP_PROTO(struct wiphy *wiphy), | ||
245 | TP_ARGS(wiphy) | ||
246 | ); | ||
247 | |||
248 | DEFINE_EVENT(wiphy_only_evt, rdev_return_void, | ||
249 | TP_PROTO(struct wiphy *wiphy), | ||
250 | TP_ARGS(wiphy) | ||
251 | ); | ||
252 | |||
253 | DEFINE_EVENT(wiphy_only_evt, rdev_get_ringparam, | ||
254 | TP_PROTO(struct wiphy *wiphy), | ||
255 | TP_ARGS(wiphy) | ||
256 | ); | ||
257 | |||
258 | DEFINE_EVENT(wiphy_only_evt, rdev_get_antenna, | ||
259 | TP_PROTO(struct wiphy *wiphy), | ||
260 | TP_ARGS(wiphy) | ||
261 | ); | ||
262 | |||
263 | DEFINE_EVENT(wiphy_only_evt, rdev_get_tx_power, | ||
264 | TP_PROTO(struct wiphy *wiphy), | ||
265 | TP_ARGS(wiphy) | ||
266 | ); | ||
267 | |||
268 | DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll, | ||
269 | TP_PROTO(struct wiphy *wiphy), | ||
270 | TP_ARGS(wiphy) | ||
271 | ); | ||
272 | |||
273 | DECLARE_EVENT_CLASS(wiphy_enabled_evt, | ||
274 | TP_PROTO(struct wiphy *wiphy, bool enabled), | ||
275 | TP_ARGS(wiphy, enabled), | ||
276 | TP_STRUCT__entry( | ||
277 | WIPHY_ENTRY | ||
278 | __field(bool, enabled) | ||
279 | ), | ||
280 | TP_fast_assign( | ||
281 | WIPHY_ASSIGN; | ||
282 | __entry->enabled = enabled; | ||
283 | ), | ||
284 | TP_printk(WIPHY_PR_FMT ", %senabled ", | ||
285 | WIPHY_PR_ARG, __entry->enabled ? "" : "not ") | ||
286 | ); | ||
287 | |||
288 | DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup, | ||
289 | TP_PROTO(struct wiphy *wiphy, bool enabled), | ||
290 | TP_ARGS(wiphy, enabled) | ||
291 | ); | ||
292 | |||
293 | TRACE_EVENT(rdev_add_virtual_intf, | ||
294 | TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type), | ||
295 | TP_ARGS(wiphy, name, type), | ||
296 | TP_STRUCT__entry( | ||
297 | WIPHY_ENTRY | ||
298 | __string(vir_intf_name, name ? name : "<noname>") | ||
299 | __field(enum nl80211_iftype, type) | ||
300 | ), | ||
301 | TP_fast_assign( | ||
302 | WIPHY_ASSIGN; | ||
303 | __assign_str(vir_intf_name, name ? name : "<noname>"); | ||
304 | __entry->type = type; | ||
305 | ), | ||
306 | TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d", | ||
307 | WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type) | ||
308 | ); | ||
309 | |||
310 | DECLARE_EVENT_CLASS(wiphy_wdev_evt, | ||
311 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
312 | TP_ARGS(wiphy, wdev), | ||
313 | TP_STRUCT__entry( | ||
314 | WIPHY_ENTRY | ||
315 | WDEV_ENTRY | ||
316 | ), | ||
317 | TP_fast_assign( | ||
318 | WIPHY_ASSIGN; | ||
319 | WDEV_ASSIGN; | ||
320 | ), | ||
321 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) | ||
322 | ); | ||
323 | |||
324 | DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev, | ||
325 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
326 | TP_ARGS(wiphy, wdev) | ||
327 | ); | ||
328 | |||
329 | DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf, | ||
330 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
331 | TP_ARGS(wiphy, wdev) | ||
332 | ); | ||
333 | |||
334 | TRACE_EVENT(rdev_change_virtual_intf, | ||
335 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
336 | enum nl80211_iftype type), | ||
337 | TP_ARGS(wiphy, netdev, type), | ||
338 | TP_STRUCT__entry( | ||
339 | WIPHY_ENTRY | ||
340 | NETDEV_ENTRY | ||
341 | __field(enum nl80211_iftype, type) | ||
342 | ), | ||
343 | TP_fast_assign( | ||
344 | WIPHY_ASSIGN; | ||
345 | NETDEV_ASSIGN; | ||
346 | __entry->type = type; | ||
347 | ), | ||
348 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", type: %d", | ||
349 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type) | ||
350 | ); | ||
351 | |||
352 | DECLARE_EVENT_CLASS(key_handle, | ||
353 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, | ||
354 | bool pairwise, const u8 *mac_addr), | ||
355 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr), | ||
356 | TP_STRUCT__entry( | ||
357 | WIPHY_ENTRY | ||
358 | NETDEV_ENTRY | ||
359 | MAC_ENTRY(mac_addr) | ||
360 | __field(u8, key_index) | ||
361 | __field(bool, pairwise) | ||
362 | ), | ||
363 | TP_fast_assign( | ||
364 | WIPHY_ASSIGN; | ||
365 | NETDEV_ASSIGN; | ||
366 | MAC_ASSIGN(mac_addr, mac_addr); | ||
367 | __entry->key_index = key_index; | ||
368 | __entry->pairwise = pairwise; | ||
369 | ), | ||
370 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT, | ||
371 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, | ||
372 | BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr)) | ||
373 | ); | ||
374 | |||
375 | DEFINE_EVENT(key_handle, rdev_add_key, | ||
376 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, | ||
377 | bool pairwise, const u8 *mac_addr), | ||
378 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) | ||
379 | ); | ||
380 | |||
381 | DEFINE_EVENT(key_handle, rdev_get_key, | ||
382 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, | ||
383 | bool pairwise, const u8 *mac_addr), | ||
384 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) | ||
385 | ); | ||
386 | |||
387 | DEFINE_EVENT(key_handle, rdev_del_key, | ||
388 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, | ||
389 | bool pairwise, const u8 *mac_addr), | ||
390 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) | ||
391 | ); | ||
392 | |||
393 | TRACE_EVENT(rdev_set_default_key, | ||
394 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, | ||
395 | bool unicast, bool multicast), | ||
396 | TP_ARGS(wiphy, netdev, key_index, unicast, multicast), | ||
397 | TP_STRUCT__entry( | ||
398 | WIPHY_ENTRY | ||
399 | NETDEV_ENTRY | ||
400 | __field(u8, key_index) | ||
401 | __field(bool, unicast) | ||
402 | __field(bool, multicast) | ||
403 | ), | ||
404 | TP_fast_assign( | ||
405 | WIPHY_ASSIGN; | ||
406 | NETDEV_ASSIGN; | ||
407 | __entry->key_index = key_index; | ||
408 | __entry->unicast = unicast; | ||
409 | __entry->multicast = multicast; | ||
410 | ), | ||
411 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s", | ||
412 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, | ||
413 | BOOL_TO_STR(__entry->unicast), | ||
414 | BOOL_TO_STR(__entry->multicast)) | ||
415 | ); | ||
416 | |||
417 | TRACE_EVENT(rdev_set_default_mgmt_key, | ||
418 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index), | ||
419 | TP_ARGS(wiphy, netdev, key_index), | ||
420 | TP_STRUCT__entry( | ||
421 | WIPHY_ENTRY | ||
422 | NETDEV_ENTRY | ||
423 | __field(u8, key_index) | ||
424 | ), | ||
425 | TP_fast_assign( | ||
426 | WIPHY_ASSIGN; | ||
427 | NETDEV_ASSIGN; | ||
428 | __entry->key_index = key_index; | ||
429 | ), | ||
430 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u", | ||
431 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index) | ||
432 | ); | ||
433 | |||
434 | TRACE_EVENT(rdev_start_ap, | ||
435 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
436 | struct cfg80211_ap_settings *settings), | ||
437 | TP_ARGS(wiphy, netdev, settings), | ||
438 | TP_STRUCT__entry( | ||
439 | WIPHY_ENTRY | ||
440 | NETDEV_ENTRY | ||
441 | CHAN_ENTRY | ||
442 | __field(int, beacon_interval) | ||
443 | __field(int, dtim_period) | ||
444 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) | ||
445 | __field(enum nl80211_hidden_ssid, hidden_ssid) | ||
446 | __field(u32, wpa_ver) | ||
447 | __field(bool, privacy) | ||
448 | __field(enum nl80211_auth_type, auth_type) | ||
449 | __field(int, inactivity_timeout) | ||
450 | ), | ||
451 | TP_fast_assign( | ||
452 | WIPHY_ASSIGN; | ||
453 | NETDEV_ASSIGN; | ||
454 | CHAN_ASSIGN(settings->channel); | ||
455 | __entry->beacon_interval = settings->beacon_interval; | ||
456 | __entry->dtim_period = settings->dtim_period; | ||
457 | __entry->hidden_ssid = settings->hidden_ssid; | ||
458 | __entry->wpa_ver = settings->crypto.wpa_versions; | ||
459 | __entry->privacy = settings->privacy; | ||
460 | __entry->auth_type = settings->auth_type; | ||
461 | __entry->inactivity_timeout = settings->inactivity_timeout; | ||
462 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); | ||
463 | memcpy(__entry->ssid, settings->ssid, settings->ssid_len); | ||
464 | ), | ||
465 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", AP settings - ssid: %s, " | ||
466 | CHAN_PR_FMT ", beacon interval: %d, dtim period: %d, " | ||
467 | "hidden ssid: %d, wpa versions: %u, privacy: %s, " | ||
468 | "auth type: %d, inactivity timeout: %d", | ||
469 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_PR_ARG, | ||
470 | __entry->beacon_interval, __entry->dtim_period, | ||
471 | __entry->hidden_ssid, __entry->wpa_ver, | ||
472 | BOOL_TO_STR(__entry->privacy), __entry->auth_type, | ||
473 | __entry->inactivity_timeout) | ||
474 | ); | ||
475 | |||
476 | TRACE_EVENT(rdev_change_beacon, | ||
477 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
478 | struct cfg80211_beacon_data *info), | ||
479 | TP_ARGS(wiphy, netdev, info), | ||
480 | TP_STRUCT__entry( | ||
481 | WIPHY_ENTRY | ||
482 | NETDEV_ENTRY | ||
483 | __dynamic_array(u8, head, info ? info->head_len : 0) | ||
484 | __dynamic_array(u8, tail, info ? info->tail_len : 0) | ||
485 | __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0) | ||
486 | __dynamic_array(u8, proberesp_ies, | ||
487 | info ? info->proberesp_ies_len : 0) | ||
488 | __dynamic_array(u8, assocresp_ies, | ||
489 | info ? info->assocresp_ies_len : 0) | ||
490 | __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0) | ||
491 | ), | ||
492 | TP_fast_assign( | ||
493 | WIPHY_ASSIGN; | ||
494 | NETDEV_ASSIGN; | ||
495 | if (info) { | ||
496 | if (info->head) | ||
497 | memcpy(__get_dynamic_array(head), info->head, | ||
498 | info->head_len); | ||
499 | if (info->tail) | ||
500 | memcpy(__get_dynamic_array(tail), info->tail, | ||
501 | info->tail_len); | ||
502 | if (info->beacon_ies) | ||
503 | memcpy(__get_dynamic_array(beacon_ies), | ||
504 | info->beacon_ies, info->beacon_ies_len); | ||
505 | if (info->proberesp_ies) | ||
506 | memcpy(__get_dynamic_array(proberesp_ies), | ||
507 | info->proberesp_ies, | ||
508 | info->proberesp_ies_len); | ||
509 | if (info->assocresp_ies) | ||
510 | memcpy(__get_dynamic_array(assocresp_ies), | ||
511 | info->assocresp_ies, | ||
512 | info->assocresp_ies_len); | ||
513 | if (info->probe_resp) | ||
514 | memcpy(__get_dynamic_array(probe_resp), | ||
515 | info->probe_resp, info->probe_resp_len); | ||
516 | } | ||
517 | ), | ||
518 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) | ||
519 | ); | ||
520 | |||
521 | DECLARE_EVENT_CLASS(wiphy_netdev_evt, | ||
522 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
523 | TP_ARGS(wiphy, netdev), | ||
524 | TP_STRUCT__entry( | ||
525 | WIPHY_ENTRY | ||
526 | NETDEV_ENTRY | ||
527 | ), | ||
528 | TP_fast_assign( | ||
529 | WIPHY_ASSIGN; | ||
530 | NETDEV_ASSIGN; | ||
531 | ), | ||
532 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) | ||
533 | ); | ||
534 | |||
535 | DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap, | ||
536 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
537 | TP_ARGS(wiphy, netdev) | ||
538 | ); | ||
539 | |||
540 | DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats, | ||
541 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
542 | TP_ARGS(wiphy, netdev) | ||
543 | ); | ||
544 | |||
545 | DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop, | ||
546 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
547 | TP_ARGS(wiphy, netdev) | ||
548 | ); | ||
549 | |||
550 | DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data, | ||
551 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
552 | TP_ARGS(wiphy, netdev) | ||
553 | ); | ||
554 | |||
555 | DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config, | ||
556 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
557 | TP_ARGS(wiphy, netdev) | ||
558 | ); | ||
559 | |||
560 | DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh, | ||
561 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
562 | TP_ARGS(wiphy, netdev) | ||
563 | ); | ||
564 | |||
565 | DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_ibss, | ||
566 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
567 | TP_ARGS(wiphy, netdev) | ||
568 | ); | ||
569 | |||
570 | DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa, | ||
571 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), | ||
572 | TP_ARGS(wiphy, netdev) | ||
573 | ); | ||
574 | |||
575 | DECLARE_EVENT_CLASS(station_add_change, | ||
576 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, | ||
577 | struct station_parameters *params), | ||
578 | TP_ARGS(wiphy, netdev, mac, params), | ||
579 | TP_STRUCT__entry( | ||
580 | WIPHY_ENTRY | ||
581 | NETDEV_ENTRY | ||
582 | MAC_ENTRY(sta_mac) | ||
583 | __field(u32, sta_flags_mask) | ||
584 | __field(u32, sta_flags_set) | ||
585 | __field(u32, sta_modify_mask) | ||
586 | __field(int, listen_interval) | ||
587 | __field(u16, aid) | ||
588 | __field(u8, plink_action) | ||
589 | __field(u8, plink_state) | ||
590 | __field(u8, uapsd_queues) | ||
591 | __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap)) | ||
592 | ), | ||
593 | TP_fast_assign( | ||
594 | WIPHY_ASSIGN; | ||
595 | NETDEV_ASSIGN; | ||
596 | MAC_ASSIGN(sta_mac, mac); | ||
597 | __entry->sta_flags_mask = params->sta_flags_mask; | ||
598 | __entry->sta_flags_set = params->sta_flags_set; | ||
599 | __entry->sta_modify_mask = params->sta_modify_mask; | ||
600 | __entry->listen_interval = params->listen_interval; | ||
601 | __entry->aid = params->aid; | ||
602 | __entry->plink_action = params->plink_action; | ||
603 | __entry->plink_state = params->plink_state; | ||
604 | __entry->uapsd_queues = params->uapsd_queues; | ||
605 | memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap)); | ||
606 | if (params->ht_capa) | ||
607 | memcpy(__entry->ht_capa, params->ht_capa, | ||
608 | sizeof(struct ieee80211_ht_cap)); | ||
609 | ), | ||
610 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT | ||
611 | ", station flags mask: %u, station flags set: %u, " | ||
612 | "station modify mask: %u, listen interval: %d, aid: %u, " | ||
613 | "plink action: %u, plink state: %u, uapsd queues: %u", | ||
614 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), | ||
615 | __entry->sta_flags_mask, __entry->sta_flags_set, | ||
616 | __entry->sta_modify_mask, __entry->listen_interval, | ||
617 | __entry->aid, __entry->plink_action, __entry->plink_state, | ||
618 | __entry->uapsd_queues) | ||
619 | ); | ||
620 | |||
621 | DEFINE_EVENT(station_add_change, rdev_add_station, | ||
622 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, | ||
623 | struct station_parameters *params), | ||
624 | TP_ARGS(wiphy, netdev, mac, params) | ||
625 | ); | ||
626 | |||
627 | DEFINE_EVENT(station_add_change, rdev_change_station, | ||
628 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, | ||
629 | struct station_parameters *params), | ||
630 | TP_ARGS(wiphy, netdev, mac, params) | ||
631 | ); | ||
632 | |||
633 | DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt, | ||
634 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), | ||
635 | TP_ARGS(wiphy, netdev, mac), | ||
636 | TP_STRUCT__entry( | ||
637 | WIPHY_ENTRY | ||
638 | NETDEV_ENTRY | ||
639 | MAC_ENTRY(sta_mac) | ||
640 | ), | ||
641 | TP_fast_assign( | ||
642 | WIPHY_ASSIGN; | ||
643 | NETDEV_ASSIGN; | ||
644 | MAC_ASSIGN(sta_mac, mac); | ||
645 | ), | ||
646 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mac: " MAC_PR_FMT, | ||
647 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac)) | ||
648 | ); | ||
649 | |||
650 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station, | ||
651 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), | ||
652 | TP_ARGS(wiphy, netdev, mac) | ||
653 | ); | ||
654 | |||
655 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_station, | ||
656 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), | ||
657 | TP_ARGS(wiphy, netdev, mac) | ||
658 | ); | ||
659 | |||
660 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_mpath, | ||
661 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), | ||
662 | TP_ARGS(wiphy, netdev, mac) | ||
663 | ); | ||
664 | |||
665 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_set_wds_peer, | ||
666 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), | ||
667 | TP_ARGS(wiphy, netdev, mac) | ||
668 | ); | ||
669 | |||
670 | TRACE_EVENT(rdev_dump_station, | ||
671 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, | ||
672 | u8 *mac), | ||
673 | TP_ARGS(wiphy, netdev, idx, mac), | ||
674 | TP_STRUCT__entry( | ||
675 | WIPHY_ENTRY | ||
676 | NETDEV_ENTRY | ||
677 | MAC_ENTRY(sta_mac) | ||
678 | __field(int, idx) | ||
679 | ), | ||
680 | TP_fast_assign( | ||
681 | WIPHY_ASSIGN; | ||
682 | NETDEV_ASSIGN; | ||
683 | MAC_ASSIGN(sta_mac, mac); | ||
684 | __entry->idx = idx; | ||
685 | ), | ||
686 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d", | ||
687 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), | ||
688 | __entry->idx) | ||
689 | ); | ||
690 | |||
691 | TRACE_EVENT(rdev_return_int_station_info, | ||
692 | TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo), | ||
693 | TP_ARGS(wiphy, ret, sinfo), | ||
694 | TP_STRUCT__entry( | ||
695 | WIPHY_ENTRY | ||
696 | __field(int, ret) | ||
697 | SINFO_ENTRY | ||
698 | ), | ||
699 | TP_fast_assign( | ||
700 | WIPHY_ASSIGN; | ||
701 | __entry->ret = ret; | ||
702 | SINFO_ASSIGN; | ||
703 | ), | ||
704 | TP_printk(WIPHY_PR_FMT ", returned %d" , | ||
705 | WIPHY_PR_ARG, __entry->ret) | ||
706 | ); | ||
707 | |||
708 | DECLARE_EVENT_CLASS(mpath_evt, | ||
709 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, | ||
710 | u8 *next_hop), | ||
711 | TP_ARGS(wiphy, netdev, dst, next_hop), | ||
712 | TP_STRUCT__entry( | ||
713 | WIPHY_ENTRY | ||
714 | NETDEV_ENTRY | ||
715 | MAC_ENTRY(dst) | ||
716 | MAC_ENTRY(next_hop) | ||
717 | ), | ||
718 | TP_fast_assign( | ||
719 | WIPHY_ASSIGN; | ||
720 | NETDEV_ASSIGN; | ||
721 | MAC_ASSIGN(dst, dst); | ||
722 | MAC_ASSIGN(next_hop, next_hop); | ||
723 | ), | ||
724 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT, | ||
725 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst), | ||
726 | MAC_PR_ARG(next_hop)) | ||
727 | ); | ||
728 | |||
729 | DEFINE_EVENT(mpath_evt, rdev_add_mpath, | ||
730 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, | ||
731 | u8 *next_hop), | ||
732 | TP_ARGS(wiphy, netdev, dst, next_hop) | ||
733 | ); | ||
734 | |||
735 | DEFINE_EVENT(mpath_evt, rdev_change_mpath, | ||
736 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, | ||
737 | u8 *next_hop), | ||
738 | TP_ARGS(wiphy, netdev, dst, next_hop) | ||
739 | ); | ||
740 | |||
741 | DEFINE_EVENT(mpath_evt, rdev_get_mpath, | ||
742 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, | ||
743 | u8 *next_hop), | ||
744 | TP_ARGS(wiphy, netdev, dst, next_hop) | ||
745 | ); | ||
746 | |||
747 | TRACE_EVENT(rdev_dump_mpath, | ||
748 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, | ||
749 | u8 *dst, u8 *next_hop), | ||
750 | TP_ARGS(wiphy, netdev, idx, dst, next_hop), | ||
751 | TP_STRUCT__entry( | ||
752 | WIPHY_ENTRY | ||
753 | NETDEV_ENTRY | ||
754 | MAC_ENTRY(dst) | ||
755 | MAC_ENTRY(next_hop) | ||
756 | __field(int, idx) | ||
757 | ), | ||
758 | TP_fast_assign( | ||
759 | WIPHY_ASSIGN; | ||
760 | NETDEV_ASSIGN; | ||
761 | MAC_ASSIGN(dst, dst); | ||
762 | MAC_ASSIGN(next_hop, next_hop); | ||
763 | __entry->idx = idx; | ||
764 | ), | ||
765 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d, destination: " | ||
766 | MAC_PR_FMT ", next hop: " MAC_PR_FMT, | ||
767 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst), | ||
768 | MAC_PR_ARG(next_hop)) | ||
769 | ); | ||
770 | |||
771 | TRACE_EVENT(rdev_return_int_mpath_info, | ||
772 | TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo), | ||
773 | TP_ARGS(wiphy, ret, pinfo), | ||
774 | TP_STRUCT__entry( | ||
775 | WIPHY_ENTRY | ||
776 | __field(int, ret) | ||
777 | __field(int, generation) | ||
778 | __field(u32, filled) | ||
779 | __field(u32, frame_qlen) | ||
780 | __field(u32, sn) | ||
781 | __field(u32, metric) | ||
782 | __field(u32, exptime) | ||
783 | __field(u32, discovery_timeout) | ||
784 | __field(u8, discovery_retries) | ||
785 | __field(u8, flags) | ||
786 | ), | ||
787 | TP_fast_assign( | ||
788 | WIPHY_ASSIGN; | ||
789 | __entry->ret = ret; | ||
790 | __entry->generation = pinfo->generation; | ||
791 | __entry->filled = pinfo->filled; | ||
792 | __entry->frame_qlen = pinfo->frame_qlen; | ||
793 | __entry->sn = pinfo->sn; | ||
794 | __entry->metric = pinfo->metric; | ||
795 | __entry->exptime = pinfo->exptime; | ||
796 | __entry->discovery_timeout = pinfo->discovery_timeout; | ||
797 | __entry->discovery_retries = pinfo->discovery_retries; | ||
798 | __entry->flags = pinfo->flags; | ||
799 | ), | ||
800 | TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, " | ||
801 | "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u," | ||
802 | " discovery timeout: %u, discovery retries: %u, flags: %u", | ||
803 | WIPHY_PR_ARG, __entry->ret, __entry->generation, | ||
804 | __entry->filled, __entry->frame_qlen, __entry->sn, | ||
805 | __entry->metric, __entry->exptime, __entry->discovery_timeout, | ||
806 | __entry->discovery_retries, __entry->flags) | ||
807 | ); | ||
808 | |||
809 | TRACE_EVENT(rdev_return_int_mesh_config, | ||
810 | TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf), | ||
811 | TP_ARGS(wiphy, ret, conf), | ||
812 | TP_STRUCT__entry( | ||
813 | WIPHY_ENTRY | ||
814 | MESH_CFG_ENTRY | ||
815 | __field(int, ret) | ||
816 | ), | ||
817 | TP_fast_assign( | ||
818 | WIPHY_ASSIGN; | ||
819 | MESH_CFG_ASSIGN; | ||
820 | __entry->ret = ret; | ||
821 | ), | ||
822 | TP_printk(WIPHY_PR_FMT ", returned: %d", | ||
823 | WIPHY_PR_ARG, __entry->ret) | ||
824 | ); | ||
825 | |||
826 | TRACE_EVENT(rdev_update_mesh_config, | ||
827 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask, | ||
828 | const struct mesh_config *conf), | ||
829 | TP_ARGS(wiphy, netdev, mask, conf), | ||
830 | TP_STRUCT__entry( | ||
831 | WIPHY_ENTRY | ||
832 | NETDEV_ENTRY | ||
833 | MESH_CFG_ENTRY | ||
834 | __field(u32, mask) | ||
835 | ), | ||
836 | TP_fast_assign( | ||
837 | WIPHY_ASSIGN; | ||
838 | NETDEV_ASSIGN; | ||
839 | MESH_CFG_ASSIGN; | ||
840 | __entry->mask = mask; | ||
841 | ), | ||
842 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mask: %u", | ||
843 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask) | ||
844 | ); | ||
845 | |||
846 | TRACE_EVENT(rdev_join_mesh, | ||
847 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
848 | const struct mesh_config *conf, | ||
849 | const struct mesh_setup *setup), | ||
850 | TP_ARGS(wiphy, netdev, conf, setup), | ||
851 | TP_STRUCT__entry( | ||
852 | WIPHY_ENTRY | ||
853 | NETDEV_ENTRY | ||
854 | MESH_CFG_ENTRY | ||
855 | ), | ||
856 | TP_fast_assign( | ||
857 | WIPHY_ASSIGN; | ||
858 | NETDEV_ASSIGN; | ||
859 | MESH_CFG_ASSIGN; | ||
860 | ), | ||
861 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, | ||
862 | WIPHY_PR_ARG, NETDEV_PR_ARG) | ||
863 | ); | ||
864 | |||
865 | TRACE_EVENT(rdev_change_bss, | ||
866 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
867 | struct bss_parameters *params), | ||
868 | TP_ARGS(wiphy, netdev, params), | ||
869 | TP_STRUCT__entry( | ||
870 | WIPHY_ENTRY | ||
871 | NETDEV_ENTRY | ||
872 | __field(int, use_cts_prot) | ||
873 | __field(int, use_short_preamble) | ||
874 | __field(int, use_short_slot_time) | ||
875 | __field(int, ap_isolate) | ||
876 | __field(int, ht_opmode) | ||
877 | ), | ||
878 | TP_fast_assign( | ||
879 | WIPHY_ASSIGN; | ||
880 | NETDEV_ASSIGN; | ||
881 | __entry->use_cts_prot = params->use_cts_prot; | ||
882 | __entry->use_short_preamble = params->use_short_preamble; | ||
883 | __entry->use_short_slot_time = params->use_short_slot_time; | ||
884 | __entry->ap_isolate = params->ap_isolate; | ||
885 | __entry->ht_opmode = params->ht_opmode; | ||
886 | ), | ||
887 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", use cts prot: %d, " | ||
888 | "use short preamble: %d, use short slot time: %d, " | ||
889 | "ap isolate: %d, ht opmode: %d", | ||
890 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot, | ||
891 | __entry->use_short_preamble, __entry->use_short_slot_time, | ||
892 | __entry->ap_isolate, __entry->ht_opmode) | ||
893 | ); | ||
894 | |||
895 | TRACE_EVENT(rdev_set_txq_params, | ||
896 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
897 | struct ieee80211_txq_params *params), | ||
898 | TP_ARGS(wiphy, netdev, params), | ||
899 | TP_STRUCT__entry( | ||
900 | WIPHY_ENTRY | ||
901 | NETDEV_ENTRY | ||
902 | __field(enum nl80211_ac, ac) | ||
903 | __field(u16, txop) | ||
904 | __field(u16, cwmin) | ||
905 | __field(u16, cwmax) | ||
906 | __field(u8, aifs) | ||
907 | ), | ||
908 | TP_fast_assign( | ||
909 | WIPHY_ASSIGN; | ||
910 | NETDEV_ASSIGN; | ||
911 | __entry->ac = params->ac; | ||
912 | __entry->txop = params->txop; | ||
913 | __entry->cwmin = params->cwmin; | ||
914 | __entry->cwmax = params->cwmax; | ||
915 | __entry->aifs = params->aifs; | ||
916 | ), | ||
917 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u", | ||
918 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop, | ||
919 | __entry->cwmin, __entry->cwmax, __entry->aifs) | ||
920 | ); | ||
921 | |||
922 | TRACE_EVENT(rdev_libertas_set_mesh_channel, | ||
923 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
924 | struct ieee80211_channel *chan), | ||
925 | TP_ARGS(wiphy, netdev, chan), | ||
926 | TP_STRUCT__entry( | ||
927 | WIPHY_ENTRY | ||
928 | NETDEV_ENTRY | ||
929 | CHAN_ENTRY | ||
930 | ), | ||
931 | TP_fast_assign( | ||
932 | WIPHY_ASSIGN; | ||
933 | NETDEV_ASSIGN; | ||
934 | CHAN_ASSIGN(chan); | ||
935 | ), | ||
936 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT CHAN_PR_FMT, WIPHY_PR_ARG, | ||
937 | NETDEV_PR_ARG, CHAN_PR_ARG) | ||
938 | ); | ||
939 | |||
940 | TRACE_EVENT(rdev_set_monitor_channel, | ||
941 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan, | ||
942 | enum nl80211_channel_type chan_type), | ||
943 | TP_ARGS(wiphy, chan, chan_type), | ||
944 | TP_STRUCT__entry( | ||
945 | WIPHY_ENTRY | ||
946 | CHAN_ENTRY | ||
947 | __field(enum nl80211_channel_type, chan_type) | ||
948 | ), | ||
949 | TP_fast_assign( | ||
950 | WIPHY_ASSIGN; | ||
951 | CHAN_ASSIGN(chan); | ||
952 | __entry->chan_type = chan_type; | ||
953 | ), | ||
954 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type : %d", | ||
955 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->chan_type) | ||
956 | ); | ||
957 | |||
958 | TRACE_EVENT(rdev_auth, | ||
959 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
960 | struct cfg80211_auth_request *req), | ||
961 | TP_ARGS(wiphy, netdev, req), | ||
962 | TP_STRUCT__entry( | ||
963 | WIPHY_ENTRY | ||
964 | NETDEV_ENTRY | ||
965 | MAC_ENTRY(bssid) | ||
966 | __field(enum nl80211_auth_type, auth_type) | ||
967 | ), | ||
968 | TP_fast_assign( | ||
969 | WIPHY_ASSIGN; | ||
970 | NETDEV_ASSIGN; | ||
971 | if (req->bss) | ||
972 | MAC_ASSIGN(bssid, req->bss->bssid); | ||
973 | else | ||
974 | memset(__entry->bssid, 0, ETH_ALEN); | ||
975 | __entry->auth_type = req->auth_type; | ||
976 | ), | ||
977 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT, | ||
978 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type, | ||
979 | MAC_PR_ARG(bssid)) | ||
980 | ); | ||
981 | |||
982 | TRACE_EVENT(rdev_assoc, | ||
983 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
984 | struct cfg80211_assoc_request *req), | ||
985 | TP_ARGS(wiphy, netdev, req), | ||
986 | TP_STRUCT__entry( | ||
987 | WIPHY_ENTRY | ||
988 | NETDEV_ENTRY | ||
989 | MAC_ENTRY(bssid) | ||
990 | MAC_ENTRY(prev_bssid) | ||
991 | __field(bool, use_mfp) | ||
992 | __field(u32, flags) | ||
993 | ), | ||
994 | TP_fast_assign( | ||
995 | WIPHY_ASSIGN; | ||
996 | NETDEV_ASSIGN; | ||
997 | if (req->bss) | ||
998 | MAC_ASSIGN(bssid, req->bss->bssid); | ||
999 | else | ||
1000 | memset(__entry->bssid, 0, ETH_ALEN); | ||
1001 | MAC_ASSIGN(prev_bssid, req->prev_bssid); | ||
1002 | __entry->use_mfp = req->use_mfp; | ||
1003 | __entry->flags = req->flags; | ||
1004 | ), | ||
1005 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT | ||
1006 | ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u", | ||
1007 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), | ||
1008 | MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp), | ||
1009 | __entry->flags) | ||
1010 | ); | ||
1011 | |||
1012 | TRACE_EVENT(rdev_deauth, | ||
1013 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1014 | struct cfg80211_deauth_request *req), | ||
1015 | TP_ARGS(wiphy, netdev, req), | ||
1016 | TP_STRUCT__entry( | ||
1017 | WIPHY_ENTRY | ||
1018 | NETDEV_ENTRY | ||
1019 | MAC_ENTRY(bssid) | ||
1020 | __field(u16, reason_code) | ||
1021 | ), | ||
1022 | TP_fast_assign( | ||
1023 | WIPHY_ASSIGN; | ||
1024 | NETDEV_ASSIGN; | ||
1025 | MAC_ASSIGN(bssid, req->bssid); | ||
1026 | __entry->reason_code = req->reason_code; | ||
1027 | ), | ||
1028 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u", | ||
1029 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), | ||
1030 | __entry->reason_code) | ||
1031 | ); | ||
1032 | |||
1033 | TRACE_EVENT(rdev_disassoc, | ||
1034 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1035 | struct cfg80211_disassoc_request *req), | ||
1036 | TP_ARGS(wiphy, netdev, req), | ||
1037 | TP_STRUCT__entry( | ||
1038 | WIPHY_ENTRY | ||
1039 | NETDEV_ENTRY | ||
1040 | MAC_ENTRY(bssid) | ||
1041 | __field(u16, reason_code) | ||
1042 | __field(bool, local_state_change) | ||
1043 | ), | ||
1044 | TP_fast_assign( | ||
1045 | WIPHY_ASSIGN; | ||
1046 | NETDEV_ASSIGN; | ||
1047 | if (req->bss) | ||
1048 | MAC_ASSIGN(bssid, req->bss->bssid); | ||
1049 | else | ||
1050 | memset(__entry->bssid, 0, ETH_ALEN); | ||
1051 | __entry->reason_code = req->reason_code; | ||
1052 | __entry->local_state_change = req->local_state_change; | ||
1053 | ), | ||
1054 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT | ||
1055 | ", reason: %u, local state change: %s", | ||
1056 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), | ||
1057 | __entry->reason_code, | ||
1058 | BOOL_TO_STR(__entry->local_state_change)) | ||
1059 | ); | ||
1060 | |||
1061 | TRACE_EVENT(rdev_mgmt_tx_cancel_wait, | ||
1062 | TP_PROTO(struct wiphy *wiphy, | ||
1063 | struct wireless_dev *wdev, u64 cookie), | ||
1064 | TP_ARGS(wiphy, wdev, cookie), | ||
1065 | TP_STRUCT__entry( | ||
1066 | WIPHY_ENTRY | ||
1067 | WDEV_ENTRY | ||
1068 | __field(u64, cookie) | ||
1069 | ), | ||
1070 | TP_fast_assign( | ||
1071 | WIPHY_ASSIGN; | ||
1072 | WDEV_ASSIGN; | ||
1073 | __entry->cookie = cookie; | ||
1074 | ), | ||
1075 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu ", | ||
1076 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) | ||
1077 | ); | ||
1078 | |||
1079 | TRACE_EVENT(rdev_set_power_mgmt, | ||
1080 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1081 | bool enabled, int timeout), | ||
1082 | TP_ARGS(wiphy, netdev, enabled, timeout), | ||
1083 | TP_STRUCT__entry( | ||
1084 | WIPHY_ENTRY | ||
1085 | NETDEV_ENTRY | ||
1086 | __field(bool, enabled) | ||
1087 | __field(int, timeout) | ||
1088 | ), | ||
1089 | TP_fast_assign( | ||
1090 | WIPHY_ASSIGN; | ||
1091 | NETDEV_ASSIGN; | ||
1092 | __entry->enabled = enabled; | ||
1093 | __entry->timeout = timeout; | ||
1094 | ), | ||
1095 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", %senabled, timeout: %d ", | ||
1096 | WIPHY_PR_ARG, NETDEV_PR_ARG, | ||
1097 | __entry->enabled ? "" : "not ", __entry->timeout) | ||
1098 | ); | ||
1099 | |||
1100 | TRACE_EVENT(rdev_connect, | ||
1101 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1102 | struct cfg80211_connect_params *sme), | ||
1103 | TP_ARGS(wiphy, netdev, sme), | ||
1104 | TP_STRUCT__entry( | ||
1105 | WIPHY_ENTRY | ||
1106 | NETDEV_ENTRY | ||
1107 | MAC_ENTRY(bssid) | ||
1108 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) | ||
1109 | __field(enum nl80211_auth_type, auth_type) | ||
1110 | __field(bool, privacy) | ||
1111 | __field(u32, wpa_versions) | ||
1112 | __field(u32, flags) | ||
1113 | ), | ||
1114 | TP_fast_assign( | ||
1115 | WIPHY_ASSIGN; | ||
1116 | NETDEV_ASSIGN; | ||
1117 | MAC_ASSIGN(bssid, sme->bssid); | ||
1118 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); | ||
1119 | memcpy(__entry->ssid, sme->ssid, sme->ssid_len); | ||
1120 | __entry->auth_type = sme->auth_type; | ||
1121 | __entry->privacy = sme->privacy; | ||
1122 | __entry->wpa_versions = sme->crypto.wpa_versions; | ||
1123 | __entry->flags = sme->flags; | ||
1124 | ), | ||
1125 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT | ||
1126 | ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, " | ||
1127 | "flags: %u", | ||
1128 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid, | ||
1129 | __entry->auth_type, BOOL_TO_STR(__entry->privacy), | ||
1130 | __entry->wpa_versions, __entry->flags) | ||
1131 | ); | ||
1132 | |||
1133 | TRACE_EVENT(rdev_set_cqm_rssi_config, | ||
1134 | TP_PROTO(struct wiphy *wiphy, | ||
1135 | struct net_device *netdev, s32 rssi_thold, | ||
1136 | u32 rssi_hyst), | ||
1137 | TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst), | ||
1138 | TP_STRUCT__entry( | ||
1139 | WIPHY_ENTRY | ||
1140 | NETDEV_ENTRY | ||
1141 | __field(s32, rssi_thold) | ||
1142 | __field(u32, rssi_hyst) | ||
1143 | ), | ||
1144 | TP_fast_assign( | ||
1145 | WIPHY_ASSIGN; | ||
1146 | NETDEV_ASSIGN; | ||
1147 | __entry->rssi_thold = rssi_thold; | ||
1148 | __entry->rssi_hyst = rssi_hyst; | ||
1149 | ), | ||
1150 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT | ||
1151 | ", rssi_thold: %d, rssi_hyst: %u ", | ||
1152 | WIPHY_PR_ARG, NETDEV_PR_ARG, | ||
1153 | __entry->rssi_thold, __entry->rssi_hyst) | ||
1154 | ); | ||
1155 | |||
1156 | TRACE_EVENT(rdev_set_cqm_txe_config, | ||
1157 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate, | ||
1158 | u32 pkts, u32 intvl), | ||
1159 | TP_ARGS(wiphy, netdev, rate, pkts, intvl), | ||
1160 | TP_STRUCT__entry( | ||
1161 | WIPHY_ENTRY | ||
1162 | NETDEV_ENTRY | ||
1163 | __field(u32, rate) | ||
1164 | __field(u32, pkts) | ||
1165 | __field(u32, intvl) | ||
1166 | ), | ||
1167 | TP_fast_assign( | ||
1168 | WIPHY_ASSIGN; | ||
1169 | NETDEV_ASSIGN; | ||
1170 | __entry->rate = rate; | ||
1171 | __entry->pkts = pkts; | ||
1172 | __entry->intvl = intvl; | ||
1173 | ), | ||
1174 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u", | ||
1175 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts, | ||
1176 | __entry->intvl) | ||
1177 | ); | ||
1178 | |||
1179 | TRACE_EVENT(rdev_disconnect, | ||
1180 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1181 | u16 reason_code), | ||
1182 | TP_ARGS(wiphy, netdev, reason_code), | ||
1183 | TP_STRUCT__entry( | ||
1184 | WIPHY_ENTRY | ||
1185 | NETDEV_ENTRY | ||
1186 | __field(u16, reason_code) | ||
1187 | ), | ||
1188 | TP_fast_assign( | ||
1189 | WIPHY_ASSIGN; | ||
1190 | NETDEV_ASSIGN; | ||
1191 | __entry->reason_code = reason_code; | ||
1192 | ), | ||
1193 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG, | ||
1194 | NETDEV_PR_ARG, __entry->reason_code) | ||
1195 | ); | ||
1196 | |||
1197 | TRACE_EVENT(rdev_join_ibss, | ||
1198 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1199 | struct cfg80211_ibss_params *params), | ||
1200 | TP_ARGS(wiphy, netdev, params), | ||
1201 | TP_STRUCT__entry( | ||
1202 | WIPHY_ENTRY | ||
1203 | NETDEV_ENTRY | ||
1204 | MAC_ENTRY(bssid) | ||
1205 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) | ||
1206 | ), | ||
1207 | TP_fast_assign( | ||
1208 | WIPHY_ASSIGN; | ||
1209 | NETDEV_ASSIGN; | ||
1210 | MAC_ASSIGN(bssid, params->bssid); | ||
1211 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); | ||
1212 | memcpy(__entry->ssid, params->ssid, params->ssid_len); | ||
1213 | ), | ||
1214 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s", | ||
1215 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid) | ||
1216 | ); | ||
1217 | |||
1218 | TRACE_EVENT(rdev_set_wiphy_params, | ||
1219 | TP_PROTO(struct wiphy *wiphy, u32 changed), | ||
1220 | TP_ARGS(wiphy, changed), | ||
1221 | TP_STRUCT__entry( | ||
1222 | WIPHY_ENTRY | ||
1223 | __field(u32, changed) | ||
1224 | ), | ||
1225 | TP_fast_assign( | ||
1226 | WIPHY_ASSIGN; | ||
1227 | __entry->changed = changed; | ||
1228 | ), | ||
1229 | TP_printk(WIPHY_PR_FMT ", changed: %u", | ||
1230 | WIPHY_PR_ARG, __entry->changed) | ||
1231 | ); | ||
1232 | |||
1233 | TRACE_EVENT(rdev_set_tx_power, | ||
1234 | TP_PROTO(struct wiphy *wiphy, enum nl80211_tx_power_setting type, | ||
1235 | int mbm), | ||
1236 | TP_ARGS(wiphy, type, mbm), | ||
1237 | TP_STRUCT__entry( | ||
1238 | WIPHY_ENTRY | ||
1239 | __field(enum nl80211_tx_power_setting, type) | ||
1240 | __field(int, mbm) | ||
1241 | ), | ||
1242 | TP_fast_assign( | ||
1243 | WIPHY_ASSIGN; | ||
1244 | __entry->type = type; | ||
1245 | __entry->mbm = mbm; | ||
1246 | ), | ||
1247 | TP_printk(WIPHY_PR_FMT ", type: %d, mbm: %d", | ||
1248 | WIPHY_PR_ARG, __entry->type, __entry->mbm) | ||
1249 | ); | ||
1250 | |||
1251 | TRACE_EVENT(rdev_return_int_int, | ||
1252 | TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill), | ||
1253 | TP_ARGS(wiphy, func_ret, func_fill), | ||
1254 | TP_STRUCT__entry( | ||
1255 | WIPHY_ENTRY | ||
1256 | __field(int, func_ret) | ||
1257 | __field(int, func_fill) | ||
1258 | ), | ||
1259 | TP_fast_assign( | ||
1260 | WIPHY_ASSIGN; | ||
1261 | __entry->func_ret = func_ret; | ||
1262 | __entry->func_fill = func_fill; | ||
1263 | ), | ||
1264 | TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d", | ||
1265 | WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill) | ||
1266 | ); | ||
1267 | |||
1268 | #ifdef CONFIG_NL80211_TESTMODE | ||
1269 | TRACE_EVENT(rdev_testmode_cmd, | ||
1270 | TP_PROTO(struct wiphy *wiphy), | ||
1271 | TP_ARGS(wiphy), | ||
1272 | TP_STRUCT__entry( | ||
1273 | WIPHY_ENTRY | ||
1274 | ), | ||
1275 | TP_fast_assign( | ||
1276 | WIPHY_ASSIGN; | ||
1277 | ), | ||
1278 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) | ||
1279 | ); | ||
1280 | |||
1281 | TRACE_EVENT(rdev_testmode_dump, | ||
1282 | TP_PROTO(struct wiphy *wiphy), | ||
1283 | TP_ARGS(wiphy), | ||
1284 | TP_STRUCT__entry( | ||
1285 | WIPHY_ENTRY | ||
1286 | ), | ||
1287 | TP_fast_assign( | ||
1288 | WIPHY_ASSIGN; | ||
1289 | ), | ||
1290 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) | ||
1291 | ); | ||
1292 | #endif /* CONFIG_NL80211_TESTMODE */ | ||
1293 | |||
1294 | TRACE_EVENT(rdev_set_bitrate_mask, | ||
1295 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1296 | const u8 *peer, const struct cfg80211_bitrate_mask *mask), | ||
1297 | TP_ARGS(wiphy, netdev, peer, mask), | ||
1298 | TP_STRUCT__entry( | ||
1299 | WIPHY_ENTRY | ||
1300 | NETDEV_ENTRY | ||
1301 | MAC_ENTRY(peer) | ||
1302 | ), | ||
1303 | TP_fast_assign( | ||
1304 | WIPHY_ASSIGN; | ||
1305 | NETDEV_ASSIGN; | ||
1306 | MAC_ASSIGN(peer, peer); | ||
1307 | ), | ||
1308 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", peer: " MAC_PR_FMT, | ||
1309 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) | ||
1310 | ); | ||
1311 | |||
1312 | TRACE_EVENT(rdev_mgmt_frame_register, | ||
1313 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, | ||
1314 | u16 frame_type, bool reg), | ||
1315 | TP_ARGS(wiphy, wdev, frame_type, reg), | ||
1316 | TP_STRUCT__entry( | ||
1317 | WIPHY_ENTRY | ||
1318 | WDEV_ENTRY | ||
1319 | __field(u16, frame_type) | ||
1320 | __field(bool, reg) | ||
1321 | ), | ||
1322 | TP_fast_assign( | ||
1323 | WIPHY_ASSIGN; | ||
1324 | WDEV_ASSIGN; | ||
1325 | __entry->frame_type = frame_type; | ||
1326 | __entry->reg = reg; | ||
1327 | ), | ||
1328 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", frame_type: %u, reg: %s ", | ||
1329 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type, | ||
1330 | __entry->reg ? "true" : "false") | ||
1331 | ); | ||
1332 | |||
1333 | TRACE_EVENT(rdev_return_int_tx_rx, | ||
1334 | TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx), | ||
1335 | TP_ARGS(wiphy, ret, tx, rx), | ||
1336 | TP_STRUCT__entry( | ||
1337 | WIPHY_ENTRY | ||
1338 | __field(int, ret) | ||
1339 | __field(u32, tx) | ||
1340 | __field(u32, rx) | ||
1341 | ), | ||
1342 | TP_fast_assign( | ||
1343 | WIPHY_ASSIGN; | ||
1344 | __entry->ret = ret; | ||
1345 | __entry->tx = tx; | ||
1346 | __entry->rx = rx; | ||
1347 | ), | ||
1348 | TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u", | ||
1349 | WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx) | ||
1350 | ); | ||
1351 | |||
1352 | TRACE_EVENT(rdev_return_void_tx_rx, | ||
1353 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max, | ||
1354 | u32 rx, u32 rx_max), | ||
1355 | TP_ARGS(wiphy, tx, tx_max, rx, rx_max), | ||
1356 | TP_STRUCT__entry( | ||
1357 | WIPHY_ENTRY | ||
1358 | __field(u32, tx) | ||
1359 | __field(u32, tx_max) | ||
1360 | __field(u32, rx) | ||
1361 | __field(u32, rx_max) | ||
1362 | ), | ||
1363 | TP_fast_assign( | ||
1364 | WIPHY_ASSIGN; | ||
1365 | __entry->tx = tx; | ||
1366 | __entry->tx_max = tx_max; | ||
1367 | __entry->rx = rx; | ||
1368 | __entry->rx_max = rx_max; | ||
1369 | ), | ||
1370 | TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ", | ||
1371 | WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx, | ||
1372 | __entry->rx_max) | ||
1373 | ); | ||
1374 | |||
1375 | DECLARE_EVENT_CLASS(tx_rx_evt, | ||
1376 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), | ||
1377 | TP_ARGS(wiphy, rx, tx), | ||
1378 | TP_STRUCT__entry( | ||
1379 | WIPHY_ENTRY | ||
1380 | __field(u32, tx) | ||
1381 | __field(u32, rx) | ||
1382 | ), | ||
1383 | TP_fast_assign( | ||
1384 | WIPHY_ASSIGN; | ||
1385 | __entry->tx = tx; | ||
1386 | __entry->rx = rx; | ||
1387 | ), | ||
1388 | TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ", | ||
1389 | WIPHY_PR_ARG, __entry->tx, __entry->rx) | ||
1390 | ); | ||
1391 | |||
1392 | DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam, | ||
1393 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), | ||
1394 | TP_ARGS(wiphy, rx, tx) | ||
1395 | ); | ||
1396 | |||
1397 | DEFINE_EVENT(tx_rx_evt, rdev_set_antenna, | ||
1398 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), | ||
1399 | TP_ARGS(wiphy, rx, tx) | ||
1400 | ); | ||
1401 | |||
1402 | TRACE_EVENT(rdev_sched_scan_start, | ||
1403 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1404 | struct cfg80211_sched_scan_request *request), | ||
1405 | TP_ARGS(wiphy, netdev, request), | ||
1406 | TP_STRUCT__entry( | ||
1407 | WIPHY_ENTRY | ||
1408 | NETDEV_ENTRY | ||
1409 | ), | ||
1410 | TP_fast_assign( | ||
1411 | WIPHY_ASSIGN; | ||
1412 | NETDEV_ASSIGN; | ||
1413 | ), | ||
1414 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, | ||
1415 | WIPHY_PR_ARG, NETDEV_PR_ARG) | ||
1416 | ); | ||
1417 | |||
1418 | TRACE_EVENT(rdev_tdls_mgmt, | ||
1419 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1420 | u8 *peer, u8 action_code, u8 dialog_token, | ||
1421 | u16 status_code, const u8 *buf, size_t len), | ||
1422 | TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code, | ||
1423 | buf, len), | ||
1424 | TP_STRUCT__entry( | ||
1425 | WIPHY_ENTRY | ||
1426 | NETDEV_ENTRY | ||
1427 | MAC_ENTRY(peer) | ||
1428 | __field(u8, action_code) | ||
1429 | __field(u8, dialog_token) | ||
1430 | __field(u16, status_code) | ||
1431 | __dynamic_array(u8, buf, len) | ||
1432 | ), | ||
1433 | TP_fast_assign( | ||
1434 | WIPHY_ASSIGN; | ||
1435 | NETDEV_ASSIGN; | ||
1436 | MAC_ASSIGN(peer, peer); | ||
1437 | __entry->action_code = action_code; | ||
1438 | __entry->dialog_token = dialog_token; | ||
1439 | __entry->status_code = status_code; | ||
1440 | memcpy(__get_dynamic_array(buf), buf, len); | ||
1441 | ), | ||
1442 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", action_code: %u, " | ||
1443 | "dialog_token: %u, status_code: %u, buf: %#.2x ", | ||
1444 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), | ||
1445 | __entry->action_code, __entry->dialog_token, | ||
1446 | __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0]) | ||
1447 | ); | ||
1448 | |||
1449 | TRACE_EVENT(rdev_dump_survey, | ||
1450 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx), | ||
1451 | TP_ARGS(wiphy, netdev, idx), | ||
1452 | TP_STRUCT__entry( | ||
1453 | WIPHY_ENTRY | ||
1454 | NETDEV_ENTRY | ||
1455 | __field(int, idx) | ||
1456 | ), | ||
1457 | TP_fast_assign( | ||
1458 | WIPHY_ASSIGN; | ||
1459 | NETDEV_ASSIGN; | ||
1460 | __entry->idx = idx; | ||
1461 | ), | ||
1462 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d", | ||
1463 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx) | ||
1464 | ); | ||
1465 | |||
1466 | TRACE_EVENT(rdev_return_int_survey_info, | ||
1467 | TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info), | ||
1468 | TP_ARGS(wiphy, ret, info), | ||
1469 | TP_STRUCT__entry( | ||
1470 | WIPHY_ENTRY | ||
1471 | CHAN_ENTRY | ||
1472 | __field(int, ret) | ||
1473 | __field(u64, channel_time) | ||
1474 | __field(u64, channel_time_busy) | ||
1475 | __field(u64, channel_time_ext_busy) | ||
1476 | __field(u64, channel_time_rx) | ||
1477 | __field(u64, channel_time_tx) | ||
1478 | __field(u32, filled) | ||
1479 | __field(s8, noise) | ||
1480 | ), | ||
1481 | TP_fast_assign( | ||
1482 | WIPHY_ASSIGN; | ||
1483 | CHAN_ASSIGN(info->channel); | ||
1484 | __entry->ret = ret; | ||
1485 | __entry->channel_time = info->channel_time; | ||
1486 | __entry->channel_time_busy = info->channel_time_busy; | ||
1487 | __entry->channel_time_ext_busy = info->channel_time_ext_busy; | ||
1488 | __entry->channel_time_rx = info->channel_time_rx; | ||
1489 | __entry->channel_time_tx = info->channel_time_tx; | ||
1490 | __entry->filled = info->filled; | ||
1491 | __entry->noise = info->noise; | ||
1492 | ), | ||
1493 | TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT | ||
1494 | ", channel time: %llu, channel time busy: %llu, " | ||
1495 | "channel time extension busy: %llu, channel time rx: %llu, " | ||
1496 | "channel time tx: %llu, filled: %u, noise: %d", | ||
1497 | WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, | ||
1498 | __entry->channel_time, __entry->channel_time_busy, | ||
1499 | __entry->channel_time_ext_busy, __entry->channel_time_rx, | ||
1500 | __entry->channel_time_tx, __entry->filled, __entry->noise) | ||
1501 | ); | ||
1502 | |||
1503 | TRACE_EVENT(rdev_tdls_oper, | ||
1504 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1505 | u8 *peer, enum nl80211_tdls_operation oper), | ||
1506 | TP_ARGS(wiphy, netdev, peer, oper), | ||
1507 | TP_STRUCT__entry( | ||
1508 | WIPHY_ENTRY | ||
1509 | NETDEV_ENTRY | ||
1510 | MAC_ENTRY(peer) | ||
1511 | __field(enum nl80211_tdls_operation, oper) | ||
1512 | ), | ||
1513 | TP_fast_assign( | ||
1514 | WIPHY_ASSIGN; | ||
1515 | NETDEV_ASSIGN; | ||
1516 | MAC_ASSIGN(peer, peer); | ||
1517 | __entry->oper = oper; | ||
1518 | ), | ||
1519 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", oper: %d", | ||
1520 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper) | ||
1521 | ); | ||
1522 | |||
1523 | DECLARE_EVENT_CLASS(rdev_pmksa, | ||
1524 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1525 | struct cfg80211_pmksa *pmksa), | ||
1526 | TP_ARGS(wiphy, netdev, pmksa), | ||
1527 | TP_STRUCT__entry( | ||
1528 | WIPHY_ENTRY | ||
1529 | NETDEV_ENTRY | ||
1530 | MAC_ENTRY(bssid) | ||
1531 | ), | ||
1532 | TP_fast_assign( | ||
1533 | WIPHY_ASSIGN; | ||
1534 | NETDEV_ASSIGN; | ||
1535 | MAC_ASSIGN(bssid, pmksa->bssid); | ||
1536 | ), | ||
1537 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT, | ||
1538 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid)) | ||
1539 | ); | ||
1540 | |||
1541 | TRACE_EVENT(rdev_probe_client, | ||
1542 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1543 | const u8 *peer), | ||
1544 | TP_ARGS(wiphy, netdev, peer), | ||
1545 | TP_STRUCT__entry( | ||
1546 | WIPHY_ENTRY | ||
1547 | NETDEV_ENTRY | ||
1548 | MAC_ENTRY(peer) | ||
1549 | ), | ||
1550 | TP_fast_assign( | ||
1551 | WIPHY_ASSIGN; | ||
1552 | NETDEV_ASSIGN; | ||
1553 | MAC_ASSIGN(peer, peer); | ||
1554 | ), | ||
1555 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT, | ||
1556 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) | ||
1557 | ); | ||
1558 | |||
1559 | DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa, | ||
1560 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1561 | struct cfg80211_pmksa *pmksa), | ||
1562 | TP_ARGS(wiphy, netdev, pmksa) | ||
1563 | ); | ||
1564 | |||
1565 | DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa, | ||
1566 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1567 | struct cfg80211_pmksa *pmksa), | ||
1568 | TP_ARGS(wiphy, netdev, pmksa) | ||
1569 | ); | ||
1570 | |||
1571 | TRACE_EVENT(rdev_remain_on_channel, | ||
1572 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, | ||
1573 | struct ieee80211_channel *chan, | ||
1574 | enum nl80211_channel_type channel_type, unsigned int duration), | ||
1575 | TP_ARGS(wiphy, wdev, chan, channel_type, duration), | ||
1576 | TP_STRUCT__entry( | ||
1577 | WIPHY_ENTRY | ||
1578 | WDEV_ENTRY | ||
1579 | CHAN_ENTRY | ||
1580 | __field(enum nl80211_channel_type, channel_type) | ||
1581 | __field(unsigned int, duration) | ||
1582 | ), | ||
1583 | TP_fast_assign( | ||
1584 | WIPHY_ASSIGN; | ||
1585 | WDEV_ASSIGN; | ||
1586 | CHAN_ASSIGN(chan); | ||
1587 | __entry->channel_type = channel_type; | ||
1588 | __entry->duration = duration; | ||
1589 | ), | ||
1590 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", channel type: %d, duration: %u", | ||
1591 | WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->channel_type, | ||
1592 | __entry->duration) | ||
1593 | ); | ||
1594 | |||
1595 | TRACE_EVENT(rdev_return_int_cookie, | ||
1596 | TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie), | ||
1597 | TP_ARGS(wiphy, ret, cookie), | ||
1598 | TP_STRUCT__entry( | ||
1599 | WIPHY_ENTRY | ||
1600 | __field(int, ret) | ||
1601 | __field(u64, cookie) | ||
1602 | ), | ||
1603 | TP_fast_assign( | ||
1604 | WIPHY_ASSIGN; | ||
1605 | __entry->ret = ret; | ||
1606 | __entry->cookie = cookie; | ||
1607 | ), | ||
1608 | TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu", | ||
1609 | WIPHY_PR_ARG, __entry->ret, __entry->cookie) | ||
1610 | ); | ||
1611 | |||
1612 | TRACE_EVENT(rdev_cancel_remain_on_channel, | ||
1613 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie), | ||
1614 | TP_ARGS(wiphy, wdev, cookie), | ||
1615 | TP_STRUCT__entry( | ||
1616 | WIPHY_ENTRY | ||
1617 | WDEV_ENTRY | ||
1618 | __field(u64, cookie) | ||
1619 | ), | ||
1620 | TP_fast_assign( | ||
1621 | WIPHY_ASSIGN; | ||
1622 | WDEV_ASSIGN; | ||
1623 | __entry->cookie = cookie; | ||
1624 | ), | ||
1625 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu", | ||
1626 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) | ||
1627 | ); | ||
1628 | |||
1629 | TRACE_EVENT(rdev_mgmt_tx, | ||
1630 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, | ||
1631 | struct ieee80211_channel *chan, bool offchan, | ||
1632 | enum nl80211_channel_type channel_type, | ||
1633 | bool channel_type_valid, unsigned int wait, bool no_cck, | ||
1634 | bool dont_wait_for_ack), | ||
1635 | TP_ARGS(wiphy, wdev, chan, offchan, channel_type, channel_type_valid, | ||
1636 | wait, no_cck, dont_wait_for_ack), | ||
1637 | TP_STRUCT__entry( | ||
1638 | WIPHY_ENTRY | ||
1639 | WDEV_ENTRY | ||
1640 | CHAN_ENTRY | ||
1641 | __field(bool, offchan) | ||
1642 | __field(enum nl80211_channel_type, channel_type) | ||
1643 | __field(bool, channel_type_valid) | ||
1644 | __field(unsigned int, wait) | ||
1645 | __field(bool, no_cck) | ||
1646 | __field(bool, dont_wait_for_ack) | ||
1647 | ), | ||
1648 | TP_fast_assign( | ||
1649 | WIPHY_ASSIGN; | ||
1650 | WDEV_ASSIGN; | ||
1651 | CHAN_ASSIGN(chan); | ||
1652 | __entry->offchan = offchan; | ||
1653 | __entry->channel_type = channel_type; | ||
1654 | __entry->channel_type_valid = channel_type_valid; | ||
1655 | __entry->wait = wait; | ||
1656 | __entry->no_cck = no_cck; | ||
1657 | __entry->dont_wait_for_ack = dont_wait_for_ack; | ||
1658 | ), | ||
1659 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", offchan: %s, " | ||
1660 | "channel type: %d, channel type valid: %s, wait: %u, " | ||
1661 | "no cck: %s, dont wait for ack: %s", | ||
1662 | WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, | ||
1663 | BOOL_TO_STR(__entry->offchan), __entry->channel_type, | ||
1664 | BOOL_TO_STR(__entry->channel_type_valid), __entry->wait, | ||
1665 | BOOL_TO_STR(__entry->no_cck), | ||
1666 | BOOL_TO_STR(__entry->dont_wait_for_ack)) | ||
1667 | ); | ||
1668 | |||
1669 | TRACE_EVENT(rdev_set_noack_map, | ||
1670 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, | ||
1671 | u16 noack_map), | ||
1672 | TP_ARGS(wiphy, netdev, noack_map), | ||
1673 | TP_STRUCT__entry( | ||
1674 | WIPHY_ENTRY | ||
1675 | NETDEV_ENTRY | ||
1676 | __field(u16, noack_map) | ||
1677 | ), | ||
1678 | TP_fast_assign( | ||
1679 | WIPHY_ASSIGN; | ||
1680 | NETDEV_ASSIGN; | ||
1681 | __entry->noack_map = noack_map; | ||
1682 | ), | ||
1683 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", noack_map: %u", | ||
1684 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map) | ||
1685 | ); | ||
1686 | |||
1687 | TRACE_EVENT(rdev_get_et_sset_count, | ||
1688 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset), | ||
1689 | TP_ARGS(wiphy, netdev, sset), | ||
1690 | TP_STRUCT__entry( | ||
1691 | WIPHY_ENTRY | ||
1692 | NETDEV_ENTRY | ||
1693 | __field(int, sset) | ||
1694 | ), | ||
1695 | TP_fast_assign( | ||
1696 | WIPHY_ASSIGN; | ||
1697 | NETDEV_ASSIGN; | ||
1698 | __entry->sset = sset; | ||
1699 | ), | ||
1700 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %d", | ||
1701 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) | ||
1702 | ); | ||
1703 | |||
1704 | TRACE_EVENT(rdev_get_et_strings, | ||
1705 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset), | ||
1706 | TP_ARGS(wiphy, netdev, sset), | ||
1707 | TP_STRUCT__entry( | ||
1708 | WIPHY_ENTRY | ||
1709 | NETDEV_ENTRY | ||
1710 | __field(u32, sset) | ||
1711 | ), | ||
1712 | TP_fast_assign( | ||
1713 | WIPHY_ASSIGN; | ||
1714 | NETDEV_ASSIGN; | ||
1715 | __entry->sset = sset; | ||
1716 | ), | ||
1717 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %u", | ||
1718 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) | ||
1719 | ); | ||
1720 | |||
1721 | DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel, | ||
1722 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), | ||
1723 | TP_ARGS(wiphy, wdev) | ||
1724 | ); | ||
1725 | |||
1726 | TRACE_EVENT(rdev_return_channel, | ||
1727 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan, | ||
1728 | enum nl80211_channel_type type), | ||
1729 | TP_ARGS(wiphy, chan, type), | ||
1730 | TP_STRUCT__entry( | ||
1731 | WIPHY_ENTRY | ||
1732 | CHAN_ENTRY | ||
1733 | __field(enum nl80211_channel_type, type) | ||
1734 | ), | ||
1735 | TP_fast_assign( | ||
1736 | WIPHY_ASSIGN; | ||
1737 | CHAN_ASSIGN(chan); | ||
1738 | __entry->type = type; | ||
1739 | ), | ||
1740 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type: %d", | ||
1741 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) | ||
1742 | ); | ||
1743 | |||
1744 | #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ | ||
1745 | |||
1746 | #undef TRACE_INCLUDE_PATH | ||
1747 | #define TRACE_INCLUDE_PATH . | ||
1748 | #undef TRACE_INCLUDE_FILE | ||
1749 | #define TRACE_INCLUDE_FILE trace | ||
1750 | #include <trace/define_trace.h> | ||