net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT
Dmitry Shmidt [Fri, 28 Oct 2011 17:35:37 +0000 (10:35 -0700)]
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

net/wireless/sme.c

index b206cf6..c0fe1a8 100644 (file)
@@ -765,9 +765,11 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev,
 #ifndef CONFIG_CFG80211_ALLOW_RECONNECT
        if (wdev->sme_state != CFG80211_SME_IDLE)
                return -EALREADY;
-#endif
 
        if (WARN_ON(wdev->connect_keys)) {
+#else
+       if (wdev->connect_keys) {
+#endif
                kfree(wdev->connect_keys);
                wdev->connect_keys = NULL;
        }