ieee802154: register a device type for the wpan dev
Subsystems (3)
PATCH v2 1/1 ieee802154: register a device type for the wpan dev
cfg802154 never assigns a device type to wpan interfaces, so their netdev uevent carries no DEVTYPE key. Mirror cfg80211, which calls SET_NETDEV_DEVTYPE() from a NETDEV_POST_INIT case, and set a new wpan_dev_type so the device is typed DEVTYPE=wpan.
---
v1: https://lore.kernel.org/linux-wpan/[email protected]/T/
Changes since v1:
- Drop WARN_ON patch as it was a dead check.
net/ieee802154/core.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
net/ieee802154/core.c +7 -1
@@ -272,6 +272,10 @@ void cfg802154_dev_free(struct cfg802154_registered_device *rdev)kfree (rdev); } +static const struct device_type wpan_dev_type = { + .name ="wpan" , +}; +static void cfg802154_update_iface_num (struct cfg802154_registered_device *rdev,int iftype,int num)
@@ -296,7 +300,9 @@ static int cfg802154_netdev_notifier_call(struct notifier_block *nb,/* TODO WARN_ON unspec type */ switch (state) { -/* TODO NETDEV_DEVTYPE */ +case NETDEV_POST_INIT : +SET_NETDEV_DEVTYPE (dev, &wpan_dev_type); +break ;case NETDEV_REGISTER : dev->netns_immutable = true; wpan_dev->identifier = ++rdev->wpan_dev_id;
Signature · 1 line
2.51.0
Miquel Raynal
maintainerHi Adriano,
Quoted 7 lines · Adriano Cordova
cfg802154 never assigns a device type to wpan interfaces, so their netdev uevent carries no DEVTYPE key. Mirror cfg80211, which calls
SET_NETDEV_DEVTYPE()from aNETDEV_POST_INITcase, and set a newwpan_dev_typeso the device is typed DEVTYPE=wpan.Signed-off-by Adriano Cordova <[email protected]>---
Diff is identical, why didn't you kept my Rb?
Adriano Córdova
Reviewed-by Miquel RaynalQuoted 21 lines · Adriano Córdova
Hi Miquel,
I reworded the commit message and dropped it by mistake
Quoted 15 lines · Miquel Raynal
Hi Adriano,
Quoted 7 lines · Adriano Cordova
cfg802154 never assigns a device type to wpan interfaces, so their netdev uevent carries no DEVTYPE key. Mirror cfg80211, which calls
SET_NETDEV_DEVTYPE()from aNETDEV_POST_INITcase, and set a newwpan_dev_typeso the device is typed DEVTYPE=wpan.Signed-off-by Adriano Cordova <[email protected]>---
Diff is identical, why didn't you kept my Rb?
Hello Adriano Cordova.
Quoted 6 lines · Adriano Cordova
cfg802154 never assigns a device type to wpan interfaces, so their netdev uevent carries no DEVTYPE key. Mirror cfg80211, which calls
SET_NETDEV_DEVTYPE()from aNETDEV_POST_INITcase, and set a newwpan_dev_typeso the device is typed DEVTYPE=wpan.
Applied to wpan/wpan.git, thanks!
[1/1] ieee802154: register a device type for the wpan dev
https://git.kernel.org/wpan/wpan/c/1e277fce233c
regards,
Stefan Schmidt