cfg80211: fix netdev down problem
[pandora-kernel.git] / net / wireless / core.c
index 5f6a832..83ec719 100644 (file)
@@ -567,9 +567,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
 #endif
                break;
        case NETDEV_GOING_DOWN:
-               if (!wdev->ssid_len)
-                       break;
-
                switch (wdev->iftype) {
                case NL80211_IFTYPE_ADHOC:
                        cfg80211_leave_ibss(rdev, dev, true);
@@ -583,15 +580,12 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
 #endif
                        cfg80211_disconnect(rdev, dev,
                                            WLAN_REASON_DEAUTH_LEAVING, true);
+                       cfg80211_mlme_down(rdev, dev);
                        break;
                default:
                        break;
                }
                break;
-       case NETDEV_DOWN:
-               kfree(wdev->conn);
-               wdev->conn = NULL;
-               break;
        case NETDEV_UP:
 #ifdef CONFIG_WIRELESS_EXT
                switch (wdev->iftype) {