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