diff options
| author | Agrawal Ashish <ashishka@qti.qualcomm.com> | 2016-03-17 12:30:23 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-03-18 15:39:24 +0530 |
| commit | d8667ee59c9c9b70d000bb238dd39a5c75eb189f (patch) | |
| tree | 295b820b15d080b61d4976efa7d7c5a94e0e6c41 | |
| parent | 9b55a0dd7c6b2cce7be0ccdbe8cc041b6a910bd7 (diff) | |
qcacld-2.0: Don't return max connection error before doing disconnect
prima to qcacld-2.0 propagation
In some cases, it is possible that driver get request for connection
from supplicant without getting disconnect for previous connection.
If there are two active session, driver will return the error.
Driver should do disconnect first followed by check for
max concurrency is allowed.
Change-Id: Ie7bf202c47d0282019730448096d91c7dc888e34
CRs-Fixed: 945566
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_cfg80211.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c index 31feea930748..9f9c05668cf9 100644 --- a/CORE/HDD/src/wlan_hdd_cfg80211.c +++ b/CORE/HDD/src/wlan_hdd_cfg80211.c @@ -17940,11 +17940,6 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy, if (0 != status) return status; - if (vos_max_concurrent_connections_reached()) { - hddLog(VOS_TRACE_LEVEL_ERROR, FL("Reached max concurrent connections")); - return -ECONNREFUSED; - } - #if defined(FEATURE_WLAN_LFR) && defined(WLAN_FEATURE_ROAM_SCAN_OFFLOAD) wlan_hdd_disable_roaming(pAdapter); #endif @@ -17967,6 +17962,12 @@ static int __wlan_hdd_cfg80211_connect( struct wiphy *wiphy, return -EALREADY; } + /* Check for max concurrent connections after doing disconnect if any */ + if (vos_max_concurrent_connections_reached()) { + hddLog(VOS_TRACE_LEVEL_ERROR, FL("Reached max concurrent connections")); + return -ECONNREFUSED; + } + /*initialise security parameters*/ status = wlan_hdd_cfg80211_set_privacy(pAdapter, req); |
