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