diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2011-12-02 13:53:53 +0800 |
|---|---|---|
| committer | Andy Green <andy.green@linaro.org> | 2011-12-02 13:53:53 +0800 |
| commit | 9f9facc51e86281f7e1e5f113e3af6485c567f06 (patch) | |
| tree | 91761a27c289975f97a32c7f5a1d6895ce3c7d0c /net | |
| parent | ac2fb347fa416a50f8d04a0b9fadb14b1be6d6ab (diff) | |
net: wireless: Add CFG80211_ALLOW_RECONNECT option
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/wireless/Kconfig | 11 | ||||
| -rw-r--r-- | net/wireless/sme.c | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/net/wireless/Kconfig b/net/wireless/Kconfig index 1f1ef70f34f..8e2a668c923 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 0acfdc9beac..9541631e66b 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -766,8 +766,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); |
