net: wireless: Add CFG80211_ALLOW_RECONNECT option

Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
This commit is contained in:
Dmitry Shmidt 2011-09-15 09:22:35 -07:00 committed by Colin Cross
parent 998ba94954
commit c6a6a521e9
2 changed files with 13 additions and 0 deletions

View file

@ -160,3 +160,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.

View file

@ -767,8 +767,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);