Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
[cascardo/linux.git] / net / wireless / core.c
index 7645e97..4911cd9 100644 (file)
@@ -906,6 +906,8 @@ void cfg80211_unregister_wdev(struct wireless_dev *wdev)
        if (WARN_ON(wdev->netdev))
                return;
 
+       nl80211_notify_iface(rdev, wdev, NL80211_CMD_DEL_INTERFACE);
+
        list_del_rcu(&wdev->list);
        rdev->devlist_generation++;
 
@@ -1079,6 +1081,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
                     wdev->iftype == NL80211_IFTYPE_P2P_CLIENT ||
                     wdev->iftype == NL80211_IFTYPE_ADHOC) && !wdev->use_4addr)
                        dev->priv_flags |= IFF_DONT_BRIDGE;
+
+               nl80211_notify_iface(rdev, wdev, NL80211_CMD_NEW_INTERFACE);
                break;
        case NETDEV_GOING_DOWN:
                cfg80211_leave(rdev, wdev);
@@ -1157,6 +1161,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb,
                 * remove and clean it up.
                 */
                if (!list_empty(&wdev->list)) {
+                       nl80211_notify_iface(rdev, wdev,
+                                            NL80211_CMD_DEL_INTERFACE);
                        sysfs_remove_link(&dev->dev.kobj, "phy80211");
                        list_del_rcu(&wdev->list);
                        rdev->devlist_generation++;
@@ -1246,7 +1252,7 @@ static int __init cfg80211_init(void)
        if (err)
                goto out_fail_reg;
 
-       cfg80211_wq = create_singlethread_workqueue("cfg80211");
+       cfg80211_wq = alloc_ordered_workqueue("cfg80211", WQ_MEM_RECLAIM);
        if (!cfg80211_wq) {
                err = -ENOMEM;
                goto out_fail_wq;