diff options
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index b7b6ff8be55..cf4be21236b 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c | |||
@@ -659,8 +659,10 @@ void __cfg80211_disconnected(struct net_device *dev, const u8 *ie, | |||
659 | wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)) | 659 | wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)) |
660 | return; | 660 | return; |
661 | 661 | ||
662 | #ifndef CONFIG_CFG80211_ALLOW_RECONNECT | ||
662 | if (wdev->sme_state != CFG80211_SME_CONNECTED) | 663 | if (wdev->sme_state != CFG80211_SME_CONNECTED) |
663 | return; | 664 | return; |
665 | #endif | ||
664 | 666 | ||
665 | if (wdev->current_bss) { | 667 | if (wdev->current_bss) { |
666 | cfg80211_unhold_bss(wdev->current_bss); | 668 | cfg80211_unhold_bss(wdev->current_bss); |
@@ -758,10 +760,14 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev, | |||
758 | 760 | ||
759 | ASSERT_WDEV_LOCK(wdev); | 761 | ASSERT_WDEV_LOCK(wdev); |
760 | 762 | ||
763 | #ifndef CONFIG_CFG80211_ALLOW_RECONNECT | ||
761 | if (wdev->sme_state != CFG80211_SME_IDLE) | 764 | if (wdev->sme_state != CFG80211_SME_IDLE) |
762 | return -EALREADY; | 765 | return -EALREADY; |
763 | 766 | ||
764 | if (WARN_ON(wdev->connect_keys)) { | 767 | if (WARN_ON(wdev->connect_keys)) { |
768 | #else | ||
769 | if (wdev->connect_keys) { | ||
770 | #endif | ||
765 | kfree(wdev->connect_keys); | 771 | kfree(wdev->connect_keys); |
766 | wdev->connect_keys = NULL; | 772 | wdev->connect_keys = NULL; |
767 | } | 773 | } |