[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1626968964-17249-1-git-send-email-loic.poulain@linaro.org>
Date: Thu, 22 Jul 2021 17:49:24 +0200
From: Loic Poulain <loic.poulain@...aro.org>
To: davem@...emloft.net, johannes@...solutions.net,
ryazanov.s.a@...il.com
Cc: netdev@...r.kernel.org, Loic Poulain <loic.poulain@...aro.org>,
stable@...r.kernel.org
Subject: [PATCH] wwan: core: Fix missing RTM_NEWLINK event
By default there is no rtnetlink event generated when registering a
netdev with rtnl_link_ops until its rtnl_link_state is switched to
initialized (RTNL_LINK_INITIALIZED). This causes issues with user
tools like NetworkManager which relies on such event to manage links.
Fix that by setting link to initialized (via rtnl_configure_link).
Cc: stable@...r.kernel.org
Fixes: 88b710532e53 ("wwan: add interface creation support")
Signed-off-by: Loic Poulain <loic.poulain@...aro.org>
---
drivers/net/wwan/wwan_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/wwan/wwan_core.c b/drivers/net/wwan/wwan_core.c
index 3e16c31..409caf4 100644
--- a/drivers/net/wwan/wwan_core.c
+++ b/drivers/net/wwan/wwan_core.c
@@ -866,6 +866,10 @@ static int wwan_rtnl_newlink(struct net *src_net, struct net_device *dev,
else
ret = register_netdevice(dev);
+ /* Link initialized, notify new link */
+ if (!ret)
+ rtnl_configure_link(dev, NULL);
+
out:
/* release the reference */
put_device(&wwandev->dev);
--
2.7.4
Powered by blists - more mailing lists