Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Beni Lev and committed by
Johannes Berg
14e8a3c4 e35e4d28

+2141 -79
+3 -1
net/wireless/Makefile
··· 10 10 obj-$(CONFIG_WEXT_PRIV) += wext-priv.o 11 11 12 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 14 cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o 15 15 cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o 16 16 cfg80211-$(CONFIG_CFG80211_INTERNAL_REGDB) += regdb.o 17 + 18 + CFLAGS_trace.o := -I$(src) 17 19 18 20 ccflags-y += -D__CHECK_ENDIAN__ 19 21
+381 -78
net/wireless/rdev-ops.h
··· 4 4 #include <linux/rtnetlink.h> 5 5 #include <net/cfg80211.h> 6 6 #include "core.h" 7 + #include "trace.h" 7 8 8 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 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 27 static inline void rdev_set_wakeup(struct cfg80211_registered_device *rdev, 19 28 bool enabled) 20 29 { 30 + trace_rdev_set_wakeup(&rdev->wiphy, enabled); 21 31 rdev->ops->set_wakeup(&rdev->wiphy, enabled); 32 + trace_rdev_return_void(&rdev->wiphy); 22 33 } 23 34 24 35 static inline struct wireless_dev ··· 37 26 enum nl80211_iftype type, u32 *flags, 38 27 struct vif_params *params) 39 28 { 40 - return rdev->ops->add_virtual_intf(&rdev->wiphy, name, type, flags, 41 - params); 29 + struct wireless_dev *ret; 30 + trace_rdev_add_virtual_intf(&rdev->wiphy, name, type); 31 + ret = rdev->ops->add_virtual_intf(&rdev->wiphy, name, type, flags, 32 + params); 33 + trace_rdev_return_wdev(&rdev->wiphy, ret); 34 + return ret; 42 35 } 43 36 44 37 static inline int 45 38 rdev_del_virtual_intf(struct cfg80211_registered_device *rdev, 46 39 struct wireless_dev *wdev) 47 40 { 48 - return rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); 41 + int ret; 42 + trace_rdev_del_virtual_intf(&rdev->wiphy, wdev); 43 + ret = rdev->ops->del_virtual_intf(&rdev->wiphy, wdev); 44 + trace_rdev_return_int(&rdev->wiphy, ret); 45 + return ret; 49 46 } 50 47 51 48 static inline int ··· 61 42 struct net_device *dev, enum nl80211_iftype type, 62 43 u32 *flags, struct vif_params *params) 63 44 { 64 - return rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, 65 - params); 45 + int ret; 46 + trace_rdev_change_virtual_intf(&rdev->wiphy, dev, type); 47 + ret = rdev->ops->change_virtual_intf(&rdev->wiphy, dev, type, flags, 48 + params); 49 + trace_rdev_return_int(&rdev->wiphy, ret); 50 + return ret; 66 51 } 67 52 68 53 static inline int rdev_add_key(struct cfg80211_registered_device *rdev, ··· 74 51 bool pairwise, const u8 *mac_addr, 75 52 struct key_params *params) 76 53 { 77 - return rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise, 54 + int ret; 55 + trace_rdev_add_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); 56 + ret = rdev->ops->add_key(&rdev->wiphy, netdev, key_index, pairwise, 78 57 mac_addr, params); 58 + trace_rdev_return_int(&rdev->wiphy, ret); 59 + return ret; 79 60 } 80 61 81 62 static inline int ··· 87 60 u8 key_index, bool pairwise, const u8 *mac_addr, void *cookie, 88 61 void (*callback)(void *cookie, struct key_params*)) 89 62 { 90 - return rdev->ops->get_key(&rdev->wiphy, netdev, key_index, pairwise, 63 + int ret; 64 + trace_rdev_get_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); 65 + ret = rdev->ops->get_key(&rdev->wiphy, netdev, key_index, pairwise, 91 66 mac_addr, cookie, callback); 67 + trace_rdev_return_int(&rdev->wiphy, ret); 68 + return ret; 92 69 } 93 70 94 71 static inline int rdev_del_key(struct cfg80211_registered_device *rdev, 95 72 struct net_device *netdev, u8 key_index, 96 73 bool pairwise, const u8 *mac_addr) 97 74 { 98 - return rdev->ops->del_key(&rdev->wiphy, netdev, key_index, pairwise, 75 + int ret; 76 + trace_rdev_del_key(&rdev->wiphy, netdev, key_index, pairwise, mac_addr); 77 + ret = rdev->ops->del_key(&rdev->wiphy, netdev, key_index, pairwise, 99 78 mac_addr); 79 + trace_rdev_return_int(&rdev->wiphy, ret); 80 + return ret; 100 81 } 101 82 102 83 static inline int ··· 112 77 struct net_device *netdev, u8 key_index, bool unicast, 113 78 bool multicast) 114 79 { 115 - return rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index, 80 + int ret; 81 + trace_rdev_set_default_key(&rdev->wiphy, netdev, key_index, 82 + unicast, multicast); 83 + ret = rdev->ops->set_default_key(&rdev->wiphy, netdev, key_index, 116 84 unicast, multicast); 85 + trace_rdev_return_int(&rdev->wiphy, ret); 86 + return ret; 117 87 } 118 88 119 89 static inline int 120 90 rdev_set_default_mgmt_key(struct cfg80211_registered_device *rdev, 121 91 struct net_device *netdev, u8 key_index) 122 92 { 123 - return rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, 93 + int ret; 94 + trace_rdev_set_default_mgmt_key(&rdev->wiphy, netdev, key_index); 95 + ret = rdev->ops->set_default_mgmt_key(&rdev->wiphy, netdev, 124 96 key_index); 97 + trace_rdev_return_int(&rdev->wiphy, ret); 98 + return ret; 125 99 } 126 100 127 101 static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, 128 102 struct net_device *dev, 129 103 struct cfg80211_ap_settings *settings) 130 104 { 131 - return rdev->ops->start_ap(&rdev->wiphy, dev, settings); 105 + int ret; 106 + trace_rdev_start_ap(&rdev->wiphy, dev, settings); 107 + ret = rdev->ops->start_ap(&rdev->wiphy, dev, settings); 108 + trace_rdev_return_int(&rdev->wiphy, ret); 109 + return ret; 132 110 } 133 111 134 112 static inline int rdev_change_beacon(struct cfg80211_registered_device *rdev, 135 113 struct net_device *dev, 136 114 struct cfg80211_beacon_data *info) 137 115 { 138 - return rdev->ops->change_beacon(&rdev->wiphy, dev, info); 116 + int ret; 117 + trace_rdev_change_beacon(&rdev->wiphy, dev, info); 118 + ret = rdev->ops->change_beacon(&rdev->wiphy, dev, info); 119 + trace_rdev_return_int(&rdev->wiphy, ret); 120 + return ret; 139 121 } 140 122 141 123 static inline int rdev_stop_ap(struct cfg80211_registered_device *rdev, 142 124 struct net_device *dev) 143 125 { 144 - return rdev->ops->stop_ap(&rdev->wiphy, dev); 126 + int ret; 127 + trace_rdev_stop_ap(&rdev->wiphy, dev); 128 + ret = rdev->ops->stop_ap(&rdev->wiphy, dev); 129 + trace_rdev_return_int(&rdev->wiphy, ret); 130 + return ret; 145 131 } 146 132 147 133 static inline int rdev_add_station(struct cfg80211_registered_device *rdev, 148 134 struct net_device *dev, u8 *mac, 149 135 struct station_parameters *params) 150 136 { 151 - return rdev->ops->add_station(&rdev->wiphy, dev, mac, params); 137 + int ret; 138 + trace_rdev_add_station(&rdev->wiphy, dev, mac, params); 139 + ret = rdev->ops->add_station(&rdev->wiphy, dev, mac, params); 140 + trace_rdev_return_int(&rdev->wiphy, ret); 141 + return ret; 152 142 } 153 143 154 144 static inline int rdev_del_station(struct cfg80211_registered_device *rdev, 155 145 struct net_device *dev, u8 *mac) 156 146 { 157 - return rdev->ops->del_station(&rdev->wiphy, dev, mac); 147 + int ret; 148 + trace_rdev_del_station(&rdev->wiphy, dev, mac); 149 + ret = rdev->ops->del_station(&rdev->wiphy, dev, mac); 150 + trace_rdev_return_int(&rdev->wiphy, ret); 151 + return ret; 158 152 } 159 153 160 154 static inline int rdev_change_station(struct cfg80211_registered_device *rdev, 161 155 struct net_device *dev, u8 *mac, 162 156 struct station_parameters *params) 163 157 { 164 - return rdev->ops->change_station(&rdev->wiphy, dev, mac, params); 158 + int ret; 159 + trace_rdev_change_station(&rdev->wiphy, dev, mac, params); 160 + ret = rdev->ops->change_station(&rdev->wiphy, dev, mac, params); 161 + trace_rdev_return_int(&rdev->wiphy, ret); 162 + return ret; 165 163 } 166 164 167 165 static inline int rdev_get_station(struct cfg80211_registered_device *rdev, 168 166 struct net_device *dev, u8 *mac, 169 167 struct station_info *sinfo) 170 168 { 171 - return rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); 169 + int ret; 170 + trace_rdev_get_station(&rdev->wiphy, dev, mac); 171 + ret = rdev->ops->get_station(&rdev->wiphy, dev, mac, sinfo); 172 + trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); 173 + return ret; 172 174 } 173 175 174 176 static inline int rdev_dump_station(struct cfg80211_registered_device *rdev, 175 177 struct net_device *dev, int idx, u8 *mac, 176 178 struct station_info *sinfo) 177 179 { 178 - return rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); 180 + int ret; 181 + trace_rdev_dump_station(&rdev->wiphy, dev, idx, mac); 182 + ret = rdev->ops->dump_station(&rdev->wiphy, dev, idx, mac, sinfo); 183 + trace_rdev_return_int_station_info(&rdev->wiphy, ret, sinfo); 184 + return ret; 179 185 } 180 186 181 187 static inline int rdev_add_mpath(struct cfg80211_registered_device *rdev, 182 188 struct net_device *dev, u8 *dst, u8 *next_hop) 183 189 { 184 - return rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); 190 + int ret; 191 + trace_rdev_add_mpath(&rdev->wiphy, dev, dst, next_hop); 192 + ret = rdev->ops->add_mpath(&rdev->wiphy, dev, dst, next_hop); 193 + trace_rdev_return_int(&rdev->wiphy, ret); 194 + return ret; 185 195 } 186 196 187 197 static inline int rdev_del_mpath(struct cfg80211_registered_device *rdev, 188 198 struct net_device *dev, u8 *dst) 189 199 { 190 - return rdev->ops->del_mpath(&rdev->wiphy, dev, dst); 200 + int ret; 201 + trace_rdev_del_mpath(&rdev->wiphy, dev, dst); 202 + ret = rdev->ops->del_mpath(&rdev->wiphy, dev, dst); 203 + trace_rdev_return_int(&rdev->wiphy, ret); 204 + return ret; 191 205 } 192 206 193 207 static inline int rdev_change_mpath(struct cfg80211_registered_device *rdev, 194 208 struct net_device *dev, u8 *dst, 195 209 u8 *next_hop) 196 210 { 197 - return rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); 211 + int ret; 212 + trace_rdev_change_mpath(&rdev->wiphy, dev, dst, next_hop); 213 + ret = rdev->ops->change_mpath(&rdev->wiphy, dev, dst, next_hop); 214 + trace_rdev_return_int(&rdev->wiphy, ret); 215 + return ret; 198 216 } 199 217 200 218 static inline int rdev_get_mpath(struct cfg80211_registered_device *rdev, 201 219 struct net_device *dev, u8 *dst, u8 *next_hop, 202 220 struct mpath_info *pinfo) 203 221 { 204 - return rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); 222 + int ret; 223 + trace_rdev_get_mpath(&rdev->wiphy, dev, dst, next_hop); 224 + ret = rdev->ops->get_mpath(&rdev->wiphy, dev, dst, next_hop, pinfo); 225 + trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); 226 + return ret; 227 + 205 228 } 206 229 207 230 static inline int rdev_dump_mpath(struct cfg80211_registered_device *rdev, ··· 267 174 u8 *next_hop, struct mpath_info *pinfo) 268 175 269 176 { 270 - return rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, 177 + int ret; 178 + trace_rdev_dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop); 179 + ret = rdev->ops->dump_mpath(&rdev->wiphy, dev, idx, dst, next_hop, 271 180 pinfo); 181 + trace_rdev_return_int_mpath_info(&rdev->wiphy, ret, pinfo); 182 + return ret; 272 183 } 273 184 274 185 static inline int 275 186 rdev_get_mesh_config(struct cfg80211_registered_device *rdev, 276 187 struct net_device *dev, struct mesh_config *conf) 277 188 { 278 - return rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); 189 + int ret; 190 + trace_rdev_get_mesh_config(&rdev->wiphy, dev); 191 + ret = rdev->ops->get_mesh_config(&rdev->wiphy, dev, conf); 192 + trace_rdev_return_int_mesh_config(&rdev->wiphy, ret, conf); 193 + return ret; 279 194 } 280 195 281 196 static inline int ··· 291 190 struct net_device *dev, u32 mask, 292 191 const struct mesh_config *nconf) 293 192 { 294 - return rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); 193 + int ret; 194 + trace_rdev_update_mesh_config(&rdev->wiphy, dev, mask, nconf); 195 + ret = rdev->ops->update_mesh_config(&rdev->wiphy, dev, mask, nconf); 196 + trace_rdev_return_int(&rdev->wiphy, ret); 197 + return ret; 295 198 } 296 199 297 200 static inline int rdev_join_mesh(struct cfg80211_registered_device *rdev, ··· 303 198 const struct mesh_config *conf, 304 199 const struct mesh_setup *setup) 305 200 { 306 - return rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); 201 + int ret; 202 + trace_rdev_join_mesh(&rdev->wiphy, dev, conf, setup); 203 + ret = rdev->ops->join_mesh(&rdev->wiphy, dev, conf, setup); 204 + trace_rdev_return_int(&rdev->wiphy, ret); 205 + return ret; 307 206 } 308 207 309 208 310 209 static inline int rdev_leave_mesh(struct cfg80211_registered_device *rdev, 311 210 struct net_device *dev) 312 211 { 313 - return rdev->ops->leave_mesh(&rdev->wiphy, dev); 212 + int ret; 213 + trace_rdev_leave_mesh(&rdev->wiphy, dev); 214 + ret = rdev->ops->leave_mesh(&rdev->wiphy, dev); 215 + trace_rdev_return_int(&rdev->wiphy, ret); 216 + return ret; 314 217 } 315 218 316 219 static inline int rdev_change_bss(struct cfg80211_registered_device *rdev, ··· 326 213 struct bss_parameters *params) 327 214 328 215 { 329 - return rdev->ops->change_bss(&rdev->wiphy, dev, params); 216 + int ret; 217 + trace_rdev_change_bss(&rdev->wiphy, dev, params); 218 + ret = rdev->ops->change_bss(&rdev->wiphy, dev, params); 219 + trace_rdev_return_int(&rdev->wiphy, ret); 220 + return ret; 330 221 } 331 222 332 223 static inline int rdev_set_txq_params(struct cfg80211_registered_device *rdev, ··· 338 221 struct ieee80211_txq_params *params) 339 222 340 223 { 341 - return rdev->ops->set_txq_params(&rdev->wiphy, dev, params); 224 + int ret; 225 + trace_rdev_set_txq_params(&rdev->wiphy, dev, params); 226 + ret = rdev->ops->set_txq_params(&rdev->wiphy, dev, params); 227 + trace_rdev_return_int(&rdev->wiphy, ret); 228 + return ret; 342 229 } 343 230 344 231 static inline int ··· 350 229 struct net_device *dev, 351 230 struct ieee80211_channel *chan) 352 231 { 353 - return rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); 232 + int ret; 233 + trace_rdev_libertas_set_mesh_channel(&rdev->wiphy, dev, chan); 234 + ret = rdev->ops->libertas_set_mesh_channel(&rdev->wiphy, dev, chan); 235 + trace_rdev_return_int(&rdev->wiphy, ret); 236 + return ret; 354 237 } 355 238 356 239 static inline int ··· 362 237 struct ieee80211_channel *chan, 363 238 enum nl80211_channel_type channel_type) 364 239 { 365 - return rdev->ops->set_monitor_channel(&rdev->wiphy, chan, 366 - channel_type); 240 + int ret; 241 + trace_rdev_set_monitor_channel(&rdev->wiphy, chan, channel_type); 242 + ret = rdev->ops->set_monitor_channel(&rdev->wiphy, chan, channel_type); 243 + trace_rdev_return_int(&rdev->wiphy, ret); 244 + return ret; 367 245 } 368 246 369 247 static inline int rdev_scan(struct cfg80211_registered_device *rdev, 370 248 struct cfg80211_scan_request *request) 371 249 { 372 - return rdev->ops->scan(&rdev->wiphy, request); 250 + int ret; 251 + trace_rdev_scan(&rdev->wiphy, request); 252 + ret = rdev->ops->scan(&rdev->wiphy, request); 253 + trace_rdev_return_int(&rdev->wiphy, ret); 254 + return ret; 373 255 } 374 256 375 257 static inline int rdev_auth(struct cfg80211_registered_device *rdev, 376 258 struct net_device *dev, 377 259 struct cfg80211_auth_request *req) 378 260 { 379 - return rdev->ops->auth(&rdev->wiphy, dev, req); 261 + int ret; 262 + trace_rdev_auth(&rdev->wiphy, dev, req); 263 + ret = rdev->ops->auth(&rdev->wiphy, dev, req); 264 + trace_rdev_return_int(&rdev->wiphy, ret); 265 + return ret; 380 266 } 381 267 382 268 static inline int rdev_assoc(struct cfg80211_registered_device *rdev, 383 269 struct net_device *dev, 384 270 struct cfg80211_assoc_request *req) 385 271 { 386 - return rdev->ops->assoc(&rdev->wiphy, dev, req); 272 + int ret; 273 + trace_rdev_assoc(&rdev->wiphy, dev, req); 274 + ret = rdev->ops->assoc(&rdev->wiphy, dev, req); 275 + trace_rdev_return_int(&rdev->wiphy, ret); 276 + return ret; 387 277 } 388 278 389 279 static inline int rdev_deauth(struct cfg80211_registered_device *rdev, 390 280 struct net_device *dev, 391 281 struct cfg80211_deauth_request *req) 392 282 { 393 - return rdev->ops->deauth(&rdev->wiphy, dev, req); 283 + int ret; 284 + trace_rdev_deauth(&rdev->wiphy, dev, req); 285 + ret = rdev->ops->deauth(&rdev->wiphy, dev, req); 286 + trace_rdev_return_int(&rdev->wiphy, ret); 287 + return ret; 394 288 } 395 289 396 290 static inline int rdev_disassoc(struct cfg80211_registered_device *rdev, 397 291 struct net_device *dev, 398 292 struct cfg80211_disassoc_request *req) 399 293 { 400 - return rdev->ops->disassoc(&rdev->wiphy, dev, req); 294 + int ret; 295 + trace_rdev_disassoc(&rdev->wiphy, dev, req); 296 + ret = rdev->ops->disassoc(&rdev->wiphy, dev, req); 297 + trace_rdev_return_int(&rdev->wiphy, ret); 298 + return ret; 401 299 } 402 300 403 301 static inline int rdev_connect(struct cfg80211_registered_device *rdev, 404 302 struct net_device *dev, 405 303 struct cfg80211_connect_params *sme) 406 304 { 407 - return rdev->ops->connect(&rdev->wiphy, dev, sme); 305 + int ret; 306 + trace_rdev_connect(&rdev->wiphy, dev, sme); 307 + ret = rdev->ops->connect(&rdev->wiphy, dev, sme); 308 + trace_rdev_return_int(&rdev->wiphy, ret); 309 + return ret; 408 310 } 409 311 410 312 static inline int rdev_disconnect(struct cfg80211_registered_device *rdev, 411 313 struct net_device *dev, u16 reason_code) 412 314 { 413 - return rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); 315 + int ret; 316 + trace_rdev_disconnect(&rdev->wiphy, dev, reason_code); 317 + ret = rdev->ops->disconnect(&rdev->wiphy, dev, reason_code); 318 + trace_rdev_return_int(&rdev->wiphy, ret); 319 + return ret; 414 320 } 415 321 416 322 static inline int rdev_join_ibss(struct cfg80211_registered_device *rdev, 417 323 struct net_device *dev, 418 324 struct cfg80211_ibss_params *params) 419 325 { 420 - return rdev->ops->join_ibss(&rdev->wiphy, dev, params); 326 + int ret; 327 + trace_rdev_join_ibss(&rdev->wiphy, dev, params); 328 + ret = rdev->ops->join_ibss(&rdev->wiphy, dev, params); 329 + trace_rdev_return_int(&rdev->wiphy, ret); 330 + return ret; 421 331 } 422 332 423 333 static inline int rdev_leave_ibss(struct cfg80211_registered_device *rdev, 424 334 struct net_device *dev) 425 335 { 426 - return rdev->ops->leave_ibss(&rdev->wiphy, dev); 336 + int ret; 337 + trace_rdev_leave_ibss(&rdev->wiphy, dev); 338 + ret = rdev->ops->leave_ibss(&rdev->wiphy, dev); 339 + trace_rdev_return_int(&rdev->wiphy, ret); 340 + return ret; 427 341 } 428 342 429 343 static inline int 430 344 rdev_set_wiphy_params(struct cfg80211_registered_device *rdev, u32 changed) 431 345 { 432 - return rdev->ops->set_wiphy_params(&rdev->wiphy, changed); 346 + int ret; 347 + trace_rdev_set_wiphy_params(&rdev->wiphy, changed); 348 + ret = rdev->ops->set_wiphy_params(&rdev->wiphy, changed); 349 + trace_rdev_return_int(&rdev->wiphy, ret); 350 + return ret; 433 351 } 434 352 435 353 static inline int rdev_set_tx_power(struct cfg80211_registered_device *rdev, 436 354 enum nl80211_tx_power_setting type, int mbm) 437 355 { 438 - return rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); 356 + int ret; 357 + trace_rdev_set_tx_power(&rdev->wiphy, type, mbm); 358 + ret = rdev->ops->set_tx_power(&rdev->wiphy, type, mbm); 359 + trace_rdev_return_int(&rdev->wiphy, ret); 360 + return ret; 439 361 } 440 362 441 363 static inline int rdev_get_tx_power(struct cfg80211_registered_device *rdev, 442 364 int *dbm) 443 365 { 444 - return rdev->ops->get_tx_power(&rdev->wiphy, dbm); 366 + int ret; 367 + trace_rdev_get_tx_power(&rdev->wiphy); 368 + ret = rdev->ops->get_tx_power(&rdev->wiphy, dbm); 369 + trace_rdev_return_int_int(&rdev->wiphy, ret, *dbm); 370 + return ret; 445 371 } 446 372 447 373 static inline int rdev_set_wds_peer(struct cfg80211_registered_device *rdev, 448 374 struct net_device *dev, const u8 *addr) 449 375 { 450 - return rdev->ops->set_wds_peer(&rdev->wiphy, dev, addr); 376 + int ret; 377 + trace_rdev_set_wds_peer(&rdev->wiphy, dev, addr); 378 + ret = rdev->ops->set_wds_peer(&rdev->wiphy, dev, addr); 379 + trace_rdev_return_int(&rdev->wiphy, ret); 380 + return ret; 451 381 } 452 382 453 383 static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev) 454 384 { 385 + trace_rdev_rfkill_poll(&rdev->wiphy); 455 386 rdev->ops->rfkill_poll(&rdev->wiphy); 387 + trace_rdev_return_void(&rdev->wiphy); 456 388 } 457 389 458 390 ··· 517 335 static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev, 518 336 void *data, int len) 519 337 { 520 - return rdev->ops->testmode_cmd(&rdev->wiphy, data, len); 338 + int ret; 339 + trace_rdev_testmode_cmd(&rdev->wiphy); 340 + ret = rdev->ops->testmode_cmd(&rdev->wiphy, data, len); 341 + trace_rdev_return_int(&rdev->wiphy, ret); 342 + return ret; 521 343 } 522 344 523 345 static inline int rdev_testmode_dump(struct cfg80211_registered_device *rdev, ··· 529 343 struct netlink_callback *cb, void *data, 530 344 int len) 531 345 { 532 - return rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, 533 - len); 346 + int ret; 347 + trace_rdev_testmode_dump(&rdev->wiphy); 348 + ret = rdev->ops->testmode_dump(&rdev->wiphy, skb, cb, data, len); 349 + trace_rdev_return_int(&rdev->wiphy, ret); 350 + return ret; 534 351 } 535 352 #endif 536 353 ··· 542 353 struct net_device *dev, const u8 *peer, 543 354 const struct cfg80211_bitrate_mask *mask) 544 355 { 545 - return rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask); 356 + int ret; 357 + trace_rdev_set_bitrate_mask(&rdev->wiphy, dev, peer, mask); 358 + ret = rdev->ops->set_bitrate_mask(&rdev->wiphy, dev, peer, mask); 359 + trace_rdev_return_int(&rdev->wiphy, ret); 360 + return ret; 546 361 } 547 362 548 363 static inline int rdev_dump_survey(struct cfg80211_registered_device *rdev, 549 364 struct net_device *netdev, int idx, 550 365 struct survey_info *info) 551 366 { 552 - return rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); 367 + int ret; 368 + trace_rdev_dump_survey(&rdev->wiphy, netdev, idx); 369 + ret = rdev->ops->dump_survey(&rdev->wiphy, netdev, idx, info); 370 + if (ret < 0) 371 + trace_rdev_return_int(&rdev->wiphy, ret); 372 + else 373 + trace_rdev_return_int_survey_info(&rdev->wiphy, ret, info); 374 + return ret; 553 375 } 554 376 555 377 static inline int rdev_set_pmksa(struct cfg80211_registered_device *rdev, 556 378 struct net_device *netdev, 557 379 struct cfg80211_pmksa *pmksa) 558 380 { 559 - return rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); 381 + int ret; 382 + trace_rdev_set_pmksa(&rdev->wiphy, netdev, pmksa); 383 + ret = rdev->ops->set_pmksa(&rdev->wiphy, netdev, pmksa); 384 + trace_rdev_return_int(&rdev->wiphy, ret); 385 + return ret; 560 386 } 561 387 562 388 static inline int rdev_del_pmksa(struct cfg80211_registered_device *rdev, 563 389 struct net_device *netdev, 564 390 struct cfg80211_pmksa *pmksa) 565 391 { 566 - return rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); 392 + int ret; 393 + trace_rdev_del_pmksa(&rdev->wiphy, netdev, pmksa); 394 + ret = rdev->ops->del_pmksa(&rdev->wiphy, netdev, pmksa); 395 + trace_rdev_return_int(&rdev->wiphy, ret); 396 + return ret; 567 397 } 568 398 569 399 static inline int rdev_flush_pmksa(struct cfg80211_registered_device *rdev, 570 400 struct net_device *netdev) 571 401 { 572 - return rdev->ops->flush_pmksa(&rdev->wiphy, netdev); 402 + int ret; 403 + trace_rdev_flush_pmksa(&rdev->wiphy, netdev); 404 + ret = rdev->ops->flush_pmksa(&rdev->wiphy, netdev); 405 + trace_rdev_return_int(&rdev->wiphy, ret); 406 + return ret; 573 407 } 574 408 575 409 static inline int ··· 602 390 enum nl80211_channel_type channel_type, 603 391 unsigned int duration, u64 *cookie) 604 392 { 605 - return rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, 393 + int ret; 394 + trace_rdev_remain_on_channel(&rdev->wiphy, wdev, chan, channel_type, 395 + duration); 396 + ret = rdev->ops->remain_on_channel(&rdev->wiphy, wdev, chan, 606 397 channel_type, duration, cookie); 398 + trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 399 + return ret; 607 400 } 608 401 609 402 static inline int 610 403 rdev_cancel_remain_on_channel(struct cfg80211_registered_device *rdev, 611 404 struct wireless_dev *wdev, u64 cookie) 612 405 { 613 - return rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); 406 + int ret; 407 + trace_rdev_cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); 408 + ret = rdev->ops->cancel_remain_on_channel(&rdev->wiphy, wdev, cookie); 409 + trace_rdev_return_int(&rdev->wiphy, ret); 410 + return ret; 614 411 } 615 412 616 413 static inline int rdev_mgmt_tx(struct cfg80211_registered_device *rdev, ··· 630 409 const u8 *buf, size_t len, bool no_cck, 631 410 bool dont_wait_for_ack, u64 *cookie) 632 411 { 633 - return rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, 412 + int ret; 413 + trace_rdev_mgmt_tx(&rdev->wiphy, wdev, chan, offchan, channel_type, 414 + channel_type_valid, wait, no_cck, dont_wait_for_ack); 415 + ret = rdev->ops->mgmt_tx(&rdev->wiphy, wdev, chan, offchan, 634 416 channel_type, channel_type_valid, wait, buf, 635 417 len, no_cck, dont_wait_for_ack, cookie); 418 + trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 419 + return ret; 636 420 } 637 421 638 422 static inline int 639 423 rdev_mgmt_tx_cancel_wait(struct cfg80211_registered_device *rdev, 640 424 struct wireless_dev *wdev, u64 cookie) 641 425 { 642 - return rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); 426 + int ret; 427 + trace_rdev_mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); 428 + ret = rdev->ops->mgmt_tx_cancel_wait(&rdev->wiphy, wdev, cookie); 429 + trace_rdev_return_int(&rdev->wiphy, ret); 430 + return ret; 643 431 } 644 432 645 433 static inline int rdev_set_power_mgmt(struct cfg80211_registered_device *rdev, 646 434 struct net_device *dev, bool enabled, 647 435 int timeout) 648 436 { 649 - return rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); 437 + int ret; 438 + trace_rdev_set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); 439 + ret = rdev->ops->set_power_mgmt(&rdev->wiphy, dev, enabled, timeout); 440 + trace_rdev_return_int(&rdev->wiphy, ret); 441 + return ret; 650 442 } 651 443 652 444 static inline int 653 445 rdev_set_cqm_rssi_config(struct cfg80211_registered_device *rdev, 654 446 struct net_device *dev, s32 rssi_thold, u32 rssi_hyst) 655 447 { 656 - return rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, 657 - rssi_hyst); 448 + int ret; 449 + trace_rdev_set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, 450 + rssi_hyst); 451 + ret = rdev->ops->set_cqm_rssi_config(&rdev->wiphy, dev, rssi_thold, 452 + rssi_hyst); 453 + trace_rdev_return_int(&rdev->wiphy, ret); 454 + return ret; 658 455 } 659 456 660 457 static inline int 661 458 rdev_set_cqm_txe_config(struct cfg80211_registered_device *rdev, 662 459 struct net_device *dev, u32 rate, u32 pkts, u32 intvl) 663 460 { 664 - return rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, 461 + int ret; 462 + trace_rdev_set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, intvl); 463 + ret = rdev->ops->set_cqm_txe_config(&rdev->wiphy, dev, rate, pkts, 665 464 intvl); 465 + trace_rdev_return_int(&rdev->wiphy, ret); 466 + return ret; 666 467 } 667 468 668 469 static inline void 669 470 rdev_mgmt_frame_register(struct cfg80211_registered_device *rdev, 670 471 struct wireless_dev *wdev, u16 frame_type, bool reg) 671 472 { 672 - rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, 673 - reg); 473 + trace_rdev_mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); 474 + rdev->ops->mgmt_frame_register(&rdev->wiphy, wdev , frame_type, reg); 475 + trace_rdev_return_void(&rdev->wiphy); 674 476 } 675 477 676 478 static inline int rdev_set_antenna(struct cfg80211_registered_device *rdev, 677 479 u32 tx_ant, u32 rx_ant) 678 480 { 679 - return rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); 481 + int ret; 482 + trace_rdev_set_antenna(&rdev->wiphy, tx_ant, rx_ant); 483 + ret = rdev->ops->set_antenna(&rdev->wiphy, tx_ant, rx_ant); 484 + trace_rdev_return_int(&rdev->wiphy, ret); 485 + return ret; 680 486 } 681 487 682 488 static inline int rdev_get_antenna(struct cfg80211_registered_device *rdev, 683 489 u32 *tx_ant, u32 *rx_ant) 684 490 { 685 - return rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); 491 + int ret; 492 + trace_rdev_get_antenna(&rdev->wiphy); 493 + ret = rdev->ops->get_antenna(&rdev->wiphy, tx_ant, rx_ant); 494 + if (ret) 495 + trace_rdev_return_int(&rdev->wiphy, ret); 496 + else 497 + trace_rdev_return_int_tx_rx(&rdev->wiphy, ret, *tx_ant, 498 + *rx_ant); 499 + return ret; 686 500 } 687 501 688 502 static inline int rdev_set_ringparam(struct cfg80211_registered_device *rdev, 689 503 u32 tx, u32 rx) 690 504 { 691 - return rdev->ops->set_ringparam(&rdev->wiphy, tx, rx); 505 + int ret; 506 + trace_rdev_set_ringparam(&rdev->wiphy, tx, rx); 507 + ret = rdev->ops->set_ringparam(&rdev->wiphy, tx, rx); 508 + trace_rdev_return_int(&rdev->wiphy, ret); 509 + return ret; 692 510 } 693 511 694 512 static inline void rdev_get_ringparam(struct cfg80211_registered_device *rdev, 695 513 u32 *tx, u32 *tx_max, u32 *rx, 696 514 u32 *rx_max) 697 515 { 516 + trace_rdev_get_ringparam(&rdev->wiphy); 698 517 rdev->ops->get_ringparam(&rdev->wiphy, tx, tx_max, rx, rx_max); 518 + trace_rdev_return_void_tx_rx(&rdev->wiphy, *tx, *tx_max, *rx, *rx_max); 699 519 } 700 520 701 521 static inline int ··· 744 482 struct net_device *dev, 745 483 struct cfg80211_sched_scan_request *request) 746 484 { 747 - return rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); 485 + int ret; 486 + trace_rdev_sched_scan_start(&rdev->wiphy, dev, request); 487 + ret = rdev->ops->sched_scan_start(&rdev->wiphy, dev, request); 488 + trace_rdev_return_int(&rdev->wiphy, ret); 489 + return ret; 748 490 } 749 491 750 492 static inline int rdev_sched_scan_stop(struct cfg80211_registered_device *rdev, 751 493 struct net_device *dev) 752 494 { 753 - return rdev->ops->sched_scan_stop(&rdev->wiphy, dev); 495 + int ret; 496 + trace_rdev_sched_scan_stop(&rdev->wiphy, dev); 497 + ret = rdev->ops->sched_scan_stop(&rdev->wiphy, dev); 498 + trace_rdev_return_int(&rdev->wiphy, ret); 499 + return ret; 754 500 } 755 501 756 502 static inline int rdev_set_rekey_data(struct cfg80211_registered_device *rdev, 757 503 struct net_device *dev, 758 504 struct cfg80211_gtk_rekey_data *data) 759 505 { 760 - return rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); 506 + int ret; 507 + trace_rdev_set_rekey_data(&rdev->wiphy, dev); 508 + ret = rdev->ops->set_rekey_data(&rdev->wiphy, dev, data); 509 + trace_rdev_return_int(&rdev->wiphy, ret); 510 + return ret; 761 511 } 762 512 763 513 static inline int rdev_tdls_mgmt(struct cfg80211_registered_device *rdev, ··· 777 503 u8 action_code, u8 dialog_token, 778 504 u16 status_code, const u8 *buf, size_t len) 779 505 { 780 - return rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code, 781 - dialog_token, status_code, buf, len); 506 + int ret; 507 + trace_rdev_tdls_mgmt(&rdev->wiphy, dev, peer, action_code, 508 + dialog_token, status_code, buf, len); 509 + ret = rdev->ops->tdls_mgmt(&rdev->wiphy, dev, peer, action_code, 510 + dialog_token, status_code, buf, len); 511 + trace_rdev_return_int(&rdev->wiphy, ret); 512 + return ret; 782 513 } 783 514 784 515 static inline int rdev_tdls_oper(struct cfg80211_registered_device *rdev, 785 516 struct net_device *dev, u8 *peer, 786 517 enum nl80211_tdls_operation oper) 787 518 { 788 - return rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); 519 + int ret; 520 + trace_rdev_tdls_oper(&rdev->wiphy, dev, peer, oper); 521 + ret = rdev->ops->tdls_oper(&rdev->wiphy, dev, peer, oper); 522 + trace_rdev_return_int(&rdev->wiphy, ret); 523 + return ret; 789 524 } 790 525 791 526 static inline int rdev_probe_client(struct cfg80211_registered_device *rdev, 792 527 struct net_device *dev, const u8 *peer, 793 528 u64 *cookie) 794 529 { 795 - return rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); 530 + int ret; 531 + trace_rdev_probe_client(&rdev->wiphy, dev, peer); 532 + ret = rdev->ops->probe_client(&rdev->wiphy, dev, peer, cookie); 533 + trace_rdev_return_int_cookie(&rdev->wiphy, ret, *cookie); 534 + return ret; 796 535 } 797 536 798 537 static inline int rdev_set_noack_map(struct cfg80211_registered_device *rdev, 799 538 struct net_device *dev, u16 noack_map) 800 539 { 801 - return rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); 540 + int ret; 541 + trace_rdev_set_noack_map(&rdev->wiphy, dev, noack_map); 542 + ret = rdev->ops->set_noack_map(&rdev->wiphy, dev, noack_map); 543 + trace_rdev_return_int(&rdev->wiphy, ret); 544 + return ret; 802 545 } 803 546 804 547 static inline int 805 548 rdev_get_et_sset_count(struct cfg80211_registered_device *rdev, 806 549 struct net_device *dev, int sset) 807 550 { 808 - return rdev->ops->get_et_sset_count(&rdev->wiphy, dev, sset); 551 + int ret; 552 + trace_rdev_get_et_sset_count(&rdev->wiphy, dev, sset); 553 + ret = rdev->ops->get_et_sset_count(&rdev->wiphy, dev, sset); 554 + trace_rdev_return_int(&rdev->wiphy, ret); 555 + return ret; 809 556 } 810 557 811 558 static inline void rdev_get_et_stats(struct cfg80211_registered_device *rdev, 812 559 struct net_device *dev, 813 560 struct ethtool_stats *stats, u64 *data) 814 561 { 562 + trace_rdev_get_et_stats(&rdev->wiphy, dev); 815 563 rdev->ops->get_et_stats(&rdev->wiphy, dev, stats, data); 564 + trace_rdev_return_void(&rdev->wiphy); 816 565 } 817 566 818 567 static inline void rdev_get_et_strings(struct cfg80211_registered_device *rdev, 819 568 struct net_device *dev, u32 sset, 820 569 u8 *data) 821 570 { 571 + trace_rdev_get_et_strings(&rdev->wiphy, dev, sset); 822 572 rdev->ops->get_et_strings(&rdev->wiphy, dev, sset, data); 573 + trace_rdev_return_void(&rdev->wiphy); 823 574 } 824 575 825 576 static inline struct ieee80211_channel 826 577 *rdev_get_channel(struct cfg80211_registered_device *rdev, 827 578 struct wireless_dev *wdev, enum nl80211_channel_type *type) 828 579 { 829 - return rdev->ops->get_channel(&rdev->wiphy, wdev, type); 580 + struct ieee80211_channel *ret; 581 + trace_rdev_get_channel(&rdev->wiphy, wdev); 582 + ret = rdev->ops->get_channel(&rdev->wiphy, wdev, type); 583 + trace_rdev_return_channel(&rdev->wiphy, ret, *type); 584 + return ret; 830 585 } 831 586 832 587 #endif /* __CFG80211_RDEV_OPS */
+7
net/wireless/trace.c
··· 1 + #include <linux/module.h> 2 + 3 + #ifndef __CHECKER__ 4 + #define CREATE_TRACE_POINTS 5 + #include "trace.h" 6 + 7 + #endif
+1750
net/wireless/trace.h
··· 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>