From: Dmitry Shmidt Date: Thu, 15 Sep 2011 16:22:35 +0000 (-0700) Subject: net: wireless: Add CFG80211_ALLOW_RECONNECT option X-Git-Tag: firefly_0821_release~7613^2~308 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f6ec523a13789bed3a752fbe5ae56021032903fd;p=firefly-linux-kernel-4.4.55.git net: wireless: Add CFG80211_ALLOW_RECONNECT option Signed-off-by: Dmitry Shmidt --- diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig index 1f1ef70f34f2..8e2a668c9230 100644 --- a/net/wireless/Kconfig +++ b/net/wireless/Kconfig @@ -159,3 +159,14 @@ config LIB80211_DEBUG from lib80211. If unsure, say N. + +config CFG80211_ALLOW_RECONNECT + bool "Allow reconnect while already connected" + depends on CFG80211 + default n + help + cfg80211 stack doesn't allow to connect if you are already + connected. This option allows to make a connection in this case. + + Select this option ONLY for wlan drivers that are specifically + built for such purposes. diff --git a/net/wireless/sme.c b/net/wireless/sme.c index b7b6ff8be553..f8d266a2e305 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -758,8 +758,10 @@ int __cfg80211_connect(struct cfg80211_registered_device *rdev, ASSERT_WDEV_LOCK(wdev); +#ifndef CONFIG_CFG80211_ALLOW_RECONNECT if (wdev->sme_state != CFG80211_SME_IDLE) return -EALREADY; +#endif if (WARN_ON(wdev->connect_keys)) { kfree(wdev->connect_keys);