]>
Commit | Line | Data |
---|---|---|
04672fe6 | 1 | // SPDX-License-Identifier: GPL-2.0-only |
617209cc IPG |
2 | /* |
3 | * Linux WiMAX | |
4 | * Debugfs support | |
5 | * | |
617209cc IPG |
6 | * Copyright (C) 2005-2006 Intel Corporation <linux-wimax@intel.com> |
7 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | |
617209cc IPG |
8 | */ |
9 | #include <linux/debugfs.h> | |
10 | #include <linux/wimax.h> | |
11 | #include "wimax-internal.h" | |
12 | ||
13 | #define D_SUBMODULE debugfs | |
14 | #include "debug-levels.h" | |
15 | ||
a62052ba | 16 | void wimax_debugfs_add(struct wimax_dev *wimax_dev) |
617209cc | 17 | { |
617209cc | 18 | struct net_device *net_dev = wimax_dev->net_dev; |
617209cc IPG |
19 | struct dentry *dentry; |
20 | char buf[128]; | |
21 | ||
22 | snprintf(buf, sizeof(buf), "wimax:%s", net_dev->name); | |
23 | dentry = debugfs_create_dir(buf, NULL); | |
617209cc | 24 | wimax_dev->debugfs_dentry = dentry; |
617209cc | 25 | |
a62052ba GKH |
26 | d_level_register_debugfs("wimax_dl_", debugfs, dentry); |
27 | d_level_register_debugfs("wimax_dl_", id_table, dentry); | |
28 | d_level_register_debugfs("wimax_dl_", op_msg, dentry); | |
29 | d_level_register_debugfs("wimax_dl_", op_reset, dentry); | |
30 | d_level_register_debugfs("wimax_dl_", op_rfkill, dentry); | |
31 | d_level_register_debugfs("wimax_dl_", op_state_get, dentry); | |
32 | d_level_register_debugfs("wimax_dl_", stack, dentry); | |
617209cc IPG |
33 | } |
34 | ||
35 | void wimax_debugfs_rm(struct wimax_dev *wimax_dev) | |
36 | { | |
37 | debugfs_remove_recursive(wimax_dev->debugfs_dentry); | |
38 | } |