]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
wwan: core: Fix missing RTM_NEWLINK event for default link
authorLoic Poulain <loic.poulain@linaro.org>
Thu, 22 Jul 2021 18:21:05 +0000 (20:21 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 23 Jul 2021 16:14:00 +0000 (17:14 +0100)
A wwan link created via the wwan_create_default_link procedure is
never notified to the user (RTM_NEWLINK), causing issues with user
tools relying on such event to track network links (NetworkManager).

This is because the procedure misses a call to rtnl_configure_link(),
which sets the link as initialized and notifies the new link (cf
proper usage in __rtnl_newlink()).

Cc: stable@vger.kernel.org
Fixes: ca374290aaad ("wwan: core: support default netdev creation")
Suggested-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Acked-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/wwan_core.c

index 3e16c318e705ab3540dfd93205aca0d994b1820b..674a81d79db3efffa522c964a2ab75c8655d368f 100644 (file)
@@ -984,6 +984,8 @@ static void wwan_create_default_link(struct wwan_device *wwandev,
                goto unlock;
        }
 
+       rtnl_configure_link(dev, NULL); /* Link initialized, notify new link */
+
 unlock:
        rtnl_unlock();