Skip to content

Commit c4dd747

Browse files
alexaringholtmann
authored andcommitted
ieee802154: change wpan-phy name to phy
Currently the wpan_phy under /sys/class/ieee802154/ is named as "wpan-phy#", this patch will change the name to phy. This will introduce the same naming convention like wireless. Note: wpan-tools users will not type "wpan-phy#" anymore, just a simple "phy#" is enough. Signed-off-by: Alexander Aring <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 965e613 commit c4dd747

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

net/ieee802154/core.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
#include "sysfs.h"
2626
#include "core.h"
2727

28+
/* name for sysfs, %d is appended */
29+
#define PHY_NAME "phy"
30+
2831
/* RCU-protected (and RTNL for writers) */
2932
LIST_HEAD(cfg802154_rdev_list);
3033
int cfg802154_rdev_list_generation;
@@ -122,7 +125,7 @@ wpan_phy_new(const struct cfg802154_ops *ops, size_t priv_size)
122125

123126
INIT_LIST_HEAD(&rdev->wpan_dev_list);
124127
device_initialize(&rdev->wpan_phy.dev);
125-
dev_set_name(&rdev->wpan_phy.dev, "wpan-phy%d", rdev->wpan_phy_idx);
128+
dev_set_name(&rdev->wpan_phy.dev, PHY_NAME "%d", rdev->wpan_phy_idx);
126129

127130
rdev->wpan_phy.dev.class = &wpan_phy_class;
128131
rdev->wpan_phy.dev.platform_data = rdev;

0 commit comments

Comments
 (0)