Netdev List
 help / color / mirror / Atom feed
* [PATCH v2] ieee802154: register a device type for the wpan dev
@ 2026-09-08 20:35 Adriano Cordova
  2026-09-09  7:52 ` Miquel Raynal
  0 siblings, 1 reply; 3+ messages in thread
From: Adriano Cordova @ 2026-09-08 20:35 UTC (permalink / raw)
  To: Alexander Aring, Stefan Schmidt, Miquel Raynal
  Cc: linux-wpan, netdev, 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 a NETDEV_POST_INIT case, and set a new
wpan_dev_type so the device is typed DEVTYPE=wpan.

Signed-off-by: Adriano Cordova <adrianox@gmail.com>
---
v1: https://lore.kernel.org/linux-wpan/178889163770.219967.16467487407776248344@kernel.org/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(-)

diff --git a/net/ieee802154/core.c b/net/ieee802154/core.c
index c0b8712018a1..c6213412d291 100644
--- a/net/ieee802154/core.c
+++ b/net/ieee802154/core.c
@@ -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;
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ieee802154: register a device type for the wpan dev
  2026-09-08 20:35 [PATCH v2] ieee802154: register a device type for the wpan dev Adriano Cordova
@ 2026-09-09  7:52 ` Miquel Raynal
       [not found]   ` <CAMGU2hX9GSFUqZZCx6j8wRbSCSi92bn24XmxNOXLoNc8iYqViA@mail.gmail.com>
  0 siblings, 1 reply; 3+ messages in thread
From: Miquel Raynal @ 2026-09-09  7:52 UTC (permalink / raw)
  To: Adriano Cordova; +Cc: Alexander Aring, Stefan Schmidt, linux-wpan, netdev

Hi Adriano,

On 08/09/2026 at 17:35:33 -03, Adriano Cordova <adrianox@gmail.com> wrote:

> 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.
>
> Signed-off-by: Adriano Cordova <adrianox@gmail.com>
> ---

Diff is identical, why didn't you kept my Rb?


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] ieee802154: register a device type for the wpan dev
       [not found]   ` <CAMGU2hX9GSFUqZZCx6j8wRbSCSi92bn24XmxNOXLoNc8iYqViA@mail.gmail.com>
@ 2026-09-09 15:16     ` Adriano Córdova
  0 siblings, 0 replies; 3+ messages in thread
From: Adriano Córdova @ 2026-09-09 15:16 UTC (permalink / raw)
  To: Miquel Raynal; +Cc: Alexander Aring, Stefan Schmidt, linux-wpan, netdev

Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>

El mié, 9 sept 2026 a las 7:06, Adriano Córdova (<adrianox@gmail.com>) escribió:
>
> Hi Miquel,
>
> I reworded the commit message and dropped it by mistake
>
> El mié, 9 sept 2026, 04:52, Miquel Raynal <miquel.raynal@bootlin.com> escribió:
>>
>> Hi Adriano,
>>
>> On 08/09/2026 at 17:35:33 -03, Adriano Cordova <adrianox@gmail.com> wrote:
>>
>> > 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.
>> >
>> > Signed-off-by: Adriano Cordova <adrianox@gmail.com>
>> > ---
>>
>> Diff is identical, why didn't you kept my Rb?
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-09 15:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-08 20:35 [PATCH v2] ieee802154: register a device type for the wpan dev Adriano Cordova
2026-09-09  7:52 ` Miquel Raynal
     [not found]   ` <CAMGU2hX9GSFUqZZCx6j8wRbSCSi92bn24XmxNOXLoNc8iYqViA@mail.gmail.com>
2026-09-09 15:16     ` Adriano Córdova

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox