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

cfg80211: sort tracing properly

There were supposed to be two blocks - one for each direction
cfg80211 <-> driver, clean up the code to restore that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+134 -134
+134 -134
net/wireless/trace.h
··· 2368 2368 __entry->bssid, __entry->ssid, __entry->status) 2369 2369 ); 2370 2370 2371 + TRACE_EVENT(rdev_start_radar_detection, 2372 + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 2373 + struct cfg80211_chan_def *chandef, 2374 + u32 cac_time_ms), 2375 + TP_ARGS(wiphy, netdev, chandef, cac_time_ms), 2376 + TP_STRUCT__entry( 2377 + WIPHY_ENTRY 2378 + NETDEV_ENTRY 2379 + CHAN_DEF_ENTRY 2380 + __field(u32, cac_time_ms) 2381 + ), 2382 + TP_fast_assign( 2383 + WIPHY_ASSIGN; 2384 + NETDEV_ASSIGN; 2385 + CHAN_DEF_ASSIGN(chandef); 2386 + __entry->cac_time_ms = cac_time_ms; 2387 + ), 2388 + TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT 2389 + ", cac_time_ms=%u", 2390 + WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, 2391 + __entry->cac_time_ms) 2392 + ); 2393 + 2394 + TRACE_EVENT(rdev_set_mcast_rate, 2395 + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 2396 + int *mcast_rate), 2397 + TP_ARGS(wiphy, netdev, mcast_rate), 2398 + TP_STRUCT__entry( 2399 + WIPHY_ENTRY 2400 + NETDEV_ENTRY 2401 + __array(int, mcast_rate, NUM_NL80211_BANDS) 2402 + ), 2403 + TP_fast_assign( 2404 + WIPHY_ASSIGN; 2405 + NETDEV_ASSIGN; 2406 + memcpy(__entry->mcast_rate, mcast_rate, 2407 + sizeof(int) * NUM_NL80211_BANDS); 2408 + ), 2409 + TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " 2410 + "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]", 2411 + WIPHY_PR_ARG, NETDEV_PR_ARG, 2412 + __entry->mcast_rate[NL80211_BAND_2GHZ], 2413 + __entry->mcast_rate[NL80211_BAND_5GHZ], 2414 + __entry->mcast_rate[NL80211_BAND_60GHZ]) 2415 + ); 2416 + 2417 + TRACE_EVENT(rdev_set_coalesce, 2418 + TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce), 2419 + TP_ARGS(wiphy, coalesce), 2420 + TP_STRUCT__entry( 2421 + WIPHY_ENTRY 2422 + __field(int, n_rules) 2423 + ), 2424 + TP_fast_assign( 2425 + WIPHY_ASSIGN; 2426 + __entry->n_rules = coalesce ? coalesce->n_rules : 0; 2427 + ), 2428 + TP_printk(WIPHY_PR_FMT ", n_rules=%d", 2429 + WIPHY_PR_ARG, __entry->n_rules) 2430 + ); 2431 + 2432 + DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan, 2433 + TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 2434 + TP_ARGS(wiphy, wdev) 2435 + ); 2436 + 2437 + TRACE_EVENT(rdev_set_multicast_to_unicast, 2438 + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 2439 + const bool enabled), 2440 + TP_ARGS(wiphy, netdev, enabled), 2441 + TP_STRUCT__entry( 2442 + WIPHY_ENTRY 2443 + NETDEV_ENTRY 2444 + __field(bool, enabled) 2445 + ), 2446 + TP_fast_assign( 2447 + WIPHY_ASSIGN; 2448 + NETDEV_ASSIGN; 2449 + __entry->enabled = enabled; 2450 + ), 2451 + TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s", 2452 + WIPHY_PR_ARG, NETDEV_PR_ARG, 2453 + BOOL_TO_STR(__entry->enabled)) 2454 + ); 2455 + 2456 + DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats, 2457 + TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 2458 + TP_ARGS(wiphy, wdev) 2459 + ); 2460 + 2461 + TRACE_EVENT(rdev_get_ftm_responder_stats, 2462 + TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 2463 + struct cfg80211_ftm_responder_stats *ftm_stats), 2464 + 2465 + TP_ARGS(wiphy, netdev, ftm_stats), 2466 + 2467 + TP_STRUCT__entry( 2468 + WIPHY_ENTRY 2469 + NETDEV_ENTRY 2470 + __field(u64, timestamp) 2471 + __field(u32, success_num) 2472 + __field(u32, partial_num) 2473 + __field(u32, failed_num) 2474 + __field(u32, asap_num) 2475 + __field(u32, non_asap_num) 2476 + __field(u64, duration) 2477 + __field(u32, unknown_triggers) 2478 + __field(u32, reschedule) 2479 + __field(u32, out_of_window) 2480 + ), 2481 + 2482 + TP_fast_assign( 2483 + WIPHY_ASSIGN; 2484 + NETDEV_ASSIGN; 2485 + __entry->success_num = ftm_stats->success_num; 2486 + __entry->partial_num = ftm_stats->partial_num; 2487 + __entry->failed_num = ftm_stats->failed_num; 2488 + __entry->asap_num = ftm_stats->asap_num; 2489 + __entry->non_asap_num = ftm_stats->non_asap_num; 2490 + __entry->duration = ftm_stats->total_duration_ms; 2491 + __entry->unknown_triggers = ftm_stats->unknown_triggers_num; 2492 + __entry->reschedule = ftm_stats->reschedule_requests_num; 2493 + __entry->out_of_window = ftm_stats->out_of_window_triggers_num; 2494 + ), 2495 + 2496 + TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, " 2497 + "failed %u, asap %u, non asap %u, total duration %llu, unknown " 2498 + "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG, 2499 + __entry->success_num, __entry->partial_num, __entry->failed_num, 2500 + __entry->asap_num, __entry->non_asap_num, __entry->duration, 2501 + __entry->unknown_triggers, __entry->reschedule, 2502 + __entry->out_of_window) 2503 + ); 2504 + 2371 2505 /************************************************************* 2372 2506 * cfg80211 exported functions traces * 2373 2507 *************************************************************/ ··· 3293 3159 ), 3294 3160 TP_printk(WIPHY_PR_FMT ", " WDEV_PR_FMT, 3295 3161 WIPHY_PR_ARG, WDEV_PR_ARG) 3296 - ); 3297 - 3298 - TRACE_EVENT(rdev_start_radar_detection, 3299 - TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 3300 - struct cfg80211_chan_def *chandef, 3301 - u32 cac_time_ms), 3302 - TP_ARGS(wiphy, netdev, chandef, cac_time_ms), 3303 - TP_STRUCT__entry( 3304 - WIPHY_ENTRY 3305 - NETDEV_ENTRY 3306 - CHAN_DEF_ENTRY 3307 - __field(u32, cac_time_ms) 3308 - ), 3309 - TP_fast_assign( 3310 - WIPHY_ASSIGN; 3311 - NETDEV_ASSIGN; 3312 - CHAN_DEF_ASSIGN(chandef); 3313 - __entry->cac_time_ms = cac_time_ms; 3314 - ), 3315 - TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT 3316 - ", cac_time_ms=%u", 3317 - WIPHY_PR_ARG, NETDEV_PR_ARG, CHAN_DEF_PR_ARG, 3318 - __entry->cac_time_ms) 3319 - ); 3320 - 3321 - TRACE_EVENT(rdev_set_mcast_rate, 3322 - TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 3323 - int *mcast_rate), 3324 - TP_ARGS(wiphy, netdev, mcast_rate), 3325 - TP_STRUCT__entry( 3326 - WIPHY_ENTRY 3327 - NETDEV_ENTRY 3328 - __array(int, mcast_rate, NUM_NL80211_BANDS) 3329 - ), 3330 - TP_fast_assign( 3331 - WIPHY_ASSIGN; 3332 - NETDEV_ASSIGN; 3333 - memcpy(__entry->mcast_rate, mcast_rate, 3334 - sizeof(int) * NUM_NL80211_BANDS); 3335 - ), 3336 - TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", " 3337 - "mcast_rates [2.4GHz=0x%x, 5.2GHz=0x%x, 60GHz=0x%x]", 3338 - WIPHY_PR_ARG, NETDEV_PR_ARG, 3339 - __entry->mcast_rate[NL80211_BAND_2GHZ], 3340 - __entry->mcast_rate[NL80211_BAND_5GHZ], 3341 - __entry->mcast_rate[NL80211_BAND_60GHZ]) 3342 - ); 3343 - 3344 - TRACE_EVENT(rdev_set_coalesce, 3345 - TP_PROTO(struct wiphy *wiphy, struct cfg80211_coalesce *coalesce), 3346 - TP_ARGS(wiphy, coalesce), 3347 - TP_STRUCT__entry( 3348 - WIPHY_ENTRY 3349 - __field(int, n_rules) 3350 - ), 3351 - TP_fast_assign( 3352 - WIPHY_ASSIGN; 3353 - __entry->n_rules = coalesce ? coalesce->n_rules : 0; 3354 - ), 3355 - TP_printk(WIPHY_PR_FMT ", n_rules=%d", 3356 - WIPHY_PR_ARG, __entry->n_rules) 3357 - ); 3358 - 3359 - DEFINE_EVENT(wiphy_wdev_evt, rdev_abort_scan, 3360 - TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 3361 - TP_ARGS(wiphy, wdev) 3362 - ); 3363 - 3364 - TRACE_EVENT(rdev_set_multicast_to_unicast, 3365 - TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 3366 - const bool enabled), 3367 - TP_ARGS(wiphy, netdev, enabled), 3368 - TP_STRUCT__entry( 3369 - WIPHY_ENTRY 3370 - NETDEV_ENTRY 3371 - __field(bool, enabled) 3372 - ), 3373 - TP_fast_assign( 3374 - WIPHY_ASSIGN; 3375 - NETDEV_ASSIGN; 3376 - __entry->enabled = enabled; 3377 - ), 3378 - TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", unicast: %s", 3379 - WIPHY_PR_ARG, NETDEV_PR_ARG, 3380 - BOOL_TO_STR(__entry->enabled)) 3381 - ); 3382 - 3383 - DEFINE_EVENT(wiphy_wdev_evt, rdev_get_txq_stats, 3384 - TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev), 3385 - TP_ARGS(wiphy, wdev) 3386 - ); 3387 - 3388 - TRACE_EVENT(rdev_get_ftm_responder_stats, 3389 - TP_PROTO(struct wiphy *wiphy, struct net_device *netdev, 3390 - struct cfg80211_ftm_responder_stats *ftm_stats), 3391 - 3392 - TP_ARGS(wiphy, netdev, ftm_stats), 3393 - 3394 - TP_STRUCT__entry( 3395 - WIPHY_ENTRY 3396 - NETDEV_ENTRY 3397 - __field(u64, timestamp) 3398 - __field(u32, success_num) 3399 - __field(u32, partial_num) 3400 - __field(u32, failed_num) 3401 - __field(u32, asap_num) 3402 - __field(u32, non_asap_num) 3403 - __field(u64, duration) 3404 - __field(u32, unknown_triggers) 3405 - __field(u32, reschedule) 3406 - __field(u32, out_of_window) 3407 - ), 3408 - 3409 - TP_fast_assign( 3410 - WIPHY_ASSIGN; 3411 - NETDEV_ASSIGN; 3412 - __entry->success_num = ftm_stats->success_num; 3413 - __entry->partial_num = ftm_stats->partial_num; 3414 - __entry->failed_num = ftm_stats->failed_num; 3415 - __entry->asap_num = ftm_stats->asap_num; 3416 - __entry->non_asap_num = ftm_stats->non_asap_num; 3417 - __entry->duration = ftm_stats->total_duration_ms; 3418 - __entry->unknown_triggers = ftm_stats->unknown_triggers_num; 3419 - __entry->reschedule = ftm_stats->reschedule_requests_num; 3420 - __entry->out_of_window = ftm_stats->out_of_window_triggers_num; 3421 - ), 3422 - 3423 - TP_printk(WIPHY_PR_FMT "Ftm responder stats: success %u, partial %u, " 3424 - "failed %u, asap %u, non asap %u, total duration %llu, unknown " 3425 - "triggers %u, rescheduled %u, out of window %u", WIPHY_PR_ARG, 3426 - __entry->success_num, __entry->partial_num, __entry->failed_num, 3427 - __entry->asap_num, __entry->non_asap_num, __entry->duration, 3428 - __entry->unknown_triggers, __entry->reschedule, 3429 - __entry->out_of_window) 3430 3162 ); 3431 3163 #endif /* !__RDEV_OPS_TRACE || TRACE_HEADER_MULTI_READ */ 3432 3164