diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-10-27 07:59:03 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-30 16:49:18 -0400 |
commit | 7bcfaf2f431c09c51fe776fc06638b25d3b421c5 (patch) | |
tree | 27f767335566826f11f0134b97ee76b58d9bcf90 /net/mac80211/ieee80211_i.h | |
parent | 2c0d6100da3ee9b0f0cc46add9bb8a8161299a92 (diff) |
cfg80211/mac80211: use debugfs_remove_recursive
We can save a lot of code and pointers in the structs
by using debugfs_remove_recursive().
First, change cfg80211 to use debugfs_remove_recursive()
so that drivers do not need to clean up any files they
added to the per-wiphy debugfs (if and only if they are
ok to be accessed until after wiphy_unregister!).
Then also make mac80211 use debugfs_remove_recursive()
where necessary -- it need not remove per-wiphy files
as cfg80211 now removes those, but netdev etc. files
still need to be handled but can now be removed without
needing struct dentry pointers to all of them.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/ieee80211_i.h')
-rw-r--r-- | net/mac80211/ieee80211_i.h | 114 |
1 files changed, 2 insertions, 112 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 588005c84a6d..60c2822802f0 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -471,74 +471,11 @@ struct ieee80211_sub_if_data { | |||
471 | } u; | 471 | } u; |
472 | 472 | ||
473 | #ifdef CONFIG_MAC80211_DEBUGFS | 473 | #ifdef CONFIG_MAC80211_DEBUGFS |
474 | struct dentry *debugfsdir; | ||
475 | union { | ||
476 | struct { | ||
477 | struct dentry *drop_unencrypted; | ||
478 | struct dentry *bssid; | ||
479 | struct dentry *aid; | ||
480 | struct dentry *capab; | ||
481 | struct dentry *force_unicast_rateidx; | ||
482 | struct dentry *max_ratectrl_rateidx; | ||
483 | } sta; | ||
484 | struct { | ||
485 | struct dentry *drop_unencrypted; | ||
486 | struct dentry *num_sta_ps; | ||
487 | struct dentry *dtim_count; | ||
488 | struct dentry *force_unicast_rateidx; | ||
489 | struct dentry *max_ratectrl_rateidx; | ||
490 | struct dentry *num_buffered_multicast; | ||
491 | } ap; | ||
492 | struct { | ||
493 | struct dentry *drop_unencrypted; | ||
494 | struct dentry *peer; | ||
495 | struct dentry *force_unicast_rateidx; | ||
496 | struct dentry *max_ratectrl_rateidx; | ||
497 | } wds; | ||
498 | struct { | ||
499 | struct dentry *drop_unencrypted; | ||
500 | struct dentry *force_unicast_rateidx; | ||
501 | struct dentry *max_ratectrl_rateidx; | ||
502 | } vlan; | ||
503 | struct { | ||
504 | struct dentry *mode; | ||
505 | } monitor; | ||
506 | } debugfs; | ||
507 | struct { | 474 | struct { |
475 | struct dentry *dir; | ||
508 | struct dentry *default_key; | 476 | struct dentry *default_key; |
509 | struct dentry *default_mgmt_key; | 477 | struct dentry *default_mgmt_key; |
510 | } common_debugfs; | 478 | } debugfs; |
511 | |||
512 | #ifdef CONFIG_MAC80211_MESH | ||
513 | struct dentry *mesh_stats_dir; | ||
514 | struct { | ||
515 | struct dentry *fwded_mcast; | ||
516 | struct dentry *fwded_unicast; | ||
517 | struct dentry *fwded_frames; | ||
518 | struct dentry *dropped_frames_ttl; | ||
519 | struct dentry *dropped_frames_no_route; | ||
520 | struct dentry *estab_plinks; | ||
521 | struct timer_list mesh_path_timer; | ||
522 | } mesh_stats; | ||
523 | |||
524 | struct dentry *mesh_config_dir; | ||
525 | struct { | ||
526 | struct dentry *dot11MeshRetryTimeout; | ||
527 | struct dentry *dot11MeshConfirmTimeout; | ||
528 | struct dentry *dot11MeshHoldingTimeout; | ||
529 | struct dentry *dot11MeshMaxRetries; | ||
530 | struct dentry *dot11MeshTTL; | ||
531 | struct dentry *auto_open_plinks; | ||
532 | struct dentry *dot11MeshMaxPeerLinks; | ||
533 | struct dentry *dot11MeshHWMPactivePathTimeout; | ||
534 | struct dentry *dot11MeshHWMPpreqMinInterval; | ||
535 | struct dentry *dot11MeshHWMPnetDiameterTraversalTime; | ||
536 | struct dentry *dot11MeshHWMPmaxPREQretries; | ||
537 | struct dentry *path_refresh_time; | ||
538 | struct dentry *min_discovery_timeout; | ||
539 | } mesh_config; | ||
540 | #endif | ||
541 | |||
542 | #endif | 479 | #endif |
543 | /* must be last, dynamically sized area in this! */ | 480 | /* must be last, dynamically sized area in this! */ |
544 | struct ieee80211_vif vif; | 481 | struct ieee80211_vif vif; |
@@ -818,53 +755,6 @@ struct ieee80211_local { | |||
818 | #ifdef CONFIG_MAC80211_DEBUGFS | 755 | #ifdef CONFIG_MAC80211_DEBUGFS |
819 | struct local_debugfsdentries { | 756 | struct local_debugfsdentries { |
820 | struct dentry *rcdir; | 757 | struct dentry *rcdir; |
821 | struct dentry *rcname; | ||
822 | struct dentry *frequency; | ||
823 | struct dentry *total_ps_buffered; | ||
824 | struct dentry *wep_iv; | ||
825 | struct dentry *tsf; | ||
826 | struct dentry *queues; | ||
827 | struct dentry *reset; | ||
828 | struct dentry *noack; | ||
829 | struct dentry *statistics; | ||
830 | struct local_debugfsdentries_statsdentries { | ||
831 | struct dentry *transmitted_fragment_count; | ||
832 | struct dentry *multicast_transmitted_frame_count; | ||
833 | struct dentry *failed_count; | ||
834 | struct dentry *retry_count; | ||
835 | struct dentry *multiple_retry_count; | ||
836 | struct dentry *frame_duplicate_count; | ||
837 | struct dentry *received_fragment_count; | ||
838 | struct dentry *multicast_received_frame_count; | ||
839 | struct dentry *transmitted_frame_count; | ||
840 | struct dentry *wep_undecryptable_count; | ||
841 | struct dentry *num_scans; | ||
842 | #ifdef CONFIG_MAC80211_DEBUG_COUNTERS | ||
843 | struct dentry *tx_handlers_drop; | ||
844 | struct dentry *tx_handlers_queued; | ||
845 | struct dentry *tx_handlers_drop_unencrypted; | ||
846 | struct dentry *tx_handlers_drop_fragment; | ||
847 | struct dentry *tx_handlers_drop_wep; | ||
848 | struct dentry *tx_handlers_drop_not_assoc; | ||
849 | struct dentry *tx_handlers_drop_unauth_port; | ||
850 | struct dentry *rx_handlers_drop; | ||
851 | struct dentry *rx_handlers_queued; | ||
852 | struct dentry *rx_handlers_drop_nullfunc; | ||
853 | struct dentry *rx_handlers_drop_defrag; | ||
854 | struct dentry *rx_handlers_drop_short; | ||
855 | struct dentry *rx_handlers_drop_passive_scan; | ||
856 | struct dentry *tx_expand_skb_head; | ||
857 | struct dentry *tx_expand_skb_head_cloned; | ||
858 | struct dentry *rx_expand_skb_head; | ||
859 | struct dentry *rx_expand_skb_head2; | ||
860 | struct dentry *rx_handlers_fragments; | ||
861 | struct dentry *tx_status_drop; | ||
862 | #endif | ||
863 | struct dentry *dot11ACKFailureCount; | ||
864 | struct dentry *dot11RTSFailureCount; | ||
865 | struct dentry *dot11FCSErrorCount; | ||
866 | struct dentry *dot11RTSSuccessCount; | ||
867 | } stats; | ||
868 | struct dentry *stations; | 758 | struct dentry *stations; |
869 | struct dentry *keys; | 759 | struct dentry *keys; |
870 | } debugfs; | 760 | } debugfs; |