Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 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) |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 29 | #define WDEV_ASSIGN (__entry->id) = (wdev ? wdev->identifier : 0) |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 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 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 263 | DEFINE_EVENT(wiphy_only_evt, rdev_rfkill_poll, |
| 264 | TP_PROTO(struct wiphy *wiphy), |
| 265 | TP_ARGS(wiphy) |
| 266 | ); |
| 267 | |
| 268 | DECLARE_EVENT_CLASS(wiphy_enabled_evt, |
| 269 | TP_PROTO(struct wiphy *wiphy, bool enabled), |
| 270 | TP_ARGS(wiphy, enabled), |
| 271 | TP_STRUCT__entry( |
| 272 | WIPHY_ENTRY |
| 273 | __field(bool, enabled) |
| 274 | ), |
| 275 | TP_fast_assign( |
| 276 | WIPHY_ASSIGN; |
| 277 | __entry->enabled = enabled; |
| 278 | ), |
| 279 | TP_printk(WIPHY_PR_FMT ", %senabled ", |
| 280 | WIPHY_PR_ARG, __entry->enabled ? "" : "not ") |
| 281 | ); |
| 282 | |
| 283 | DEFINE_EVENT(wiphy_enabled_evt, rdev_set_wakeup, |
| 284 | TP_PROTO(struct wiphy *wiphy, bool enabled), |
| 285 | TP_ARGS(wiphy, enabled) |
| 286 | ); |
| 287 | |
| 288 | TRACE_EVENT(rdev_add_virtual_intf, |
| 289 | TP_PROTO(struct wiphy *wiphy, char *name, enum nl80211_iftype type), |
| 290 | TP_ARGS(wiphy, name, type), |
| 291 | TP_STRUCT__entry( |
| 292 | WIPHY_ENTRY |
| 293 | __string(vir_intf_name, name ? name : "<noname>") |
| 294 | __field(enum nl80211_iftype, type) |
| 295 | ), |
| 296 | TP_fast_assign( |
| 297 | WIPHY_ASSIGN; |
| 298 | __assign_str(vir_intf_name, name ? name : "<noname>"); |
| 299 | __entry->type = type; |
| 300 | ), |
| 301 | TP_printk(WIPHY_PR_FMT ", virtual intf name: %s, type: %d", |
| 302 | WIPHY_PR_ARG, __get_str(vir_intf_name), __entry->type) |
| 303 | ); |
| 304 | |
| 305 | DECLARE_EVENT_CLASS(wiphy_wdev_evt, |
| 306 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 307 | TP_ARGS(wiphy, wdev), |
| 308 | TP_STRUCT__entry( |
| 309 | WIPHY_ENTRY |
| 310 | WDEV_ENTRY |
| 311 | ), |
| 312 | TP_fast_assign( |
| 313 | WIPHY_ASSIGN; |
| 314 | WDEV_ASSIGN; |
| 315 | ), |
| 316 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG) |
| 317 | ); |
| 318 | |
| 319 | DEFINE_EVENT(wiphy_wdev_evt, rdev_return_wdev, |
| 320 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 321 | TP_ARGS(wiphy, wdev) |
| 322 | ); |
| 323 | |
| 324 | DEFINE_EVENT(wiphy_wdev_evt, rdev_del_virtual_intf, |
| 325 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 326 | TP_ARGS(wiphy, wdev) |
| 327 | ); |
| 328 | |
| 329 | TRACE_EVENT(rdev_change_virtual_intf, |
| 330 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 331 | enum nl80211_iftype type), |
| 332 | TP_ARGS(wiphy, netdev, type), |
| 333 | TP_STRUCT__entry( |
| 334 | WIPHY_ENTRY |
| 335 | NETDEV_ENTRY |
| 336 | __field(enum nl80211_iftype, type) |
| 337 | ), |
| 338 | TP_fast_assign( |
| 339 | WIPHY_ASSIGN; |
| 340 | NETDEV_ASSIGN; |
| 341 | __entry->type = type; |
| 342 | ), |
| 343 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", type: %d", |
| 344 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->type) |
| 345 | ); |
| 346 | |
| 347 | DECLARE_EVENT_CLASS(key_handle, |
| 348 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, |
| 349 | bool pairwise, const u8 *mac_addr), |
| 350 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr), |
| 351 | TP_STRUCT__entry( |
| 352 | WIPHY_ENTRY |
| 353 | NETDEV_ENTRY |
| 354 | MAC_ENTRY(mac_addr) |
| 355 | __field(u8, key_index) |
| 356 | __field(bool, pairwise) |
| 357 | ), |
| 358 | TP_fast_assign( |
| 359 | WIPHY_ASSIGN; |
| 360 | NETDEV_ASSIGN; |
| 361 | MAC_ASSIGN(mac_addr, mac_addr); |
| 362 | __entry->key_index = key_index; |
| 363 | __entry->pairwise = pairwise; |
| 364 | ), |
| 365 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key_index: %u, pairwise: %s, mac addr: " MAC_PR_FMT, |
| 366 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, |
| 367 | BOOL_TO_STR(__entry->pairwise), MAC_PR_ARG(mac_addr)) |
| 368 | ); |
| 369 | |
| 370 | DEFINE_EVENT(key_handle, rdev_add_key, |
| 371 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, |
| 372 | bool pairwise, const u8 *mac_addr), |
| 373 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) |
| 374 | ); |
| 375 | |
| 376 | DEFINE_EVENT(key_handle, rdev_get_key, |
| 377 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, |
| 378 | bool pairwise, const u8 *mac_addr), |
| 379 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) |
| 380 | ); |
| 381 | |
| 382 | DEFINE_EVENT(key_handle, rdev_del_key, |
| 383 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, |
| 384 | bool pairwise, const u8 *mac_addr), |
| 385 | TP_ARGS(wiphy, netdev, key_index, pairwise, mac_addr) |
| 386 | ); |
| 387 | |
| 388 | TRACE_EVENT(rdev_set_default_key, |
| 389 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index, |
| 390 | bool unicast, bool multicast), |
| 391 | TP_ARGS(wiphy, netdev, key_index, unicast, multicast), |
| 392 | TP_STRUCT__entry( |
| 393 | WIPHY_ENTRY |
| 394 | NETDEV_ENTRY |
| 395 | __field(u8, key_index) |
| 396 | __field(bool, unicast) |
| 397 | __field(bool, multicast) |
| 398 | ), |
| 399 | TP_fast_assign( |
| 400 | WIPHY_ASSIGN; |
| 401 | NETDEV_ASSIGN; |
| 402 | __entry->key_index = key_index; |
| 403 | __entry->unicast = unicast; |
| 404 | __entry->multicast = multicast; |
| 405 | ), |
| 406 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u, unicast: %s, multicast: %s", |
| 407 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index, |
| 408 | BOOL_TO_STR(__entry->unicast), |
| 409 | BOOL_TO_STR(__entry->multicast)) |
| 410 | ); |
| 411 | |
| 412 | TRACE_EVENT(rdev_set_default_mgmt_key, |
| 413 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 key_index), |
| 414 | TP_ARGS(wiphy, netdev, key_index), |
| 415 | TP_STRUCT__entry( |
| 416 | WIPHY_ENTRY |
| 417 | NETDEV_ENTRY |
| 418 | __field(u8, key_index) |
| 419 | ), |
| 420 | TP_fast_assign( |
| 421 | WIPHY_ASSIGN; |
| 422 | NETDEV_ASSIGN; |
| 423 | __entry->key_index = key_index; |
| 424 | ), |
| 425 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", key index: %u", |
| 426 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->key_index) |
| 427 | ); |
| 428 | |
| 429 | TRACE_EVENT(rdev_start_ap, |
| 430 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 431 | struct cfg80211_ap_settings *settings), |
| 432 | TP_ARGS(wiphy, netdev, settings), |
| 433 | TP_STRUCT__entry( |
| 434 | WIPHY_ENTRY |
| 435 | NETDEV_ENTRY |
| 436 | CHAN_ENTRY |
| 437 | __field(int, beacon_interval) |
| 438 | __field(int, dtim_period) |
| 439 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) |
| 440 | __field(enum nl80211_hidden_ssid, hidden_ssid) |
| 441 | __field(u32, wpa_ver) |
| 442 | __field(bool, privacy) |
| 443 | __field(enum nl80211_auth_type, auth_type) |
| 444 | __field(int, inactivity_timeout) |
| 445 | ), |
| 446 | TP_fast_assign( |
| 447 | WIPHY_ASSIGN; |
| 448 | NETDEV_ASSIGN; |
| 449 | CHAN_ASSIGN(settings->channel); |
| 450 | __entry->beacon_interval = settings->beacon_interval; |
| 451 | __entry->dtim_period = settings->dtim_period; |
| 452 | __entry->hidden_ssid = settings->hidden_ssid; |
| 453 | __entry->wpa_ver = settings->crypto.wpa_versions; |
| 454 | __entry->privacy = settings->privacy; |
| 455 | __entry->auth_type = settings->auth_type; |
| 456 | __entry->inactivity_timeout = settings->inactivity_timeout; |
| 457 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); |
| 458 | memcpy(__entry->ssid, settings->ssid, settings->ssid_len); |
| 459 | ), |
| 460 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", AP settings - ssid: %s, " |
| 461 | CHAN_PR_FMT ", beacon interval: %d, dtim period: %d, " |
| 462 | "hidden ssid: %d, wpa versions: %u, privacy: %s, " |
| 463 | "auth type: %d, inactivity timeout: %d", |
| 464 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ssid, CHAN_PR_ARG, |
| 465 | __entry->beacon_interval, __entry->dtim_period, |
| 466 | __entry->hidden_ssid, __entry->wpa_ver, |
| 467 | BOOL_TO_STR(__entry->privacy), __entry->auth_type, |
| 468 | __entry->inactivity_timeout) |
| 469 | ); |
| 470 | |
| 471 | TRACE_EVENT(rdev_change_beacon, |
| 472 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 473 | struct cfg80211_beacon_data *info), |
| 474 | TP_ARGS(wiphy, netdev, info), |
| 475 | TP_STRUCT__entry( |
| 476 | WIPHY_ENTRY |
| 477 | NETDEV_ENTRY |
| 478 | __dynamic_array(u8, head, info ? info->head_len : 0) |
| 479 | __dynamic_array(u8, tail, info ? info->tail_len : 0) |
| 480 | __dynamic_array(u8, beacon_ies, info ? info->beacon_ies_len : 0) |
| 481 | __dynamic_array(u8, proberesp_ies, |
| 482 | info ? info->proberesp_ies_len : 0) |
| 483 | __dynamic_array(u8, assocresp_ies, |
| 484 | info ? info->assocresp_ies_len : 0) |
| 485 | __dynamic_array(u8, probe_resp, info ? info->probe_resp_len : 0) |
| 486 | ), |
| 487 | TP_fast_assign( |
| 488 | WIPHY_ASSIGN; |
| 489 | NETDEV_ASSIGN; |
| 490 | if (info) { |
| 491 | if (info->head) |
| 492 | memcpy(__get_dynamic_array(head), info->head, |
| 493 | info->head_len); |
| 494 | if (info->tail) |
| 495 | memcpy(__get_dynamic_array(tail), info->tail, |
| 496 | info->tail_len); |
| 497 | if (info->beacon_ies) |
| 498 | memcpy(__get_dynamic_array(beacon_ies), |
| 499 | info->beacon_ies, info->beacon_ies_len); |
| 500 | if (info->proberesp_ies) |
| 501 | memcpy(__get_dynamic_array(proberesp_ies), |
| 502 | info->proberesp_ies, |
| 503 | info->proberesp_ies_len); |
| 504 | if (info->assocresp_ies) |
| 505 | memcpy(__get_dynamic_array(assocresp_ies), |
| 506 | info->assocresp_ies, |
| 507 | info->assocresp_ies_len); |
| 508 | if (info->probe_resp) |
| 509 | memcpy(__get_dynamic_array(probe_resp), |
| 510 | info->probe_resp, info->probe_resp_len); |
| 511 | } |
| 512 | ), |
| 513 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) |
| 514 | ); |
| 515 | |
| 516 | DECLARE_EVENT_CLASS(wiphy_netdev_evt, |
| 517 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 518 | TP_ARGS(wiphy, netdev), |
| 519 | TP_STRUCT__entry( |
| 520 | WIPHY_ENTRY |
| 521 | NETDEV_ENTRY |
| 522 | ), |
| 523 | TP_fast_assign( |
| 524 | WIPHY_ASSIGN; |
| 525 | NETDEV_ASSIGN; |
| 526 | ), |
| 527 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, WIPHY_PR_ARG, NETDEV_PR_ARG) |
| 528 | ); |
| 529 | |
| 530 | DEFINE_EVENT(wiphy_netdev_evt, rdev_stop_ap, |
| 531 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 532 | TP_ARGS(wiphy, netdev) |
| 533 | ); |
| 534 | |
| 535 | DEFINE_EVENT(wiphy_netdev_evt, rdev_get_et_stats, |
| 536 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 537 | TP_ARGS(wiphy, netdev) |
| 538 | ); |
| 539 | |
| 540 | DEFINE_EVENT(wiphy_netdev_evt, rdev_sched_scan_stop, |
| 541 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 542 | TP_ARGS(wiphy, netdev) |
| 543 | ); |
| 544 | |
| 545 | DEFINE_EVENT(wiphy_netdev_evt, rdev_set_rekey_data, |
| 546 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 547 | TP_ARGS(wiphy, netdev) |
| 548 | ); |
| 549 | |
| 550 | DEFINE_EVENT(wiphy_netdev_evt, rdev_get_mesh_config, |
| 551 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 552 | TP_ARGS(wiphy, netdev) |
| 553 | ); |
| 554 | |
| 555 | DEFINE_EVENT(wiphy_netdev_evt, rdev_leave_mesh, |
| 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_ibss, |
| 561 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 562 | TP_ARGS(wiphy, netdev) |
| 563 | ); |
| 564 | |
| 565 | DEFINE_EVENT(wiphy_netdev_evt, rdev_flush_pmksa, |
| 566 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev), |
| 567 | TP_ARGS(wiphy, netdev) |
| 568 | ); |
| 569 | |
| 570 | DECLARE_EVENT_CLASS(station_add_change, |
| 571 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, |
| 572 | struct station_parameters *params), |
| 573 | TP_ARGS(wiphy, netdev, mac, params), |
| 574 | TP_STRUCT__entry( |
| 575 | WIPHY_ENTRY |
| 576 | NETDEV_ENTRY |
| 577 | MAC_ENTRY(sta_mac) |
| 578 | __field(u32, sta_flags_mask) |
| 579 | __field(u32, sta_flags_set) |
| 580 | __field(u32, sta_modify_mask) |
| 581 | __field(int, listen_interval) |
| 582 | __field(u16, aid) |
| 583 | __field(u8, plink_action) |
| 584 | __field(u8, plink_state) |
| 585 | __field(u8, uapsd_queues) |
| 586 | __array(u8, ht_capa, (int)sizeof(struct ieee80211_ht_cap)) |
| 587 | ), |
| 588 | TP_fast_assign( |
| 589 | WIPHY_ASSIGN; |
| 590 | NETDEV_ASSIGN; |
| 591 | MAC_ASSIGN(sta_mac, mac); |
| 592 | __entry->sta_flags_mask = params->sta_flags_mask; |
| 593 | __entry->sta_flags_set = params->sta_flags_set; |
| 594 | __entry->sta_modify_mask = params->sta_modify_mask; |
| 595 | __entry->listen_interval = params->listen_interval; |
| 596 | __entry->aid = params->aid; |
| 597 | __entry->plink_action = params->plink_action; |
| 598 | __entry->plink_state = params->plink_state; |
| 599 | __entry->uapsd_queues = params->uapsd_queues; |
| 600 | memset(__entry->ht_capa, 0, sizeof(struct ieee80211_ht_cap)); |
| 601 | if (params->ht_capa) |
| 602 | memcpy(__entry->ht_capa, params->ht_capa, |
| 603 | sizeof(struct ieee80211_ht_cap)); |
| 604 | ), |
| 605 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT |
| 606 | ", station flags mask: %u, station flags set: %u, " |
| 607 | "station modify mask: %u, listen interval: %d, aid: %u, " |
| 608 | "plink action: %u, plink state: %u, uapsd queues: %u", |
| 609 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), |
| 610 | __entry->sta_flags_mask, __entry->sta_flags_set, |
| 611 | __entry->sta_modify_mask, __entry->listen_interval, |
| 612 | __entry->aid, __entry->plink_action, __entry->plink_state, |
| 613 | __entry->uapsd_queues) |
| 614 | ); |
| 615 | |
| 616 | DEFINE_EVENT(station_add_change, rdev_add_station, |
| 617 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, |
| 618 | struct station_parameters *params), |
| 619 | TP_ARGS(wiphy, netdev, mac, params) |
| 620 | ); |
| 621 | |
| 622 | DEFINE_EVENT(station_add_change, rdev_change_station, |
| 623 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *mac, |
| 624 | struct station_parameters *params), |
| 625 | TP_ARGS(wiphy, netdev, mac, params) |
| 626 | ); |
| 627 | |
| 628 | DECLARE_EVENT_CLASS(wiphy_netdev_mac_evt, |
| 629 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), |
| 630 | TP_ARGS(wiphy, netdev, mac), |
| 631 | TP_STRUCT__entry( |
| 632 | WIPHY_ENTRY |
| 633 | NETDEV_ENTRY |
| 634 | MAC_ENTRY(sta_mac) |
| 635 | ), |
| 636 | TP_fast_assign( |
| 637 | WIPHY_ASSIGN; |
| 638 | NETDEV_ASSIGN; |
| 639 | MAC_ASSIGN(sta_mac, mac); |
| 640 | ), |
| 641 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mac: " MAC_PR_FMT, |
| 642 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac)) |
| 643 | ); |
| 644 | |
| 645 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_del_station, |
| 646 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), |
| 647 | TP_ARGS(wiphy, netdev, mac) |
| 648 | ); |
| 649 | |
| 650 | DEFINE_EVENT(wiphy_netdev_mac_evt, rdev_get_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_del_mpath, |
| 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_set_wds_peer, |
| 661 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *mac), |
| 662 | TP_ARGS(wiphy, netdev, mac) |
| 663 | ); |
| 664 | |
| 665 | TRACE_EVENT(rdev_dump_station, |
| 666 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, |
| 667 | u8 *mac), |
| 668 | TP_ARGS(wiphy, netdev, idx, mac), |
| 669 | TP_STRUCT__entry( |
| 670 | WIPHY_ENTRY |
| 671 | NETDEV_ENTRY |
| 672 | MAC_ENTRY(sta_mac) |
| 673 | __field(int, idx) |
| 674 | ), |
| 675 | TP_fast_assign( |
| 676 | WIPHY_ASSIGN; |
| 677 | NETDEV_ASSIGN; |
| 678 | MAC_ASSIGN(sta_mac, mac); |
| 679 | __entry->idx = idx; |
| 680 | ), |
| 681 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", station mac: " MAC_PR_FMT ", idx: %d", |
| 682 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(sta_mac), |
| 683 | __entry->idx) |
| 684 | ); |
| 685 | |
| 686 | TRACE_EVENT(rdev_return_int_station_info, |
| 687 | TP_PROTO(struct wiphy *wiphy, int ret, struct station_info *sinfo), |
| 688 | TP_ARGS(wiphy, ret, sinfo), |
| 689 | TP_STRUCT__entry( |
| 690 | WIPHY_ENTRY |
| 691 | __field(int, ret) |
| 692 | SINFO_ENTRY |
| 693 | ), |
| 694 | TP_fast_assign( |
| 695 | WIPHY_ASSIGN; |
| 696 | __entry->ret = ret; |
| 697 | SINFO_ASSIGN; |
| 698 | ), |
| 699 | TP_printk(WIPHY_PR_FMT ", returned %d" , |
| 700 | WIPHY_PR_ARG, __entry->ret) |
| 701 | ); |
| 702 | |
| 703 | DECLARE_EVENT_CLASS(mpath_evt, |
| 704 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, |
| 705 | u8 *next_hop), |
| 706 | TP_ARGS(wiphy, netdev, dst, next_hop), |
| 707 | TP_STRUCT__entry( |
| 708 | WIPHY_ENTRY |
| 709 | NETDEV_ENTRY |
| 710 | MAC_ENTRY(dst) |
| 711 | MAC_ENTRY(next_hop) |
| 712 | ), |
| 713 | TP_fast_assign( |
| 714 | WIPHY_ASSIGN; |
| 715 | NETDEV_ASSIGN; |
| 716 | MAC_ASSIGN(dst, dst); |
| 717 | MAC_ASSIGN(next_hop, next_hop); |
| 718 | ), |
| 719 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", destination: " MAC_PR_FMT ", next hop: " MAC_PR_FMT, |
| 720 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(dst), |
| 721 | MAC_PR_ARG(next_hop)) |
| 722 | ); |
| 723 | |
| 724 | DEFINE_EVENT(mpath_evt, rdev_add_mpath, |
| 725 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, |
| 726 | u8 *next_hop), |
| 727 | TP_ARGS(wiphy, netdev, dst, next_hop) |
| 728 | ); |
| 729 | |
| 730 | DEFINE_EVENT(mpath_evt, rdev_change_mpath, |
| 731 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, |
| 732 | u8 *next_hop), |
| 733 | TP_ARGS(wiphy, netdev, dst, next_hop) |
| 734 | ); |
| 735 | |
| 736 | DEFINE_EVENT(mpath_evt, rdev_get_mpath, |
| 737 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u8 *dst, |
| 738 | u8 *next_hop), |
| 739 | TP_ARGS(wiphy, netdev, dst, next_hop) |
| 740 | ); |
| 741 | |
| 742 | TRACE_EVENT(rdev_dump_mpath, |
| 743 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx, |
| 744 | u8 *dst, u8 *next_hop), |
| 745 | TP_ARGS(wiphy, netdev, idx, dst, next_hop), |
| 746 | TP_STRUCT__entry( |
| 747 | WIPHY_ENTRY |
| 748 | NETDEV_ENTRY |
| 749 | MAC_ENTRY(dst) |
| 750 | MAC_ENTRY(next_hop) |
| 751 | __field(int, idx) |
| 752 | ), |
| 753 | TP_fast_assign( |
| 754 | WIPHY_ASSIGN; |
| 755 | NETDEV_ASSIGN; |
| 756 | MAC_ASSIGN(dst, dst); |
| 757 | MAC_ASSIGN(next_hop, next_hop); |
| 758 | __entry->idx = idx; |
| 759 | ), |
| 760 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d, destination: " |
| 761 | MAC_PR_FMT ", next hop: " MAC_PR_FMT, |
| 762 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx, MAC_PR_ARG(dst), |
| 763 | MAC_PR_ARG(next_hop)) |
| 764 | ); |
| 765 | |
| 766 | TRACE_EVENT(rdev_return_int_mpath_info, |
| 767 | TP_PROTO(struct wiphy *wiphy, int ret, struct mpath_info *pinfo), |
| 768 | TP_ARGS(wiphy, ret, pinfo), |
| 769 | TP_STRUCT__entry( |
| 770 | WIPHY_ENTRY |
| 771 | __field(int, ret) |
| 772 | __field(int, generation) |
| 773 | __field(u32, filled) |
| 774 | __field(u32, frame_qlen) |
| 775 | __field(u32, sn) |
| 776 | __field(u32, metric) |
| 777 | __field(u32, exptime) |
| 778 | __field(u32, discovery_timeout) |
| 779 | __field(u8, discovery_retries) |
| 780 | __field(u8, flags) |
| 781 | ), |
| 782 | TP_fast_assign( |
| 783 | WIPHY_ASSIGN; |
| 784 | __entry->ret = ret; |
| 785 | __entry->generation = pinfo->generation; |
| 786 | __entry->filled = pinfo->filled; |
| 787 | __entry->frame_qlen = pinfo->frame_qlen; |
| 788 | __entry->sn = pinfo->sn; |
| 789 | __entry->metric = pinfo->metric; |
| 790 | __entry->exptime = pinfo->exptime; |
| 791 | __entry->discovery_timeout = pinfo->discovery_timeout; |
| 792 | __entry->discovery_retries = pinfo->discovery_retries; |
| 793 | __entry->flags = pinfo->flags; |
| 794 | ), |
| 795 | TP_printk(WIPHY_PR_FMT ", returned %d. mpath info - generation: %d, " |
| 796 | "filled: %u, frame qlen: %u, sn: %u, metric: %u, exptime: %u," |
| 797 | " discovery timeout: %u, discovery retries: %u, flags: %u", |
| 798 | WIPHY_PR_ARG, __entry->ret, __entry->generation, |
| 799 | __entry->filled, __entry->frame_qlen, __entry->sn, |
| 800 | __entry->metric, __entry->exptime, __entry->discovery_timeout, |
| 801 | __entry->discovery_retries, __entry->flags) |
| 802 | ); |
| 803 | |
| 804 | TRACE_EVENT(rdev_return_int_mesh_config, |
| 805 | TP_PROTO(struct wiphy *wiphy, int ret, struct mesh_config *conf), |
| 806 | TP_ARGS(wiphy, ret, conf), |
| 807 | TP_STRUCT__entry( |
| 808 | WIPHY_ENTRY |
| 809 | MESH_CFG_ENTRY |
| 810 | __field(int, ret) |
| 811 | ), |
| 812 | TP_fast_assign( |
| 813 | WIPHY_ASSIGN; |
| 814 | MESH_CFG_ASSIGN; |
| 815 | __entry->ret = ret; |
| 816 | ), |
| 817 | TP_printk(WIPHY_PR_FMT ", returned: %d", |
| 818 | WIPHY_PR_ARG, __entry->ret) |
| 819 | ); |
| 820 | |
| 821 | TRACE_EVENT(rdev_update_mesh_config, |
| 822 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 mask, |
| 823 | const struct mesh_config *conf), |
| 824 | TP_ARGS(wiphy, netdev, mask, conf), |
| 825 | TP_STRUCT__entry( |
| 826 | WIPHY_ENTRY |
| 827 | NETDEV_ENTRY |
| 828 | MESH_CFG_ENTRY |
| 829 | __field(u32, mask) |
| 830 | ), |
| 831 | TP_fast_assign( |
| 832 | WIPHY_ASSIGN; |
| 833 | NETDEV_ASSIGN; |
| 834 | MESH_CFG_ASSIGN; |
| 835 | __entry->mask = mask; |
| 836 | ), |
| 837 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", mask: %u", |
| 838 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->mask) |
| 839 | ); |
| 840 | |
| 841 | TRACE_EVENT(rdev_join_mesh, |
| 842 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 843 | const struct mesh_config *conf, |
| 844 | const struct mesh_setup *setup), |
| 845 | TP_ARGS(wiphy, netdev, conf, setup), |
| 846 | TP_STRUCT__entry( |
| 847 | WIPHY_ENTRY |
| 848 | NETDEV_ENTRY |
| 849 | MESH_CFG_ENTRY |
| 850 | ), |
| 851 | TP_fast_assign( |
| 852 | WIPHY_ASSIGN; |
| 853 | NETDEV_ASSIGN; |
| 854 | MESH_CFG_ASSIGN; |
| 855 | ), |
| 856 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, |
| 857 | WIPHY_PR_ARG, NETDEV_PR_ARG) |
| 858 | ); |
| 859 | |
| 860 | TRACE_EVENT(rdev_change_bss, |
| 861 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 862 | struct bss_parameters *params), |
| 863 | TP_ARGS(wiphy, netdev, params), |
| 864 | TP_STRUCT__entry( |
| 865 | WIPHY_ENTRY |
| 866 | NETDEV_ENTRY |
| 867 | __field(int, use_cts_prot) |
| 868 | __field(int, use_short_preamble) |
| 869 | __field(int, use_short_slot_time) |
| 870 | __field(int, ap_isolate) |
| 871 | __field(int, ht_opmode) |
| 872 | ), |
| 873 | TP_fast_assign( |
| 874 | WIPHY_ASSIGN; |
| 875 | NETDEV_ASSIGN; |
| 876 | __entry->use_cts_prot = params->use_cts_prot; |
| 877 | __entry->use_short_preamble = params->use_short_preamble; |
| 878 | __entry->use_short_slot_time = params->use_short_slot_time; |
| 879 | __entry->ap_isolate = params->ap_isolate; |
| 880 | __entry->ht_opmode = params->ht_opmode; |
| 881 | ), |
| 882 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", use cts prot: %d, " |
| 883 | "use short preamble: %d, use short slot time: %d, " |
| 884 | "ap isolate: %d, ht opmode: %d", |
| 885 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->use_cts_prot, |
| 886 | __entry->use_short_preamble, __entry->use_short_slot_time, |
| 887 | __entry->ap_isolate, __entry->ht_opmode) |
| 888 | ); |
| 889 | |
| 890 | TRACE_EVENT(rdev_set_txq_params, |
| 891 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 892 | struct ieee80211_txq_params *params), |
| 893 | TP_ARGS(wiphy, netdev, params), |
| 894 | TP_STRUCT__entry( |
| 895 | WIPHY_ENTRY |
| 896 | NETDEV_ENTRY |
| 897 | __field(enum nl80211_ac, ac) |
| 898 | __field(u16, txop) |
| 899 | __field(u16, cwmin) |
| 900 | __field(u16, cwmax) |
| 901 | __field(u8, aifs) |
| 902 | ), |
| 903 | TP_fast_assign( |
| 904 | WIPHY_ASSIGN; |
| 905 | NETDEV_ASSIGN; |
| 906 | __entry->ac = params->ac; |
| 907 | __entry->txop = params->txop; |
| 908 | __entry->cwmin = params->cwmin; |
| 909 | __entry->cwmax = params->cwmax; |
| 910 | __entry->aifs = params->aifs; |
| 911 | ), |
| 912 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", ac: %d, txop: %u, cwmin: %u, cwmax: %u, aifs: %u", |
| 913 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->ac, __entry->txop, |
| 914 | __entry->cwmin, __entry->cwmax, __entry->aifs) |
| 915 | ); |
| 916 | |
| 917 | TRACE_EVENT(rdev_libertas_set_mesh_channel, |
| 918 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 919 | struct ieee80211_channel *chan), |
| 920 | TP_ARGS(wiphy, netdev, chan), |
| 921 | TP_STRUCT__entry( |
| 922 | WIPHY_ENTRY |
| 923 | NETDEV_ENTRY |
| 924 | CHAN_ENTRY |
| 925 | ), |
| 926 | TP_fast_assign( |
| 927 | WIPHY_ASSIGN; |
| 928 | NETDEV_ASSIGN; |
| 929 | CHAN_ASSIGN(chan); |
| 930 | ), |
| 931 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT CHAN_PR_FMT, WIPHY_PR_ARG, |
| 932 | NETDEV_PR_ARG, CHAN_PR_ARG) |
| 933 | ); |
| 934 | |
| 935 | TRACE_EVENT(rdev_set_monitor_channel, |
| 936 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan, |
| 937 | enum nl80211_channel_type chan_type), |
| 938 | TP_ARGS(wiphy, chan, chan_type), |
| 939 | TP_STRUCT__entry( |
| 940 | WIPHY_ENTRY |
| 941 | CHAN_ENTRY |
| 942 | __field(enum nl80211_channel_type, chan_type) |
| 943 | ), |
| 944 | TP_fast_assign( |
| 945 | WIPHY_ASSIGN; |
| 946 | CHAN_ASSIGN(chan); |
| 947 | __entry->chan_type = chan_type; |
| 948 | ), |
| 949 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type : %d", |
| 950 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->chan_type) |
| 951 | ); |
| 952 | |
| 953 | TRACE_EVENT(rdev_auth, |
| 954 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 955 | struct cfg80211_auth_request *req), |
| 956 | TP_ARGS(wiphy, netdev, req), |
| 957 | TP_STRUCT__entry( |
| 958 | WIPHY_ENTRY |
| 959 | NETDEV_ENTRY |
| 960 | MAC_ENTRY(bssid) |
| 961 | __field(enum nl80211_auth_type, auth_type) |
| 962 | ), |
| 963 | TP_fast_assign( |
| 964 | WIPHY_ASSIGN; |
| 965 | NETDEV_ASSIGN; |
| 966 | if (req->bss) |
| 967 | MAC_ASSIGN(bssid, req->bss->bssid); |
| 968 | else |
| 969 | memset(__entry->bssid, 0, ETH_ALEN); |
| 970 | __entry->auth_type = req->auth_type; |
| 971 | ), |
| 972 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", auth type: %d, bssid: " MAC_PR_FMT, |
| 973 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->auth_type, |
| 974 | MAC_PR_ARG(bssid)) |
| 975 | ); |
| 976 | |
| 977 | TRACE_EVENT(rdev_assoc, |
| 978 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 979 | struct cfg80211_assoc_request *req), |
| 980 | TP_ARGS(wiphy, netdev, req), |
| 981 | TP_STRUCT__entry( |
| 982 | WIPHY_ENTRY |
| 983 | NETDEV_ENTRY |
| 984 | MAC_ENTRY(bssid) |
| 985 | MAC_ENTRY(prev_bssid) |
| 986 | __field(bool, use_mfp) |
| 987 | __field(u32, flags) |
| 988 | ), |
| 989 | TP_fast_assign( |
| 990 | WIPHY_ASSIGN; |
| 991 | NETDEV_ASSIGN; |
| 992 | if (req->bss) |
| 993 | MAC_ASSIGN(bssid, req->bss->bssid); |
| 994 | else |
| 995 | memset(__entry->bssid, 0, ETH_ALEN); |
| 996 | MAC_ASSIGN(prev_bssid, req->prev_bssid); |
| 997 | __entry->use_mfp = req->use_mfp; |
| 998 | __entry->flags = req->flags; |
| 999 | ), |
| 1000 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT |
| 1001 | ", previous bssid: " MAC_PR_FMT ", use mfp: %s, flags: %u", |
| 1002 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), |
| 1003 | MAC_PR_ARG(prev_bssid), BOOL_TO_STR(__entry->use_mfp), |
| 1004 | __entry->flags) |
| 1005 | ); |
| 1006 | |
| 1007 | TRACE_EVENT(rdev_deauth, |
| 1008 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1009 | struct cfg80211_deauth_request *req), |
| 1010 | TP_ARGS(wiphy, netdev, req), |
| 1011 | TP_STRUCT__entry( |
| 1012 | WIPHY_ENTRY |
| 1013 | NETDEV_ENTRY |
| 1014 | MAC_ENTRY(bssid) |
| 1015 | __field(u16, reason_code) |
| 1016 | ), |
| 1017 | TP_fast_assign( |
| 1018 | WIPHY_ASSIGN; |
| 1019 | NETDEV_ASSIGN; |
| 1020 | MAC_ASSIGN(bssid, req->bssid); |
| 1021 | __entry->reason_code = req->reason_code; |
| 1022 | ), |
| 1023 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", reason: %u", |
| 1024 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), |
| 1025 | __entry->reason_code) |
| 1026 | ); |
| 1027 | |
| 1028 | TRACE_EVENT(rdev_disassoc, |
| 1029 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1030 | struct cfg80211_disassoc_request *req), |
| 1031 | TP_ARGS(wiphy, netdev, req), |
| 1032 | TP_STRUCT__entry( |
| 1033 | WIPHY_ENTRY |
| 1034 | NETDEV_ENTRY |
| 1035 | MAC_ENTRY(bssid) |
| 1036 | __field(u16, reason_code) |
| 1037 | __field(bool, local_state_change) |
| 1038 | ), |
| 1039 | TP_fast_assign( |
| 1040 | WIPHY_ASSIGN; |
| 1041 | NETDEV_ASSIGN; |
| 1042 | if (req->bss) |
| 1043 | MAC_ASSIGN(bssid, req->bss->bssid); |
| 1044 | else |
| 1045 | memset(__entry->bssid, 0, ETH_ALEN); |
| 1046 | __entry->reason_code = req->reason_code; |
| 1047 | __entry->local_state_change = req->local_state_change; |
| 1048 | ), |
| 1049 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT |
| 1050 | ", reason: %u, local state change: %s", |
| 1051 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), |
| 1052 | __entry->reason_code, |
| 1053 | BOOL_TO_STR(__entry->local_state_change)) |
| 1054 | ); |
| 1055 | |
| 1056 | TRACE_EVENT(rdev_mgmt_tx_cancel_wait, |
| 1057 | TP_PROTO(struct wiphy *wiphy, |
| 1058 | struct wireless_dev *wdev, u64 cookie), |
| 1059 | TP_ARGS(wiphy, wdev, cookie), |
| 1060 | TP_STRUCT__entry( |
| 1061 | WIPHY_ENTRY |
| 1062 | WDEV_ENTRY |
| 1063 | __field(u64, cookie) |
| 1064 | ), |
| 1065 | TP_fast_assign( |
| 1066 | WIPHY_ASSIGN; |
| 1067 | WDEV_ASSIGN; |
| 1068 | __entry->cookie = cookie; |
| 1069 | ), |
| 1070 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu ", |
| 1071 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) |
| 1072 | ); |
| 1073 | |
| 1074 | TRACE_EVENT(rdev_set_power_mgmt, |
| 1075 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1076 | bool enabled, int timeout), |
| 1077 | TP_ARGS(wiphy, netdev, enabled, timeout), |
| 1078 | TP_STRUCT__entry( |
| 1079 | WIPHY_ENTRY |
| 1080 | NETDEV_ENTRY |
| 1081 | __field(bool, enabled) |
| 1082 | __field(int, timeout) |
| 1083 | ), |
| 1084 | TP_fast_assign( |
| 1085 | WIPHY_ASSIGN; |
| 1086 | NETDEV_ASSIGN; |
| 1087 | __entry->enabled = enabled; |
| 1088 | __entry->timeout = timeout; |
| 1089 | ), |
| 1090 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", %senabled, timeout: %d ", |
| 1091 | WIPHY_PR_ARG, NETDEV_PR_ARG, |
| 1092 | __entry->enabled ? "" : "not ", __entry->timeout) |
| 1093 | ); |
| 1094 | |
| 1095 | TRACE_EVENT(rdev_connect, |
| 1096 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1097 | struct cfg80211_connect_params *sme), |
| 1098 | TP_ARGS(wiphy, netdev, sme), |
| 1099 | TP_STRUCT__entry( |
| 1100 | WIPHY_ENTRY |
| 1101 | NETDEV_ENTRY |
| 1102 | MAC_ENTRY(bssid) |
| 1103 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) |
| 1104 | __field(enum nl80211_auth_type, auth_type) |
| 1105 | __field(bool, privacy) |
| 1106 | __field(u32, wpa_versions) |
| 1107 | __field(u32, flags) |
| 1108 | ), |
| 1109 | TP_fast_assign( |
| 1110 | WIPHY_ASSIGN; |
| 1111 | NETDEV_ASSIGN; |
| 1112 | MAC_ASSIGN(bssid, sme->bssid); |
| 1113 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); |
| 1114 | memcpy(__entry->ssid, sme->ssid, sme->ssid_len); |
| 1115 | __entry->auth_type = sme->auth_type; |
| 1116 | __entry->privacy = sme->privacy; |
| 1117 | __entry->wpa_versions = sme->crypto.wpa_versions; |
| 1118 | __entry->flags = sme->flags; |
| 1119 | ), |
| 1120 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT |
| 1121 | ", ssid: %s, auth type: %d, privacy: %s, wpa versions: %u, " |
| 1122 | "flags: %u", |
| 1123 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid, |
| 1124 | __entry->auth_type, BOOL_TO_STR(__entry->privacy), |
| 1125 | __entry->wpa_versions, __entry->flags) |
| 1126 | ); |
| 1127 | |
| 1128 | TRACE_EVENT(rdev_set_cqm_rssi_config, |
| 1129 | TP_PROTO(struct wiphy *wiphy, |
| 1130 | struct net_device *netdev, s32 rssi_thold, |
| 1131 | u32 rssi_hyst), |
| 1132 | TP_ARGS(wiphy, netdev, rssi_thold, rssi_hyst), |
| 1133 | TP_STRUCT__entry( |
| 1134 | WIPHY_ENTRY |
| 1135 | NETDEV_ENTRY |
| 1136 | __field(s32, rssi_thold) |
| 1137 | __field(u32, rssi_hyst) |
| 1138 | ), |
| 1139 | TP_fast_assign( |
| 1140 | WIPHY_ASSIGN; |
| 1141 | NETDEV_ASSIGN; |
| 1142 | __entry->rssi_thold = rssi_thold; |
| 1143 | __entry->rssi_hyst = rssi_hyst; |
| 1144 | ), |
| 1145 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT |
| 1146 | ", rssi_thold: %d, rssi_hyst: %u ", |
| 1147 | WIPHY_PR_ARG, NETDEV_PR_ARG, |
| 1148 | __entry->rssi_thold, __entry->rssi_hyst) |
| 1149 | ); |
| 1150 | |
| 1151 | TRACE_EVENT(rdev_set_cqm_txe_config, |
| 1152 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 rate, |
| 1153 | u32 pkts, u32 intvl), |
| 1154 | TP_ARGS(wiphy, netdev, rate, pkts, intvl), |
| 1155 | TP_STRUCT__entry( |
| 1156 | WIPHY_ENTRY |
| 1157 | NETDEV_ENTRY |
| 1158 | __field(u32, rate) |
| 1159 | __field(u32, pkts) |
| 1160 | __field(u32, intvl) |
| 1161 | ), |
| 1162 | TP_fast_assign( |
| 1163 | WIPHY_ASSIGN; |
| 1164 | NETDEV_ASSIGN; |
| 1165 | __entry->rate = rate; |
| 1166 | __entry->pkts = pkts; |
| 1167 | __entry->intvl = intvl; |
| 1168 | ), |
| 1169 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", rate: %u, packets: %u, interval: %u", |
| 1170 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->rate, __entry->pkts, |
| 1171 | __entry->intvl) |
| 1172 | ); |
| 1173 | |
| 1174 | TRACE_EVENT(rdev_disconnect, |
| 1175 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1176 | u16 reason_code), |
| 1177 | TP_ARGS(wiphy, netdev, reason_code), |
| 1178 | TP_STRUCT__entry( |
| 1179 | WIPHY_ENTRY |
| 1180 | NETDEV_ENTRY |
| 1181 | __field(u16, reason_code) |
| 1182 | ), |
| 1183 | TP_fast_assign( |
| 1184 | WIPHY_ASSIGN; |
| 1185 | NETDEV_ASSIGN; |
| 1186 | __entry->reason_code = reason_code; |
| 1187 | ), |
| 1188 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", reason code: %u", WIPHY_PR_ARG, |
| 1189 | NETDEV_PR_ARG, __entry->reason_code) |
| 1190 | ); |
| 1191 | |
| 1192 | TRACE_EVENT(rdev_join_ibss, |
| 1193 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1194 | struct cfg80211_ibss_params *params), |
| 1195 | TP_ARGS(wiphy, netdev, params), |
| 1196 | TP_STRUCT__entry( |
| 1197 | WIPHY_ENTRY |
| 1198 | NETDEV_ENTRY |
| 1199 | MAC_ENTRY(bssid) |
| 1200 | __array(char, ssid, IEEE80211_MAX_SSID_LEN + 1) |
| 1201 | ), |
| 1202 | TP_fast_assign( |
| 1203 | WIPHY_ASSIGN; |
| 1204 | NETDEV_ASSIGN; |
| 1205 | MAC_ASSIGN(bssid, params->bssid); |
| 1206 | memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1); |
| 1207 | memcpy(__entry->ssid, params->ssid, params->ssid_len); |
| 1208 | ), |
| 1209 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT ", ssid: %s", |
| 1210 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid), __entry->ssid) |
| 1211 | ); |
| 1212 | |
| 1213 | TRACE_EVENT(rdev_set_wiphy_params, |
| 1214 | TP_PROTO(struct wiphy *wiphy, u32 changed), |
| 1215 | TP_ARGS(wiphy, changed), |
| 1216 | TP_STRUCT__entry( |
| 1217 | WIPHY_ENTRY |
| 1218 | __field(u32, changed) |
| 1219 | ), |
| 1220 | TP_fast_assign( |
| 1221 | WIPHY_ASSIGN; |
| 1222 | __entry->changed = changed; |
| 1223 | ), |
| 1224 | TP_printk(WIPHY_PR_FMT ", changed: %u", |
| 1225 | WIPHY_PR_ARG, __entry->changed) |
| 1226 | ); |
| 1227 | |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 1228 | DEFINE_EVENT(wiphy_wdev_evt, rdev_get_tx_power, |
| 1229 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 1230 | TP_ARGS(wiphy, wdev) |
| 1231 | ); |
| 1232 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 1233 | TRACE_EVENT(rdev_set_tx_power, |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 1234 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 1235 | enum nl80211_tx_power_setting type, int mbm), |
| 1236 | TP_ARGS(wiphy, wdev, type, mbm), |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 1237 | TP_STRUCT__entry( |
| 1238 | WIPHY_ENTRY |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 1239 | WDEV_ENTRY |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 1240 | __field(enum nl80211_tx_power_setting, type) |
| 1241 | __field(int, mbm) |
| 1242 | ), |
| 1243 | TP_fast_assign( |
| 1244 | WIPHY_ASSIGN; |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 1245 | WDEV_ASSIGN; |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 1246 | __entry->type = type; |
| 1247 | __entry->mbm = mbm; |
| 1248 | ), |
Johannes Berg | c844211 | 2012-10-24 10:17:18 +0200 | [diff] [blame] | 1249 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", type: %d, mbm: %d", |
| 1250 | WIPHY_PR_ARG, WDEV_PR_ARG,__entry->type, __entry->mbm) |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 1251 | ); |
| 1252 | |
| 1253 | TRACE_EVENT(rdev_return_int_int, |
| 1254 | TP_PROTO(struct wiphy *wiphy, int func_ret, int func_fill), |
| 1255 | TP_ARGS(wiphy, func_ret, func_fill), |
| 1256 | TP_STRUCT__entry( |
| 1257 | WIPHY_ENTRY |
| 1258 | __field(int, func_ret) |
| 1259 | __field(int, func_fill) |
| 1260 | ), |
| 1261 | TP_fast_assign( |
| 1262 | WIPHY_ASSIGN; |
| 1263 | __entry->func_ret = func_ret; |
| 1264 | __entry->func_fill = func_fill; |
| 1265 | ), |
| 1266 | TP_printk(WIPHY_PR_FMT ", function returns: %d, function filled: %d", |
| 1267 | WIPHY_PR_ARG, __entry->func_ret, __entry->func_fill) |
| 1268 | ); |
| 1269 | |
| 1270 | #ifdef CONFIG_NL80211_TESTMODE |
| 1271 | TRACE_EVENT(rdev_testmode_cmd, |
| 1272 | TP_PROTO(struct wiphy *wiphy), |
| 1273 | TP_ARGS(wiphy), |
| 1274 | TP_STRUCT__entry( |
| 1275 | WIPHY_ENTRY |
| 1276 | ), |
| 1277 | TP_fast_assign( |
| 1278 | WIPHY_ASSIGN; |
| 1279 | ), |
| 1280 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) |
| 1281 | ); |
| 1282 | |
| 1283 | TRACE_EVENT(rdev_testmode_dump, |
| 1284 | TP_PROTO(struct wiphy *wiphy), |
| 1285 | TP_ARGS(wiphy), |
| 1286 | TP_STRUCT__entry( |
| 1287 | WIPHY_ENTRY |
| 1288 | ), |
| 1289 | TP_fast_assign( |
| 1290 | WIPHY_ASSIGN; |
| 1291 | ), |
| 1292 | TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG) |
| 1293 | ); |
| 1294 | #endif /* CONFIG_NL80211_TESTMODE */ |
| 1295 | |
| 1296 | TRACE_EVENT(rdev_set_bitrate_mask, |
| 1297 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1298 | const u8 *peer, const struct cfg80211_bitrate_mask *mask), |
| 1299 | TP_ARGS(wiphy, netdev, peer, mask), |
| 1300 | TP_STRUCT__entry( |
| 1301 | WIPHY_ENTRY |
| 1302 | NETDEV_ENTRY |
| 1303 | MAC_ENTRY(peer) |
| 1304 | ), |
| 1305 | TP_fast_assign( |
| 1306 | WIPHY_ASSIGN; |
| 1307 | NETDEV_ASSIGN; |
| 1308 | MAC_ASSIGN(peer, peer); |
| 1309 | ), |
| 1310 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", peer: " MAC_PR_FMT, |
| 1311 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) |
| 1312 | ); |
| 1313 | |
| 1314 | TRACE_EVENT(rdev_mgmt_frame_register, |
| 1315 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 1316 | u16 frame_type, bool reg), |
| 1317 | TP_ARGS(wiphy, wdev, frame_type, reg), |
| 1318 | TP_STRUCT__entry( |
| 1319 | WIPHY_ENTRY |
| 1320 | WDEV_ENTRY |
| 1321 | __field(u16, frame_type) |
| 1322 | __field(bool, reg) |
| 1323 | ), |
| 1324 | TP_fast_assign( |
| 1325 | WIPHY_ASSIGN; |
| 1326 | WDEV_ASSIGN; |
| 1327 | __entry->frame_type = frame_type; |
| 1328 | __entry->reg = reg; |
| 1329 | ), |
| 1330 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", frame_type: %u, reg: %s ", |
| 1331 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->frame_type, |
| 1332 | __entry->reg ? "true" : "false") |
| 1333 | ); |
| 1334 | |
| 1335 | TRACE_EVENT(rdev_return_int_tx_rx, |
| 1336 | TP_PROTO(struct wiphy *wiphy, int ret, u32 tx, u32 rx), |
| 1337 | TP_ARGS(wiphy, ret, tx, rx), |
| 1338 | TP_STRUCT__entry( |
| 1339 | WIPHY_ENTRY |
| 1340 | __field(int, ret) |
| 1341 | __field(u32, tx) |
| 1342 | __field(u32, rx) |
| 1343 | ), |
| 1344 | TP_fast_assign( |
| 1345 | WIPHY_ASSIGN; |
| 1346 | __entry->ret = ret; |
| 1347 | __entry->tx = tx; |
| 1348 | __entry->rx = rx; |
| 1349 | ), |
| 1350 | TP_printk(WIPHY_PR_FMT ", returned %d, tx: %u, rx: %u", |
| 1351 | WIPHY_PR_ARG, __entry->ret, __entry->tx, __entry->rx) |
| 1352 | ); |
| 1353 | |
| 1354 | TRACE_EVENT(rdev_return_void_tx_rx, |
| 1355 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 tx_max, |
| 1356 | u32 rx, u32 rx_max), |
| 1357 | TP_ARGS(wiphy, tx, tx_max, rx, rx_max), |
| 1358 | TP_STRUCT__entry( |
| 1359 | WIPHY_ENTRY |
| 1360 | __field(u32, tx) |
| 1361 | __field(u32, tx_max) |
| 1362 | __field(u32, rx) |
| 1363 | __field(u32, rx_max) |
| 1364 | ), |
| 1365 | TP_fast_assign( |
| 1366 | WIPHY_ASSIGN; |
| 1367 | __entry->tx = tx; |
| 1368 | __entry->tx_max = tx_max; |
| 1369 | __entry->rx = rx; |
| 1370 | __entry->rx_max = rx_max; |
| 1371 | ), |
| 1372 | TP_printk(WIPHY_PR_FMT ", tx: %u, tx_max: %u, rx: %u, rx_max: %u ", |
| 1373 | WIPHY_PR_ARG, __entry->tx, __entry->tx_max, __entry->rx, |
| 1374 | __entry->rx_max) |
| 1375 | ); |
| 1376 | |
| 1377 | DECLARE_EVENT_CLASS(tx_rx_evt, |
| 1378 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), |
| 1379 | TP_ARGS(wiphy, rx, tx), |
| 1380 | TP_STRUCT__entry( |
| 1381 | WIPHY_ENTRY |
| 1382 | __field(u32, tx) |
| 1383 | __field(u32, rx) |
| 1384 | ), |
| 1385 | TP_fast_assign( |
| 1386 | WIPHY_ASSIGN; |
| 1387 | __entry->tx = tx; |
| 1388 | __entry->rx = rx; |
| 1389 | ), |
| 1390 | TP_printk(WIPHY_PR_FMT ", tx: %u, rx: %u ", |
| 1391 | WIPHY_PR_ARG, __entry->tx, __entry->rx) |
| 1392 | ); |
| 1393 | |
| 1394 | DEFINE_EVENT(tx_rx_evt, rdev_set_ringparam, |
| 1395 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), |
| 1396 | TP_ARGS(wiphy, rx, tx) |
| 1397 | ); |
| 1398 | |
| 1399 | DEFINE_EVENT(tx_rx_evt, rdev_set_antenna, |
| 1400 | TP_PROTO(struct wiphy *wiphy, u32 tx, u32 rx), |
| 1401 | TP_ARGS(wiphy, rx, tx) |
| 1402 | ); |
| 1403 | |
| 1404 | TRACE_EVENT(rdev_sched_scan_start, |
| 1405 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1406 | struct cfg80211_sched_scan_request *request), |
| 1407 | TP_ARGS(wiphy, netdev, request), |
| 1408 | TP_STRUCT__entry( |
| 1409 | WIPHY_ENTRY |
| 1410 | NETDEV_ENTRY |
| 1411 | ), |
| 1412 | TP_fast_assign( |
| 1413 | WIPHY_ASSIGN; |
| 1414 | NETDEV_ASSIGN; |
| 1415 | ), |
| 1416 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT, |
| 1417 | WIPHY_PR_ARG, NETDEV_PR_ARG) |
| 1418 | ); |
| 1419 | |
| 1420 | TRACE_EVENT(rdev_tdls_mgmt, |
| 1421 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1422 | u8 *peer, u8 action_code, u8 dialog_token, |
| 1423 | u16 status_code, const u8 *buf, size_t len), |
| 1424 | TP_ARGS(wiphy, netdev, peer, action_code, dialog_token, status_code, |
| 1425 | buf, len), |
| 1426 | TP_STRUCT__entry( |
| 1427 | WIPHY_ENTRY |
| 1428 | NETDEV_ENTRY |
| 1429 | MAC_ENTRY(peer) |
| 1430 | __field(u8, action_code) |
| 1431 | __field(u8, dialog_token) |
| 1432 | __field(u16, status_code) |
| 1433 | __dynamic_array(u8, buf, len) |
| 1434 | ), |
| 1435 | TP_fast_assign( |
| 1436 | WIPHY_ASSIGN; |
| 1437 | NETDEV_ASSIGN; |
| 1438 | MAC_ASSIGN(peer, peer); |
| 1439 | __entry->action_code = action_code; |
| 1440 | __entry->dialog_token = dialog_token; |
| 1441 | __entry->status_code = status_code; |
| 1442 | memcpy(__get_dynamic_array(buf), buf, len); |
| 1443 | ), |
| 1444 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", action_code: %u, " |
| 1445 | "dialog_token: %u, status_code: %u, buf: %#.2x ", |
| 1446 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), |
| 1447 | __entry->action_code, __entry->dialog_token, |
| 1448 | __entry->status_code, ((u8 *)__get_dynamic_array(buf))[0]) |
| 1449 | ); |
| 1450 | |
| 1451 | TRACE_EVENT(rdev_dump_survey, |
| 1452 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int idx), |
| 1453 | TP_ARGS(wiphy, netdev, idx), |
| 1454 | TP_STRUCT__entry( |
| 1455 | WIPHY_ENTRY |
| 1456 | NETDEV_ENTRY |
| 1457 | __field(int, idx) |
| 1458 | ), |
| 1459 | TP_fast_assign( |
| 1460 | WIPHY_ASSIGN; |
| 1461 | NETDEV_ASSIGN; |
| 1462 | __entry->idx = idx; |
| 1463 | ), |
| 1464 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", index: %d", |
| 1465 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->idx) |
| 1466 | ); |
| 1467 | |
| 1468 | TRACE_EVENT(rdev_return_int_survey_info, |
| 1469 | TP_PROTO(struct wiphy *wiphy, int ret, struct survey_info *info), |
| 1470 | TP_ARGS(wiphy, ret, info), |
| 1471 | TP_STRUCT__entry( |
| 1472 | WIPHY_ENTRY |
| 1473 | CHAN_ENTRY |
| 1474 | __field(int, ret) |
| 1475 | __field(u64, channel_time) |
| 1476 | __field(u64, channel_time_busy) |
| 1477 | __field(u64, channel_time_ext_busy) |
| 1478 | __field(u64, channel_time_rx) |
| 1479 | __field(u64, channel_time_tx) |
| 1480 | __field(u32, filled) |
| 1481 | __field(s8, noise) |
| 1482 | ), |
| 1483 | TP_fast_assign( |
| 1484 | WIPHY_ASSIGN; |
| 1485 | CHAN_ASSIGN(info->channel); |
| 1486 | __entry->ret = ret; |
| 1487 | __entry->channel_time = info->channel_time; |
| 1488 | __entry->channel_time_busy = info->channel_time_busy; |
| 1489 | __entry->channel_time_ext_busy = info->channel_time_ext_busy; |
| 1490 | __entry->channel_time_rx = info->channel_time_rx; |
| 1491 | __entry->channel_time_tx = info->channel_time_tx; |
| 1492 | __entry->filled = info->filled; |
| 1493 | __entry->noise = info->noise; |
| 1494 | ), |
| 1495 | TP_printk(WIPHY_PR_FMT ", returned: %d, " CHAN_PR_FMT |
| 1496 | ", channel time: %llu, channel time busy: %llu, " |
| 1497 | "channel time extension busy: %llu, channel time rx: %llu, " |
| 1498 | "channel time tx: %llu, filled: %u, noise: %d", |
| 1499 | WIPHY_PR_ARG, __entry->ret, CHAN_PR_ARG, |
| 1500 | __entry->channel_time, __entry->channel_time_busy, |
| 1501 | __entry->channel_time_ext_busy, __entry->channel_time_rx, |
| 1502 | __entry->channel_time_tx, __entry->filled, __entry->noise) |
| 1503 | ); |
| 1504 | |
| 1505 | TRACE_EVENT(rdev_tdls_oper, |
| 1506 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1507 | u8 *peer, enum nl80211_tdls_operation oper), |
| 1508 | TP_ARGS(wiphy, netdev, peer, oper), |
| 1509 | TP_STRUCT__entry( |
| 1510 | WIPHY_ENTRY |
| 1511 | NETDEV_ENTRY |
| 1512 | MAC_ENTRY(peer) |
| 1513 | __field(enum nl80211_tdls_operation, oper) |
| 1514 | ), |
| 1515 | TP_fast_assign( |
| 1516 | WIPHY_ASSIGN; |
| 1517 | NETDEV_ASSIGN; |
| 1518 | MAC_ASSIGN(peer, peer); |
| 1519 | __entry->oper = oper; |
| 1520 | ), |
| 1521 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT ", oper: %d", |
| 1522 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper) |
| 1523 | ); |
| 1524 | |
| 1525 | DECLARE_EVENT_CLASS(rdev_pmksa, |
| 1526 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1527 | struct cfg80211_pmksa *pmksa), |
| 1528 | TP_ARGS(wiphy, netdev, pmksa), |
| 1529 | TP_STRUCT__entry( |
| 1530 | WIPHY_ENTRY |
| 1531 | NETDEV_ENTRY |
| 1532 | MAC_ENTRY(bssid) |
| 1533 | ), |
| 1534 | TP_fast_assign( |
| 1535 | WIPHY_ASSIGN; |
| 1536 | NETDEV_ASSIGN; |
| 1537 | MAC_ASSIGN(bssid, pmksa->bssid); |
| 1538 | ), |
| 1539 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", bssid: " MAC_PR_FMT, |
| 1540 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(bssid)) |
| 1541 | ); |
| 1542 | |
| 1543 | TRACE_EVENT(rdev_probe_client, |
| 1544 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1545 | const u8 *peer), |
| 1546 | TP_ARGS(wiphy, netdev, peer), |
| 1547 | TP_STRUCT__entry( |
| 1548 | WIPHY_ENTRY |
| 1549 | NETDEV_ENTRY |
| 1550 | MAC_ENTRY(peer) |
| 1551 | ), |
| 1552 | TP_fast_assign( |
| 1553 | WIPHY_ASSIGN; |
| 1554 | NETDEV_ASSIGN; |
| 1555 | MAC_ASSIGN(peer, peer); |
| 1556 | ), |
| 1557 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT MAC_PR_FMT, |
| 1558 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer)) |
| 1559 | ); |
| 1560 | |
| 1561 | DEFINE_EVENT(rdev_pmksa, rdev_set_pmksa, |
| 1562 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1563 | struct cfg80211_pmksa *pmksa), |
| 1564 | TP_ARGS(wiphy, netdev, pmksa) |
| 1565 | ); |
| 1566 | |
| 1567 | DEFINE_EVENT(rdev_pmksa, rdev_del_pmksa, |
| 1568 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1569 | struct cfg80211_pmksa *pmksa), |
| 1570 | TP_ARGS(wiphy, netdev, pmksa) |
| 1571 | ); |
| 1572 | |
| 1573 | TRACE_EVENT(rdev_remain_on_channel, |
| 1574 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 1575 | struct ieee80211_channel *chan, |
| 1576 | enum nl80211_channel_type channel_type, unsigned int duration), |
| 1577 | TP_ARGS(wiphy, wdev, chan, channel_type, duration), |
| 1578 | TP_STRUCT__entry( |
| 1579 | WIPHY_ENTRY |
| 1580 | WDEV_ENTRY |
| 1581 | CHAN_ENTRY |
| 1582 | __field(enum nl80211_channel_type, channel_type) |
| 1583 | __field(unsigned int, duration) |
| 1584 | ), |
| 1585 | TP_fast_assign( |
| 1586 | WIPHY_ASSIGN; |
| 1587 | WDEV_ASSIGN; |
| 1588 | CHAN_ASSIGN(chan); |
| 1589 | __entry->channel_type = channel_type; |
| 1590 | __entry->duration = duration; |
| 1591 | ), |
| 1592 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", channel type: %d, duration: %u", |
| 1593 | WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, __entry->channel_type, |
| 1594 | __entry->duration) |
| 1595 | ); |
| 1596 | |
| 1597 | TRACE_EVENT(rdev_return_int_cookie, |
| 1598 | TP_PROTO(struct wiphy *wiphy, int ret, u64 cookie), |
| 1599 | TP_ARGS(wiphy, ret, cookie), |
| 1600 | TP_STRUCT__entry( |
| 1601 | WIPHY_ENTRY |
| 1602 | __field(int, ret) |
| 1603 | __field(u64, cookie) |
| 1604 | ), |
| 1605 | TP_fast_assign( |
| 1606 | WIPHY_ASSIGN; |
| 1607 | __entry->ret = ret; |
| 1608 | __entry->cookie = cookie; |
| 1609 | ), |
| 1610 | TP_printk(WIPHY_PR_FMT ", returned %d, cookie: %llu", |
| 1611 | WIPHY_PR_ARG, __entry->ret, __entry->cookie) |
| 1612 | ); |
| 1613 | |
| 1614 | TRACE_EVENT(rdev_cancel_remain_on_channel, |
| 1615 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, u64 cookie), |
| 1616 | TP_ARGS(wiphy, wdev, cookie), |
| 1617 | TP_STRUCT__entry( |
| 1618 | WIPHY_ENTRY |
| 1619 | WDEV_ENTRY |
| 1620 | __field(u64, cookie) |
| 1621 | ), |
| 1622 | TP_fast_assign( |
| 1623 | WIPHY_ASSIGN; |
| 1624 | WDEV_ASSIGN; |
| 1625 | __entry->cookie = cookie; |
| 1626 | ), |
| 1627 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT ", cookie: %llu", |
| 1628 | WIPHY_PR_ARG, WDEV_PR_ARG, __entry->cookie) |
| 1629 | ); |
| 1630 | |
| 1631 | TRACE_EVENT(rdev_mgmt_tx, |
| 1632 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev, |
| 1633 | struct ieee80211_channel *chan, bool offchan, |
| 1634 | enum nl80211_channel_type channel_type, |
| 1635 | bool channel_type_valid, unsigned int wait, bool no_cck, |
| 1636 | bool dont_wait_for_ack), |
| 1637 | TP_ARGS(wiphy, wdev, chan, offchan, channel_type, channel_type_valid, |
| 1638 | wait, no_cck, dont_wait_for_ack), |
| 1639 | TP_STRUCT__entry( |
| 1640 | WIPHY_ENTRY |
| 1641 | WDEV_ENTRY |
| 1642 | CHAN_ENTRY |
| 1643 | __field(bool, offchan) |
| 1644 | __field(enum nl80211_channel_type, channel_type) |
| 1645 | __field(bool, channel_type_valid) |
| 1646 | __field(unsigned int, wait) |
| 1647 | __field(bool, no_cck) |
| 1648 | __field(bool, dont_wait_for_ack) |
| 1649 | ), |
| 1650 | TP_fast_assign( |
| 1651 | WIPHY_ASSIGN; |
| 1652 | WDEV_ASSIGN; |
| 1653 | CHAN_ASSIGN(chan); |
| 1654 | __entry->offchan = offchan; |
| 1655 | __entry->channel_type = channel_type; |
| 1656 | __entry->channel_type_valid = channel_type_valid; |
| 1657 | __entry->wait = wait; |
| 1658 | __entry->no_cck = no_cck; |
| 1659 | __entry->dont_wait_for_ack = dont_wait_for_ack; |
| 1660 | ), |
| 1661 | TP_printk(WIPHY_PR_FMT WDEV_PR_FMT CHAN_PR_FMT ", offchan: %s, " |
| 1662 | "channel type: %d, channel type valid: %s, wait: %u, " |
| 1663 | "no cck: %s, dont wait for ack: %s", |
| 1664 | WIPHY_PR_ARG, WDEV_PR_ARG, CHAN_PR_ARG, |
| 1665 | BOOL_TO_STR(__entry->offchan), __entry->channel_type, |
| 1666 | BOOL_TO_STR(__entry->channel_type_valid), __entry->wait, |
| 1667 | BOOL_TO_STR(__entry->no_cck), |
| 1668 | BOOL_TO_STR(__entry->dont_wait_for_ack)) |
| 1669 | ); |
| 1670 | |
| 1671 | TRACE_EVENT(rdev_set_noack_map, |
| 1672 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, |
| 1673 | u16 noack_map), |
| 1674 | TP_ARGS(wiphy, netdev, noack_map), |
| 1675 | TP_STRUCT__entry( |
| 1676 | WIPHY_ENTRY |
| 1677 | NETDEV_ENTRY |
| 1678 | __field(u16, noack_map) |
| 1679 | ), |
| 1680 | TP_fast_assign( |
| 1681 | WIPHY_ASSIGN; |
| 1682 | NETDEV_ASSIGN; |
| 1683 | __entry->noack_map = noack_map; |
| 1684 | ), |
| 1685 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", noack_map: %u", |
| 1686 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->noack_map) |
| 1687 | ); |
| 1688 | |
| 1689 | TRACE_EVENT(rdev_get_et_sset_count, |
| 1690 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, int sset), |
| 1691 | TP_ARGS(wiphy, netdev, sset), |
| 1692 | TP_STRUCT__entry( |
| 1693 | WIPHY_ENTRY |
| 1694 | NETDEV_ENTRY |
| 1695 | __field(int, sset) |
| 1696 | ), |
| 1697 | TP_fast_assign( |
| 1698 | WIPHY_ASSIGN; |
| 1699 | NETDEV_ASSIGN; |
| 1700 | __entry->sset = sset; |
| 1701 | ), |
| 1702 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %d", |
| 1703 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) |
| 1704 | ); |
| 1705 | |
| 1706 | TRACE_EVENT(rdev_get_et_strings, |
| 1707 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, u32 sset), |
| 1708 | TP_ARGS(wiphy, netdev, sset), |
| 1709 | TP_STRUCT__entry( |
| 1710 | WIPHY_ENTRY |
| 1711 | NETDEV_ENTRY |
| 1712 | __field(u32, sset) |
| 1713 | ), |
| 1714 | TP_fast_assign( |
| 1715 | WIPHY_ASSIGN; |
| 1716 | NETDEV_ASSIGN; |
| 1717 | __entry->sset = sset; |
| 1718 | ), |
| 1719 | TP_printk(WIPHY_PR_FMT NETDEV_PR_FMT ", sset: %u", |
| 1720 | WIPHY_PR_ARG, NETDEV_PR_ARG, __entry->sset) |
| 1721 | ); |
| 1722 | |
| 1723 | DEFINE_EVENT(wiphy_wdev_evt, rdev_get_channel, |
| 1724 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 1725 | TP_ARGS(wiphy, wdev) |
| 1726 | ); |
| 1727 | |
| 1728 | TRACE_EVENT(rdev_return_channel, |
| 1729 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *chan, |
| 1730 | enum nl80211_channel_type type), |
| 1731 | TP_ARGS(wiphy, chan, type), |
| 1732 | TP_STRUCT__entry( |
| 1733 | WIPHY_ENTRY |
| 1734 | CHAN_ENTRY |
| 1735 | __field(enum nl80211_channel_type, type) |
| 1736 | ), |
| 1737 | TP_fast_assign( |
| 1738 | WIPHY_ASSIGN; |
| 1739 | CHAN_ASSIGN(chan); |
| 1740 | __entry->type = type; |
| 1741 | ), |
| 1742 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel type: %d", |
| 1743 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->type) |
| 1744 | ); |
| 1745 | |
Johannes Berg | eeb126e | 2012-10-23 15:16:50 +0200 | [diff] [blame] | 1746 | DEFINE_EVENT(wiphy_wdev_evt, rdev_start_p2p_device, |
| 1747 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 1748 | TP_ARGS(wiphy, wdev) |
| 1749 | ); |
| 1750 | |
| 1751 | DEFINE_EVENT(wiphy_wdev_evt, rdev_stop_p2p_device, |
| 1752 | TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), |
| 1753 | TP_ARGS(wiphy, wdev) |
| 1754 | ); |
| 1755 | |
Beni Lev | 4ee3e06 | 2012-08-27 12:49:39 +0300 | [diff] [blame] | 1756 | /************************************************************* |
| 1757 | * cfg80211 exported functions traces * |
| 1758 | *************************************************************/ |
| 1759 | |
| 1760 | TRACE_EVENT(cfg80211_return_bool, |
| 1761 | TP_PROTO(bool ret), |
| 1762 | TP_ARGS(ret), |
| 1763 | TP_STRUCT__entry( |
| 1764 | __field(bool, ret) |
| 1765 | ), |
| 1766 | TP_fast_assign( |
| 1767 | __entry->ret = ret; |
| 1768 | ), |
| 1769 | TP_printk("returned %s", BOOL_TO_STR(__entry->ret)) |
| 1770 | ); |
| 1771 | |
| 1772 | DECLARE_EVENT_CLASS(cfg80211_netdev_mac_evt, |
| 1773 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), |
| 1774 | TP_ARGS(netdev, macaddr), |
| 1775 | TP_STRUCT__entry( |
| 1776 | NETDEV_ENTRY |
| 1777 | MAC_ENTRY(macaddr) |
| 1778 | ), |
| 1779 | TP_fast_assign( |
| 1780 | NETDEV_ASSIGN; |
| 1781 | MAC_ASSIGN(macaddr, macaddr); |
| 1782 | ), |
| 1783 | TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, |
| 1784 | NETDEV_PR_ARG, MAC_PR_ARG(macaddr)) |
| 1785 | ); |
| 1786 | |
| 1787 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_notify_new_peer_candidate, |
| 1788 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), |
| 1789 | TP_ARGS(netdev, macaddr) |
| 1790 | ); |
| 1791 | |
| 1792 | DECLARE_EVENT_CLASS(netdev_evt_only, |
| 1793 | TP_PROTO(struct net_device *netdev), |
| 1794 | TP_ARGS(netdev), |
| 1795 | TP_STRUCT__entry( |
| 1796 | NETDEV_ENTRY |
| 1797 | ), |
| 1798 | TP_fast_assign( |
| 1799 | NETDEV_ASSIGN; |
| 1800 | ), |
| 1801 | TP_printk(NETDEV_PR_FMT , NETDEV_PR_ARG) |
| 1802 | ); |
| 1803 | |
| 1804 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_rx_auth, |
| 1805 | TP_PROTO(struct net_device *netdev), |
| 1806 | TP_ARGS(netdev) |
| 1807 | ); |
| 1808 | |
| 1809 | TRACE_EVENT(cfg80211_send_rx_assoc, |
| 1810 | TP_PROTO(struct net_device *netdev, struct cfg80211_bss *bss), |
| 1811 | TP_ARGS(netdev, bss), |
| 1812 | TP_STRUCT__entry( |
| 1813 | NETDEV_ENTRY |
| 1814 | MAC_ENTRY(bssid) |
| 1815 | CHAN_ENTRY |
| 1816 | ), |
| 1817 | TP_fast_assign( |
| 1818 | NETDEV_ASSIGN; |
| 1819 | MAC_ASSIGN(bssid, bss->bssid); |
| 1820 | CHAN_ASSIGN(bss->channel); |
| 1821 | ), |
| 1822 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT CHAN_PR_FMT, |
| 1823 | NETDEV_PR_ARG, MAC_PR_ARG(bssid), CHAN_PR_ARG) |
| 1824 | ); |
| 1825 | |
| 1826 | DEFINE_EVENT(netdev_evt_only, __cfg80211_send_deauth, |
| 1827 | TP_PROTO(struct net_device *netdev), |
| 1828 | TP_ARGS(netdev) |
| 1829 | ); |
| 1830 | |
| 1831 | DEFINE_EVENT(netdev_evt_only, __cfg80211_send_disassoc, |
| 1832 | TP_PROTO(struct net_device *netdev), |
| 1833 | TP_ARGS(netdev) |
| 1834 | ); |
| 1835 | |
| 1836 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_deauth, |
| 1837 | TP_PROTO(struct net_device *netdev), |
| 1838 | TP_ARGS(netdev) |
| 1839 | ); |
| 1840 | |
| 1841 | DEFINE_EVENT(netdev_evt_only, cfg80211_send_unprot_disassoc, |
| 1842 | TP_PROTO(struct net_device *netdev), |
| 1843 | TP_ARGS(netdev) |
| 1844 | ); |
| 1845 | |
| 1846 | DECLARE_EVENT_CLASS(netdev_mac_evt, |
| 1847 | TP_PROTO(struct net_device *netdev, const u8 *mac), |
| 1848 | TP_ARGS(netdev, mac), |
| 1849 | TP_STRUCT__entry( |
| 1850 | NETDEV_ENTRY |
| 1851 | MAC_ENTRY(mac) |
| 1852 | ), |
| 1853 | TP_fast_assign( |
| 1854 | NETDEV_ASSIGN; |
| 1855 | MAC_ASSIGN(mac, mac) |
| 1856 | ), |
| 1857 | TP_printk(NETDEV_PR_FMT ", mac: " MAC_PR_FMT, |
| 1858 | NETDEV_PR_ARG, MAC_PR_ARG(mac)) |
| 1859 | ); |
| 1860 | |
| 1861 | DEFINE_EVENT(netdev_mac_evt, cfg80211_send_auth_timeout, |
| 1862 | TP_PROTO(struct net_device *netdev, const u8 *mac), |
| 1863 | TP_ARGS(netdev, mac) |
| 1864 | ); |
| 1865 | |
| 1866 | DEFINE_EVENT(netdev_mac_evt, cfg80211_send_assoc_timeout, |
| 1867 | TP_PROTO(struct net_device *netdev, const u8 *mac), |
| 1868 | TP_ARGS(netdev, mac) |
| 1869 | ); |
| 1870 | |
| 1871 | TRACE_EVENT(cfg80211_michael_mic_failure, |
| 1872 | TP_PROTO(struct net_device *netdev, const u8 *addr, |
| 1873 | enum nl80211_key_type key_type, int key_id, const u8 *tsc), |
| 1874 | TP_ARGS(netdev, addr, key_type, key_id, tsc), |
| 1875 | TP_STRUCT__entry( |
| 1876 | NETDEV_ENTRY |
| 1877 | MAC_ENTRY(addr) |
| 1878 | __field(enum nl80211_key_type, key_type) |
| 1879 | __field(int, key_id) |
| 1880 | __array(u8, tsc, 6) |
| 1881 | ), |
| 1882 | TP_fast_assign( |
| 1883 | NETDEV_ASSIGN; |
| 1884 | MAC_ASSIGN(addr, addr); |
| 1885 | __entry->key_type = key_type; |
| 1886 | __entry->key_id = key_id; |
| 1887 | memcpy(__entry->tsc, tsc, 6); |
| 1888 | ), |
| 1889 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT ", key type: %d, key id: %d, tsc: %pm", |
| 1890 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->key_type, |
| 1891 | __entry->key_id, __entry->tsc) |
| 1892 | ); |
| 1893 | |
| 1894 | TRACE_EVENT(cfg80211_ready_on_channel, |
| 1895 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, |
| 1896 | struct ieee80211_channel *chan, |
| 1897 | enum nl80211_channel_type channel_type, unsigned int duration), |
| 1898 | TP_ARGS(wdev, cookie, chan, channel_type, duration), |
| 1899 | TP_STRUCT__entry( |
| 1900 | WDEV_ENTRY |
| 1901 | __field(u64, cookie) |
| 1902 | CHAN_ENTRY |
| 1903 | __field(enum nl80211_channel_type, channel_type) |
| 1904 | __field(unsigned int, duration) |
| 1905 | ), |
| 1906 | TP_fast_assign( |
| 1907 | WDEV_ASSIGN; |
| 1908 | __entry->cookie = cookie; |
| 1909 | CHAN_ASSIGN(chan); |
| 1910 | __entry->channel_type = channel_type; |
| 1911 | __entry->duration = duration; |
| 1912 | ), |
| 1913 | TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d, duration: %u", |
| 1914 | WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, |
| 1915 | __entry->channel_type, __entry->duration) |
| 1916 | ); |
| 1917 | |
| 1918 | TRACE_EVENT(cfg80211_ready_on_channel_expired, |
| 1919 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, |
| 1920 | struct ieee80211_channel *chan, |
| 1921 | enum nl80211_channel_type channel_type), |
| 1922 | TP_ARGS(wdev, cookie, chan, channel_type), |
| 1923 | TP_STRUCT__entry( |
| 1924 | WDEV_ENTRY |
| 1925 | __field(u64, cookie) |
| 1926 | CHAN_ENTRY |
| 1927 | __field(enum nl80211_channel_type, channel_type) |
| 1928 | ), |
| 1929 | TP_fast_assign( |
| 1930 | WDEV_ASSIGN; |
| 1931 | __entry->cookie = cookie; |
| 1932 | CHAN_ASSIGN(chan); |
| 1933 | __entry->channel_type = channel_type; |
| 1934 | ), |
| 1935 | TP_printk(WDEV_PR_FMT ", cookie: %llu, " CHAN_PR_FMT ", channel type: %d", |
| 1936 | WDEV_PR_ARG, __entry->cookie, CHAN_PR_ARG, |
| 1937 | __entry->channel_type) |
| 1938 | ); |
| 1939 | |
| 1940 | TRACE_EVENT(cfg80211_new_sta, |
| 1941 | TP_PROTO(struct net_device *netdev, const u8 *mac_addr, |
| 1942 | struct station_info *sinfo), |
| 1943 | TP_ARGS(netdev, mac_addr, sinfo), |
| 1944 | TP_STRUCT__entry( |
| 1945 | NETDEV_ENTRY |
| 1946 | MAC_ENTRY(mac_addr) |
| 1947 | SINFO_ENTRY |
| 1948 | ), |
| 1949 | TP_fast_assign( |
| 1950 | NETDEV_ASSIGN; |
| 1951 | MAC_ASSIGN(mac_addr, mac_addr); |
| 1952 | SINFO_ASSIGN; |
| 1953 | ), |
| 1954 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT, |
| 1955 | NETDEV_PR_ARG, MAC_PR_ARG(mac_addr)) |
| 1956 | ); |
| 1957 | |
| 1958 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_del_sta, |
| 1959 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), |
| 1960 | TP_ARGS(netdev, macaddr) |
| 1961 | ); |
| 1962 | |
| 1963 | TRACE_EVENT(cfg80211_rx_mgmt, |
| 1964 | TP_PROTO(struct wireless_dev *wdev, int freq, int sig_mbm), |
| 1965 | TP_ARGS(wdev, freq, sig_mbm), |
| 1966 | TP_STRUCT__entry( |
| 1967 | WDEV_ENTRY |
| 1968 | __field(int, freq) |
| 1969 | __field(int, sig_mbm) |
| 1970 | ), |
| 1971 | TP_fast_assign( |
| 1972 | WDEV_ASSIGN; |
| 1973 | __entry->freq = freq; |
| 1974 | __entry->sig_mbm = sig_mbm; |
| 1975 | ), |
| 1976 | TP_printk(WDEV_PR_FMT ", freq: %d, sig mbm: %d", |
| 1977 | WDEV_PR_ARG, __entry->freq, __entry->sig_mbm) |
| 1978 | ); |
| 1979 | |
| 1980 | TRACE_EVENT(cfg80211_mgmt_tx_status, |
| 1981 | TP_PROTO(struct wireless_dev *wdev, u64 cookie, bool ack), |
| 1982 | TP_ARGS(wdev, cookie, ack), |
| 1983 | TP_STRUCT__entry( |
| 1984 | WDEV_ENTRY |
| 1985 | __field(u64, cookie) |
| 1986 | __field(bool, ack) |
| 1987 | ), |
| 1988 | TP_fast_assign( |
| 1989 | WDEV_ASSIGN; |
| 1990 | __entry->cookie = cookie; |
| 1991 | __entry->ack = ack; |
| 1992 | ), |
| 1993 | TP_printk(WDEV_PR_FMT", cookie: %llu, ack: %s", |
| 1994 | WDEV_PR_ARG, __entry->cookie, BOOL_TO_STR(__entry->ack)) |
| 1995 | ); |
| 1996 | |
| 1997 | TRACE_EVENT(cfg80211_cqm_rssi_notify, |
| 1998 | TP_PROTO(struct net_device *netdev, |
| 1999 | enum nl80211_cqm_rssi_threshold_event rssi_event), |
| 2000 | TP_ARGS(netdev, rssi_event), |
| 2001 | TP_STRUCT__entry( |
| 2002 | NETDEV_ENTRY |
| 2003 | __field(enum nl80211_cqm_rssi_threshold_event, rssi_event) |
| 2004 | ), |
| 2005 | TP_fast_assign( |
| 2006 | NETDEV_ASSIGN; |
| 2007 | __entry->rssi_event = rssi_event; |
| 2008 | ), |
| 2009 | TP_printk(NETDEV_PR_FMT ", rssi event: %d", |
| 2010 | NETDEV_PR_ARG, __entry->rssi_event) |
| 2011 | ); |
| 2012 | |
| 2013 | TRACE_EVENT(cfg80211_can_beacon_sec_chan, |
| 2014 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, |
| 2015 | enum nl80211_channel_type channel_type), |
| 2016 | TP_ARGS(wiphy, channel, channel_type), |
| 2017 | TP_STRUCT__entry( |
| 2018 | WIPHY_ENTRY |
| 2019 | CHAN_ENTRY |
| 2020 | __field(enum nl80211_channel_type, channel_type) |
| 2021 | ), |
| 2022 | TP_fast_assign( |
| 2023 | WIPHY_ASSIGN; |
| 2024 | CHAN_ASSIGN(channel); |
| 2025 | __entry->channel_type = channel_type; |
| 2026 | ), |
| 2027 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT ", channel_type: %d", |
| 2028 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->channel_type) |
| 2029 | ); |
| 2030 | |
| 2031 | TRACE_EVENT(cfg80211_ch_switch_notify, |
| 2032 | TP_PROTO(struct net_device *netdev, int freq, |
| 2033 | enum nl80211_channel_type type), |
| 2034 | TP_ARGS(netdev, freq, type), |
| 2035 | TP_STRUCT__entry( |
| 2036 | NETDEV_ENTRY |
| 2037 | __field(int, freq) |
| 2038 | __field(enum nl80211_channel_type, type) |
| 2039 | ), |
| 2040 | TP_fast_assign( |
| 2041 | NETDEV_ASSIGN; |
| 2042 | __entry->freq = freq; |
| 2043 | __entry->type = type; |
| 2044 | ), |
| 2045 | TP_printk(NETDEV_PR_FMT ", freq: %d, type: %d", NETDEV_PR_ARG, |
| 2046 | __entry->freq, __entry->type) |
| 2047 | ); |
| 2048 | |
| 2049 | DECLARE_EVENT_CLASS(cfg80211_rx_evt, |
| 2050 | TP_PROTO(struct net_device *netdev, const u8 *addr), |
| 2051 | TP_ARGS(netdev, addr), |
| 2052 | TP_STRUCT__entry( |
| 2053 | NETDEV_ENTRY |
| 2054 | MAC_ENTRY(addr) |
| 2055 | ), |
| 2056 | TP_fast_assign( |
| 2057 | NETDEV_ASSIGN; |
| 2058 | MAC_ASSIGN(addr, addr); |
| 2059 | ), |
| 2060 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT, NETDEV_PR_ARG, MAC_PR_ARG(addr)) |
| 2061 | ); |
| 2062 | |
| 2063 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_ibss_joined, |
| 2064 | TP_PROTO(struct net_device *netdev, const u8 *addr), |
| 2065 | TP_ARGS(netdev, addr) |
| 2066 | ); |
| 2067 | |
| 2068 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_spurious_frame, |
| 2069 | TP_PROTO(struct net_device *netdev, const u8 *addr), |
| 2070 | TP_ARGS(netdev, addr) |
| 2071 | ); |
| 2072 | |
| 2073 | DEFINE_EVENT(cfg80211_rx_evt, cfg80211_rx_unexpected_4addr_frame, |
| 2074 | TP_PROTO(struct net_device *netdev, const u8 *addr), |
| 2075 | TP_ARGS(netdev, addr) |
| 2076 | ); |
| 2077 | |
| 2078 | TRACE_EVENT(cfg80211_probe_status, |
| 2079 | TP_PROTO(struct net_device *netdev, const u8 *addr, u64 cookie, |
| 2080 | bool acked), |
| 2081 | TP_ARGS(netdev, addr, cookie, acked), |
| 2082 | TP_STRUCT__entry( |
| 2083 | NETDEV_ENTRY |
| 2084 | MAC_ENTRY(addr) |
| 2085 | __field(u64, cookie) |
| 2086 | __field(bool, acked) |
| 2087 | ), |
| 2088 | TP_fast_assign( |
| 2089 | NETDEV_ASSIGN; |
| 2090 | MAC_ASSIGN(addr, addr); |
| 2091 | __entry->cookie = cookie; |
| 2092 | __entry->acked = acked; |
| 2093 | ), |
| 2094 | TP_printk(NETDEV_PR_FMT MAC_PR_FMT ", cookie: %llu, acked: %s", |
| 2095 | NETDEV_PR_ARG, MAC_PR_ARG(addr), __entry->cookie, |
| 2096 | BOOL_TO_STR(__entry->acked)) |
| 2097 | ); |
| 2098 | |
| 2099 | TRACE_EVENT(cfg80211_cqm_pktloss_notify, |
| 2100 | TP_PROTO(struct net_device *netdev, const u8 *peer, u32 num_packets), |
| 2101 | TP_ARGS(netdev, peer, num_packets), |
| 2102 | TP_STRUCT__entry( |
| 2103 | NETDEV_ENTRY |
| 2104 | MAC_ENTRY(peer) |
| 2105 | __field(u32, num_packets) |
| 2106 | ), |
| 2107 | TP_fast_assign( |
| 2108 | NETDEV_ASSIGN; |
| 2109 | MAC_ASSIGN(peer, peer); |
| 2110 | __entry->num_packets = num_packets; |
| 2111 | ), |
| 2112 | TP_printk(NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", num of lost packets: %u", |
| 2113 | NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->num_packets) |
| 2114 | ); |
| 2115 | |
| 2116 | DEFINE_EVENT(cfg80211_netdev_mac_evt, cfg80211_gtk_rekey_notify, |
| 2117 | TP_PROTO(struct net_device *netdev, const u8 *macaddr), |
| 2118 | TP_ARGS(netdev, macaddr) |
| 2119 | ); |
| 2120 | |
| 2121 | TRACE_EVENT(cfg80211_pmksa_candidate_notify, |
| 2122 | TP_PROTO(struct net_device *netdev, int index, const u8 *bssid, |
| 2123 | bool preauth), |
| 2124 | TP_ARGS(netdev, index, bssid, preauth), |
| 2125 | TP_STRUCT__entry( |
| 2126 | NETDEV_ENTRY |
| 2127 | __field(int, index) |
| 2128 | MAC_ENTRY(bssid) |
| 2129 | __field(bool, preauth) |
| 2130 | ), |
| 2131 | TP_fast_assign( |
| 2132 | NETDEV_ASSIGN; |
| 2133 | __entry->index = index; |
| 2134 | MAC_ASSIGN(bssid, bssid); |
| 2135 | __entry->preauth = preauth; |
| 2136 | ), |
| 2137 | TP_printk(NETDEV_PR_FMT ", index:%d, bssid: " MAC_PR_FMT ", pre auth: %s", |
| 2138 | NETDEV_PR_ARG, __entry->index, MAC_PR_ARG(bssid), |
| 2139 | BOOL_TO_STR(__entry->preauth)) |
| 2140 | ); |
| 2141 | |
| 2142 | TRACE_EVENT(cfg80211_report_obss_beacon, |
| 2143 | TP_PROTO(struct wiphy *wiphy, const u8 *frame, size_t len, |
| 2144 | int freq, int sig_dbm), |
| 2145 | TP_ARGS(wiphy, frame, len, freq, sig_dbm), |
| 2146 | TP_STRUCT__entry( |
| 2147 | WIPHY_ENTRY |
| 2148 | __field(int, freq) |
| 2149 | __field(int, sig_dbm) |
| 2150 | ), |
| 2151 | TP_fast_assign( |
| 2152 | WIPHY_ASSIGN; |
| 2153 | __entry->freq = freq; |
| 2154 | __entry->sig_dbm = sig_dbm; |
| 2155 | ), |
| 2156 | TP_printk(WIPHY_PR_FMT ", freq: %d, sig_dbm: %d", |
| 2157 | WIPHY_PR_ARG, __entry->freq, __entry->sig_dbm) |
| 2158 | ); |
| 2159 | |
Jouni Malinen | 3475b09 | 2012-11-16 22:49:57 +0200 | [diff] [blame^] | 2160 | TRACE_EVENT(cfg80211_tdls_oper_request, |
| 2161 | TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, const u8 *peer, |
| 2162 | enum nl80211_tdls_operation oper, u16 reason_code), |
| 2163 | TP_ARGS(wiphy, netdev, peer, oper, reason_code), |
| 2164 | TP_STRUCT__entry( |
| 2165 | WIPHY_ENTRY |
| 2166 | NETDEV_ENTRY |
| 2167 | MAC_ENTRY(peer) |
| 2168 | __field(enum nl80211_tdls_operation, oper) |
| 2169 | __field(u16, reason_code) |
| 2170 | ), |
| 2171 | TP_fast_assign( |
| 2172 | WIPHY_ASSIGN; |
| 2173 | NETDEV_ASSIGN; |
| 2174 | MAC_ASSIGN(peer, peer); |
| 2175 | __entry->oper = oper; |
| 2176 | __entry->reason_code = reason_code; |
| 2177 | ), |
| 2178 | TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", peer: " MAC_PR_FMT ", oper: %d, reason_code %u", |
| 2179 | WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(peer), __entry->oper, |
| 2180 | __entry->reason_code) |
| 2181 | ); |
| 2182 | |
Beni Lev | 4ee3e06 | 2012-08-27 12:49:39 +0300 | [diff] [blame] | 2183 | TRACE_EVENT(cfg80211_scan_done, |
| 2184 | TP_PROTO(struct cfg80211_scan_request *request, bool aborted), |
| 2185 | TP_ARGS(request, aborted), |
| 2186 | TP_STRUCT__entry( |
| 2187 | __field(u32, n_channels) |
| 2188 | __dynamic_array(u8, ie, request ? request->ie_len : 0) |
| 2189 | __array(u32, rates, IEEE80211_NUM_BANDS) |
| 2190 | __field(u32, wdev_id) |
| 2191 | MAC_ENTRY(wiphy_mac) |
| 2192 | __field(bool, no_cck) |
| 2193 | __field(bool, aborted) |
| 2194 | ), |
| 2195 | TP_fast_assign( |
| 2196 | if (request) { |
| 2197 | memcpy(__get_dynamic_array(ie), request->ie, |
| 2198 | request->ie_len); |
| 2199 | memcpy(__entry->rates, request->rates, |
| 2200 | IEEE80211_NUM_BANDS); |
| 2201 | __entry->wdev_id = request->wdev ? |
| 2202 | request->wdev->identifier : 0; |
| 2203 | if (request->wiphy) |
| 2204 | MAC_ASSIGN(wiphy_mac, |
| 2205 | request->wiphy->perm_addr); |
| 2206 | __entry->no_cck = request->no_cck; |
| 2207 | } |
| 2208 | __entry->aborted = aborted; |
| 2209 | ), |
| 2210 | TP_printk("aborted: %s", BOOL_TO_STR(__entry->aborted)) |
| 2211 | ); |
| 2212 | |
| 2213 | DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_results, |
| 2214 | TP_PROTO(struct wiphy *wiphy), |
| 2215 | TP_ARGS(wiphy) |
| 2216 | ); |
| 2217 | |
| 2218 | DEFINE_EVENT(wiphy_only_evt, cfg80211_sched_scan_stopped, |
| 2219 | TP_PROTO(struct wiphy *wiphy), |
| 2220 | TP_ARGS(wiphy) |
| 2221 | ); |
| 2222 | |
| 2223 | TRACE_EVENT(cfg80211_get_bss, |
| 2224 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, |
| 2225 | const u8 *bssid, const u8 *ssid, size_t ssid_len, |
| 2226 | u16 capa_mask, u16 capa_val), |
| 2227 | TP_ARGS(wiphy, channel, bssid, ssid, ssid_len, capa_mask, capa_val), |
| 2228 | TP_STRUCT__entry( |
| 2229 | WIPHY_ENTRY |
| 2230 | CHAN_ENTRY |
| 2231 | MAC_ENTRY(bssid) |
| 2232 | __dynamic_array(u8, ssid, ssid_len) |
| 2233 | __field(u16, capa_mask) |
| 2234 | __field(u16, capa_val) |
| 2235 | ), |
| 2236 | TP_fast_assign( |
| 2237 | WIPHY_ASSIGN; |
| 2238 | CHAN_ASSIGN(channel); |
| 2239 | MAC_ASSIGN(bssid, bssid); |
| 2240 | memcpy(__get_dynamic_array(ssid), ssid, ssid_len); |
| 2241 | __entry->capa_mask = capa_mask; |
| 2242 | __entry->capa_val = capa_val; |
| 2243 | ), |
| 2244 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT MAC_PR_FMT ", buf: %#.2x, " |
| 2245 | "capa_mask: %d, capa_val: %u", WIPHY_PR_ARG, CHAN_PR_ARG, |
| 2246 | MAC_PR_ARG(bssid), ((u8 *)__get_dynamic_array(ssid))[0], |
| 2247 | __entry->capa_mask, __entry->capa_val) |
| 2248 | ); |
| 2249 | |
| 2250 | TRACE_EVENT(cfg80211_inform_bss_frame, |
| 2251 | TP_PROTO(struct wiphy *wiphy, struct ieee80211_channel *channel, |
| 2252 | struct ieee80211_mgmt *mgmt, size_t len, |
| 2253 | s32 signal), |
| 2254 | TP_ARGS(wiphy, channel, mgmt, len, signal), |
| 2255 | TP_STRUCT__entry( |
| 2256 | WIPHY_ENTRY |
| 2257 | CHAN_ENTRY |
| 2258 | __dynamic_array(u8, mgmt, len) |
| 2259 | __field(s32, signal) |
| 2260 | ), |
| 2261 | TP_fast_assign( |
| 2262 | WIPHY_ASSIGN; |
| 2263 | CHAN_ASSIGN(channel); |
| 2264 | if (mgmt) |
| 2265 | memcpy(__get_dynamic_array(mgmt), mgmt, len); |
| 2266 | __entry->signal = signal; |
| 2267 | ), |
| 2268 | TP_printk(WIPHY_PR_FMT CHAN_PR_FMT "signal: %d", |
| 2269 | WIPHY_PR_ARG, CHAN_PR_ARG, __entry->signal) |
| 2270 | ); |
| 2271 | |
| 2272 | DECLARE_EVENT_CLASS(cfg80211_bss_evt, |
| 2273 | TP_PROTO(struct cfg80211_bss *pub), |
| 2274 | TP_ARGS(pub), |
| 2275 | TP_STRUCT__entry( |
| 2276 | MAC_ENTRY(bssid) |
| 2277 | CHAN_ENTRY |
| 2278 | ), |
| 2279 | TP_fast_assign( |
| 2280 | MAC_ASSIGN(bssid, pub->bssid); |
| 2281 | CHAN_ASSIGN(pub->channel); |
| 2282 | ), |
| 2283 | TP_printk(MAC_PR_FMT CHAN_PR_FMT, MAC_PR_ARG(bssid), CHAN_PR_ARG) |
| 2284 | ); |
| 2285 | |
| 2286 | DEFINE_EVENT(cfg80211_bss_evt, cfg80211_return_bss, |
| 2287 | TP_PROTO(struct cfg80211_bss *pub), |
| 2288 | TP_ARGS(pub) |
| 2289 | ); |
| 2290 | |
| 2291 | TRACE_EVENT(cfg80211_return_uint, |
| 2292 | TP_PROTO(unsigned int ret), |
| 2293 | TP_ARGS(ret), |
| 2294 | TP_STRUCT__entry( |
| 2295 | __field(unsigned int, ret) |
| 2296 | ), |
| 2297 | TP_fast_assign( |
| 2298 | __entry->ret = ret; |
| 2299 | ), |
| 2300 | TP_printk("ret: %d", __entry->ret) |
| 2301 | ); |
| 2302 | |
| 2303 | TRACE_EVENT(cfg80211_return_u32, |
| 2304 | TP_PROTO(u32 ret), |
| 2305 | TP_ARGS(ret), |
| 2306 | TP_STRUCT__entry( |
| 2307 | __field(u32, ret) |
| 2308 | ), |
| 2309 | TP_fast_assign( |
| 2310 | __entry->ret = ret; |
| 2311 | ), |
| 2312 | TP_printk("ret: %u", __entry->ret) |
| 2313 | ); |
| 2314 | |
Beni Lev | 14e8a3c | 2012-07-31 18:48:27 +0300 | [diff] [blame] | 2315 | #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ |
| 2316 | |
| 2317 | #undef TRACE_INCLUDE_PATH |
| 2318 | #define TRACE_INCLUDE_PATH . |
| 2319 | #undef TRACE_INCLUDE_FILE |
| 2320 | #define TRACE_INCLUDE_FILE trace |
| 2321 | #include <trace/define_trace.h> |