net: wireless: Skip connect warning for CONFIG_CFG80211_ALLOW_RECONNECT

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt
2011-10-28 10:35:37 -07:00
committed by Arve Hjønnevåg
parent 5b485bf6b9
commit a513dd43e6

View File

@@ -790,9 +790,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;
}