6lowpan: change naming for lowpan private data
This patch changes the naming for interface private data for lowpan
intefaces. The current private data scheme is:
-------------------------------------------------
| 6LoWPAN Generic | LinkLayer 6LoWPAN |
-------------------------------------------------
the current naming schemes are:
- 6LoWPAN Generic:
- lowpan_priv
- LinkLayer 6LoWPAN:
- BTLE
- lowpan_dev
- 802.15.4:
- lowpan_dev_info
the new naming scheme with this patch will be:
- 6LoWPAN Generic:
- lowpan_dev
- LinkLayer 6LoWPAN:
- BTLE
- lowpan_btle_dev
- 802.15.4:
- lowpan_802154_dev
Signed-off-by: Alexander Aring <aar@pengutronix.de>
Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
committed by
Marcel Holtmann
parent
5a7f97e570
commit
2e4d60cbcf
@@ -172,7 +172,7 @@ static const struct file_operations lowpan_ctx_pfx_fops = {
|
||||
static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
|
||||
struct dentry *ctx, u8 id)
|
||||
{
|
||||
struct lowpan_priv *lpriv = lowpan_priv(dev);
|
||||
struct lowpan_dev *ldev = lowpan_dev(dev);
|
||||
struct dentry *dentry, *root;
|
||||
char buf[32];
|
||||
|
||||
@@ -185,25 +185,25 @@ static int lowpan_dev_debugfs_ctx_init(struct net_device *dev,
|
||||
return -EINVAL;
|
||||
|
||||
dentry = debugfs_create_file("active", 0644, root,
|
||||
&lpriv->ctx.table[id],
|
||||
&ldev->ctx.table[id],
|
||||
&lowpan_ctx_flag_active_fops);
|
||||
if (!dentry)
|
||||
return -EINVAL;
|
||||
|
||||
dentry = debugfs_create_file("compression", 0644, root,
|
||||
&lpriv->ctx.table[id],
|
||||
&ldev->ctx.table[id],
|
||||
&lowpan_ctx_flag_c_fops);
|
||||
if (!dentry)
|
||||
return -EINVAL;
|
||||
|
||||
dentry = debugfs_create_file("prefix", 0644, root,
|
||||
&lpriv->ctx.table[id],
|
||||
&ldev->ctx.table[id],
|
||||
&lowpan_ctx_pfx_fops);
|
||||
if (!dentry)
|
||||
return -EINVAL;
|
||||
|
||||
dentry = debugfs_create_file("prefix_len", 0644, root,
|
||||
&lpriv->ctx.table[id],
|
||||
&ldev->ctx.table[id],
|
||||
&lowpan_ctx_plen_fops);
|
||||
if (!dentry)
|
||||
return -EINVAL;
|
||||
@@ -247,21 +247,21 @@ static const struct file_operations lowpan_context_fops = {
|
||||
|
||||
int lowpan_dev_debugfs_init(struct net_device *dev)
|
||||
{
|
||||
struct lowpan_priv *lpriv = lowpan_priv(dev);
|
||||
struct lowpan_dev *ldev = lowpan_dev(dev);
|
||||
struct dentry *contexts, *dentry;
|
||||
int ret, i;
|
||||
|
||||
/* creating the root */
|
||||
lpriv->iface_debugfs = debugfs_create_dir(dev->name, lowpan_debugfs);
|
||||
if (!lpriv->iface_debugfs)
|
||||
ldev->iface_debugfs = debugfs_create_dir(dev->name, lowpan_debugfs);
|
||||
if (!ldev->iface_debugfs)
|
||||
goto fail;
|
||||
|
||||
contexts = debugfs_create_dir("contexts", lpriv->iface_debugfs);
|
||||
contexts = debugfs_create_dir("contexts", ldev->iface_debugfs);
|
||||
if (!contexts)
|
||||
goto remove_root;
|
||||
|
||||
dentry = debugfs_create_file("show", 0644, contexts,
|
||||
&lowpan_priv(dev)->ctx,
|
||||
&lowpan_dev(dev)->ctx,
|
||||
&lowpan_context_fops);
|
||||
if (!dentry)
|
||||
goto remove_root;
|
||||
@@ -282,7 +282,7 @@ fail:
|
||||
|
||||
void lowpan_dev_debugfs_exit(struct net_device *dev)
|
||||
{
|
||||
debugfs_remove_recursive(lowpan_priv(dev)->iface_debugfs);
|
||||
debugfs_remove_recursive(lowpan_dev(dev)->iface_debugfs);
|
||||
}
|
||||
|
||||
int __init lowpan_debugfs_init(void)
|
||||
|
||||
Reference in New Issue
Block a user