net: wireless: Fix CFG80211_ALLOW_RECONNECT option for disconnect
Dmitry Shmidt [Tue, 18 Oct 2011 19:30:02 +0000 (12:30 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

net/wireless/sme.c

index a346241..b206cf6 100644 (file)
@@ -661,8 +661,10 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie,
                    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT))
                return;
 
+#ifndef CONFIG_CFG80211_ALLOW_RECONNECT
        if (wdev->sme_state != CFG80211_SME_CONNECTED)
                return;
+#endif
 
        if (wdev->current_bss) {
                cfg80211_unhold_bss(wdev->current_bss);