1 --- a/drivers/net/wireless/ath/ath5k/debug.c
2 +++ b/drivers/net/wireless/ath/ath5k/debug.c
3 @@ -888,64 +888,37 @@ static const struct file_operations fops
5 ath5k_debug_init_device(struct ath5k_softc *sc)
7 + struct dentry *phydir;
9 sc->debug.level = ath5k_debug;
11 - sc->debug.debugfs_phydir = debugfs_create_dir("ath5k",
12 - sc->hw->wiphy->debugfsdir);
13 + phydir = debugfs_create_dir("ath5k", sc->hw->wiphy->debugfsdir);
17 - sc->debug.debugfs_debug = debugfs_create_file("debug",
19 - sc->debug.debugfs_phydir, sc, &fops_debug);
21 - sc->debug.debugfs_registers = debugfs_create_file("registers", S_IRUSR,
22 - sc->debug.debugfs_phydir, sc, &fops_registers);
24 - sc->debug.debugfs_beacon = debugfs_create_file("beacon",
26 - sc->debug.debugfs_phydir, sc, &fops_beacon);
28 - sc->debug.debugfs_reset = debugfs_create_file("reset", S_IWUSR,
29 - sc->debug.debugfs_phydir, sc, &fops_reset);
31 - sc->debug.debugfs_antenna = debugfs_create_file("antenna",
33 - sc->debug.debugfs_phydir, sc, &fops_antenna);
35 - sc->debug.debugfs_misc = debugfs_create_file("misc",
37 - sc->debug.debugfs_phydir, sc, &fops_misc);
39 - sc->debug.debugfs_frameerrors = debugfs_create_file("frameerrors",
41 - sc->debug.debugfs_phydir, sc,
44 - sc->debug.debugfs_ani = debugfs_create_file("ani",
46 - sc->debug.debugfs_phydir, sc,
49 - sc->debug.debugfs_queue = debugfs_create_file("queue",
51 - sc->debug.debugfs_phydir, sc,
54 + debugfs_create_file("debug", S_IWUSR | S_IRUSR, phydir, sc,
58 -ath5k_debug_finish_device(struct ath5k_softc *sc)
60 - debugfs_remove(sc->debug.debugfs_debug);
61 - debugfs_remove(sc->debug.debugfs_registers);
62 - debugfs_remove(sc->debug.debugfs_beacon);
63 - debugfs_remove(sc->debug.debugfs_reset);
64 - debugfs_remove(sc->debug.debugfs_antenna);
65 - debugfs_remove(sc->debug.debugfs_misc);
66 - debugfs_remove(sc->debug.debugfs_frameerrors);
67 - debugfs_remove(sc->debug.debugfs_ani);
68 - debugfs_remove(sc->debug.debugfs_queue);
69 - debugfs_remove(sc->debug.debugfs_phydir);
71 + debugfs_create_file("registers", S_IRUSR, phydir, sc, &fops_registers);
73 + debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, sc,
76 + debugfs_create_file("reset", S_IWUSR, phydir, sc, &fops_reset);
78 + debugfs_create_file("antenna", S_IWUSR | S_IRUSR, phydir, sc,
81 + debugfs_create_file("misc", S_IRUSR, phydir, sc, &fops_misc);
83 + debugfs_create_file("frameerrors", S_IWUSR | S_IRUSR, phydir, sc,
86 + debugfs_create_file("ani", S_IWUSR | S_IRUSR, phydir, sc, &fops_ani);
88 + debugfs_create_file("queue", S_IWUSR | S_IRUSR, phydir, sc,
92 /* functions used in other places */
94 --- a/drivers/net/wireless/ath/ath5k/debug.h
95 +++ b/drivers/net/wireless/ath/ath5k/debug.h
96 @@ -68,17 +68,6 @@ struct ath5k_buf;
98 struct ath5k_dbg_info {
99 unsigned int level; /* debug level */
100 - /* debugfs entries */
101 - struct dentry *debugfs_phydir;
102 - struct dentry *debugfs_debug;
103 - struct dentry *debugfs_registers;
104 - struct dentry *debugfs_beacon;
105 - struct dentry *debugfs_reset;
106 - struct dentry *debugfs_antenna;
107 - struct dentry *debugfs_misc;
108 - struct dentry *debugfs_frameerrors;
109 - struct dentry *debugfs_ani;
110 - struct dentry *debugfs_queue;
114 @@ -141,9 +130,6 @@ void
115 ath5k_debug_init_device(struct ath5k_softc *sc);
118 -ath5k_debug_finish_device(struct ath5k_softc *sc);
121 ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah);
124 @@ -167,9 +153,6 @@ static inline void
125 ath5k_debug_init_device(struct ath5k_softc *sc) {}
128 -ath5k_debug_finish_device(struct ath5k_softc *sc) {}
131 ath5k_debug_printrxbuffs(struct ath5k_softc *sc, struct ath5k_hw *ah) {}
134 --- a/drivers/net/wireless/ath/ath5k/base.c
135 +++ b/drivers/net/wireless/ath/ath5k/base.c
136 @@ -2901,7 +2901,6 @@ ath5k_deinit_softc(struct ath5k_softc *s
137 * XXX: ??? detach ath5k_hw ???
138 * Other than that, it's straightforward...
140 - ath5k_debug_finish_device(sc);
141 ieee80211_unregister_hw(hw);
143 ath5k_txq_release(sc);