diff options
author | Luciano Coelho <coelho@ti.com> | 2012-05-10 05:14:19 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-06-05 08:58:59 -0400 |
commit | ad62d81a9e5262555de0501329bd635f5886124f (patch) | |
tree | be56929dacc0a99dc45eb9603aa0312da22872cd /drivers | |
parent | 7b03c306da4a5ae415036a16b1a5844ca42e2778 (diff) |
wlcore/wl12xx/wl18xx: move lower driver debugfs to a subdir
Instead of adding more files from the lower drivers into the same
directory in debugfs as wlcore, we now add a subdirectory for the
lower driver. This makes things a bit easier, because we can quickly
see where the debugfs entry is implemented and what is specific to the
lower driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Signed-off-by: Arik Nemtsov <arik@wizery.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/debugfs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/debugfs.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/ti/wl18xx/main.c | 7 |
4 files changed, 18 insertions, 16 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/debugfs.c b/drivers/net/wireless/ti/wl12xx/debugfs.c index 311703d5af84..0521cbf858cf 100644 --- a/drivers/net/wireless/ti/wl12xx/debugfs.c +++ b/drivers/net/wireless/ti/wl12xx/debugfs.c | |||
@@ -126,9 +126,15 @@ int wl12xx_debugfs_add_files(struct wl1271 *wl, | |||
126 | struct dentry *rootdir) | 126 | struct dentry *rootdir) |
127 | { | 127 | { |
128 | int ret = 0; | 128 | int ret = 0; |
129 | struct dentry *entry, *stats; | 129 | struct dentry *entry, *stats, *moddir; |
130 | 130 | ||
131 | stats = debugfs_create_dir("wl12xx_fw_stats", rootdir); | 131 | moddir = debugfs_create_dir(KBUILD_MODNAME, rootdir); |
132 | if (!moddir || IS_ERR(moddir)) { | ||
133 | entry = moddir; | ||
134 | goto err; | ||
135 | } | ||
136 | |||
137 | stats = debugfs_create_dir("fw_stats", moddir); | ||
132 | if (!stats || IS_ERR(stats)) { | 138 | if (!stats || IS_ERR(stats)) { |
133 | entry = stats; | 139 | entry = stats; |
134 | goto err; | 140 | goto err; |
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index 2ac840783551..ba5afa46a430 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c | |||
@@ -1360,11 +1360,6 @@ out: | |||
1360 | return ret; | 1360 | return ret; |
1361 | } | 1361 | } |
1362 | 1362 | ||
1363 | static int wl12xx_debugfs_init(struct wl1271 *wl, struct dentry *rootdir) | ||
1364 | { | ||
1365 | return wl12xx_debugfs_add_files(wl, rootdir); | ||
1366 | } | ||
1367 | |||
1368 | static struct wlcore_ops wl12xx_ops = { | 1363 | static struct wlcore_ops wl12xx_ops = { |
1369 | .identify_chip = wl12xx_identify_chip, | 1364 | .identify_chip = wl12xx_identify_chip, |
1370 | .identify_fw = wl12xx_identify_fw, | 1365 | .identify_fw = wl12xx_identify_fw, |
@@ -1387,7 +1382,7 @@ static struct wlcore_ops wl12xx_ops = { | |||
1387 | .set_tx_desc_csum = wl12xx_set_tx_desc_csum, | 1382 | .set_tx_desc_csum = wl12xx_set_tx_desc_csum, |
1388 | .set_rx_csum = NULL, | 1383 | .set_rx_csum = NULL, |
1389 | .ap_get_mimo_wide_rate_mask = NULL, | 1384 | .ap_get_mimo_wide_rate_mask = NULL, |
1390 | .debugfs_init = wl12xx_debugfs_init, | 1385 | .debugfs_init = wl12xx_debugfs_add_files, |
1391 | }; | 1386 | }; |
1392 | 1387 | ||
1393 | static struct ieee80211_sta_ht_cap wl12xx_ht_cap = { | 1388 | static struct ieee80211_sta_ht_cap wl12xx_ht_cap = { |
diff --git a/drivers/net/wireless/ti/wl18xx/debugfs.c b/drivers/net/wireless/ti/wl18xx/debugfs.c index 8354dfc64bd8..f4127bfb9642 100644 --- a/drivers/net/wireless/ti/wl18xx/debugfs.c +++ b/drivers/net/wireless/ti/wl18xx/debugfs.c | |||
@@ -181,9 +181,15 @@ int wl18xx_debugfs_add_files(struct wl1271 *wl, | |||
181 | struct dentry *rootdir) | 181 | struct dentry *rootdir) |
182 | { | 182 | { |
183 | int ret = 0; | 183 | int ret = 0; |
184 | struct dentry *entry, *stats; | 184 | struct dentry *entry, *stats, *moddir; |
185 | 185 | ||
186 | stats = debugfs_create_dir("wl18xx_fw_stats", rootdir); | 186 | moddir = debugfs_create_dir(KBUILD_MODNAME, rootdir); |
187 | if (!moddir || IS_ERR(moddir)) { | ||
188 | entry = moddir; | ||
189 | goto err; | ||
190 | } | ||
191 | |||
192 | stats = debugfs_create_dir("fw_stats", moddir); | ||
187 | if (!stats || IS_ERR(stats)) { | 193 | if (!stats || IS_ERR(stats)) { |
188 | entry = stats; | 194 | entry = stats; |
189 | goto err; | 195 | goto err; |
diff --git a/drivers/net/wireless/ti/wl18xx/main.c b/drivers/net/wireless/ti/wl18xx/main.c index 524f44c4b991..27cd9b8a6e85 100644 --- a/drivers/net/wireless/ti/wl18xx/main.c +++ b/drivers/net/wireless/ti/wl18xx/main.c | |||
@@ -1022,11 +1022,6 @@ static void wl18xx_get_mac(struct wl1271 *wl) | |||
1022 | wlcore_set_partition(wl, &wl->ptable[PART_DOWN]); | 1022 | wlcore_set_partition(wl, &wl->ptable[PART_DOWN]); |
1023 | } | 1023 | } |
1024 | 1024 | ||
1025 | static int wl18xx_debugfs_init(struct wl1271 *wl, struct dentry *rootdir) | ||
1026 | { | ||
1027 | return wl18xx_debugfs_add_files(wl, rootdir); | ||
1028 | } | ||
1029 | |||
1030 | static int wl18xx_handle_static_data(struct wl1271 *wl, | 1025 | static int wl18xx_handle_static_data(struct wl1271 *wl, |
1031 | struct wl1271_static_data *static_data) | 1026 | struct wl1271_static_data *static_data) |
1032 | { | 1027 | { |
@@ -1058,7 +1053,7 @@ static struct wlcore_ops wl18xx_ops = { | |||
1058 | .sta_get_ap_rate_mask = wl18xx_sta_get_ap_rate_mask, | 1053 | .sta_get_ap_rate_mask = wl18xx_sta_get_ap_rate_mask, |
1059 | .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask, | 1054 | .ap_get_mimo_wide_rate_mask = wl18xx_ap_get_mimo_wide_rate_mask, |
1060 | .get_mac = wl18xx_get_mac, | 1055 | .get_mac = wl18xx_get_mac, |
1061 | .debugfs_init = wl18xx_debugfs_init, | 1056 | .debugfs_init = wl18xx_debugfs_add_files, |
1062 | .handle_static_data = wl18xx_handle_static_data, | 1057 | .handle_static_data = wl18xx_handle_static_data, |
1063 | }; | 1058 | }; |
1064 | 1059 | ||