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