summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2021-04-07 09:40:51 +0300
committerDavid S. Miller <davem@davemloft.net>2021-04-08 00:43:28 +0300
commit0854fa82c96ca37a35e954b7079c0bfd795affb1 (patch)
tree96b3d6b64f4c2a025ca938636d419b62df120330 /net/wireless/core.c
parent7e4a51319d3a71ac8002c96f817bcbeb36789b07 (diff)
downloadlinux-0854fa82c96ca37a35e954b7079c0bfd795affb1.tar.xz
net: remove the new_ifindex argument from dev_change_net_namespace
Here is only one place where we want to specify new_ifindex. In all other cases, callers pass 0 as new_ifindex. It looks reasonable to add a low-level function with new_ifindex and to convert dev_change_net_namespace to a static inline wrapper. Fixes: eeb85a14ee34 ("net: Allow to specify ifindex when device is moved to another namespace") Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Andrei Vagin <avagin@gmail.com> Acked-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index fabb677b7d58..a2785379df6e 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -165,7 +165,7 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
if (!wdev->netdev)
continue;
wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL;
- err = dev_change_net_namespace(wdev->netdev, net, "wlan%d", 0);
+ err = dev_change_net_namespace(wdev->netdev, net, "wlan%d");
if (err)
break;
wdev->netdev->features |= NETIF_F_NETNS_LOCAL;
@@ -182,7 +182,7 @@ int cfg80211_switch_netns(struct cfg80211_registered_device *rdev,
continue;
wdev->netdev->features &= ~NETIF_F_NETNS_LOCAL;
err = dev_change_net_namespace(wdev->netdev, net,
- "wlan%d", 0);
+ "wlan%d");
WARN_ON(err);
wdev->netdev->features |= NETIF_F_NETNS_LOCAL;
}