summaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2018-10-01 15:18:31 +0300
committerJohannes Berg <johannes.berg@intel.com>2018-10-02 10:58:57 +0300
commitec8f170bc33ec5933e139a78ead286ecec1ea56b (patch)
treec3b0ec57d6118c3ce6748426b765812efc400370 /net/wireless/core.c
parent85dd3da43dd59b9220d9cba4f933a3dc0ea6faa5 (diff)
downloadlinux-ec8f170bc33ec5933e139a78ead286ecec1ea56b.tar.xz
cfg80211: unify sending NL80211_CMD_NEW_INTERFACE
There isn't really any need for us to be sending this from two different places - move cfg80211_init_wdev() later and send the notification from there, removing it from the non- netdev case. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index ba6363db1f31..5bd01058b9e6 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -1186,6 +1186,8 @@ void cfg80211_init_wdev(struct cfg80211_registered_device *rdev,
wdev->identifier = ++rdev->wdev_id;
list_add_rcu(&wdev->list, &rdev->wiphy.wdev_list);
rdev->devlist_generation++;
+
+ nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE);
}
static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
@@ -1213,7 +1215,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
* called within code protected by it when interfaces
* are added with nl80211.
*/
- cfg80211_init_wdev(rdev, wdev);
/* can only change netns with wiphy */
dev->features |= NETIF_F_NETNS_LOCAL;
@@ -1242,7 +1243,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
INIT_WORK(&wdev->disconnect_wk, cfg80211_autodisconnect_wk);
- nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE);
+ cfg80211_init_wdev(rdev, wdev);
break;
case NETDEV_GOING_DOWN:
cfg80211_leave(rdev, wdev);