diff options
| author | Abhishek Singh <absingh@codeaurora.org> | 2016-08-24 13:35:22 +0530 |
|---|---|---|
| committer | Anjaneedevi Kapparapu <akappa@codeaurora.org> | 2016-09-12 13:43:30 +0530 |
| commit | a1447e5a3fe370befe5622669c5e3033e191c53d (patch) | |
| tree | d2707fdde85fe14b9dbb3b61cc22a8149a22e129 | |
| parent | e78d11b69d5ca68a88535de943df07bbc707310a (diff) | |
qcacld-2.0: Disconnect the session if the connect channel is not valid
prima to qcacld-2.0 propagation
If reg domain changes during connection and the connecting channel
is not valid, driver may connect to an invalid channel.
In this case wlan_hdd_cfg80211_update_bss_db will return NULL and
thus sta will not be registered to TL. This will cause RX frames
buffered in TL layer and eventually low resource condition.
To avoid this schedule a disconnect for the session if
wlan_hdd_cfg80211_update_bss_db returns NULL.
Change-Id: I72b62ea7d47f53db55daea5725fa833fd1a45fb8
CRs-Fixed: 1034569
| -rw-r--r-- | CORE/HDD/src/wlan_hdd_assoc.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c index 6e7898bd7e57..02abb088ca42 100644 --- a/CORE/HDD/src/wlan_hdd_assoc.c +++ b/CORE/HDD/src/wlan_hdd_assoc.c @@ -1874,10 +1874,24 @@ static eHalStatus hdd_AssociationCompletionHandler( hdd_adapter_t *pAdapter, tCs /* add bss_id to cfg80211 data base */ bss = wlan_hdd_cfg80211_update_bss_db(pAdapter, pRoamInfo); if (NULL == bss) { - pr_err("wlan: Not able to create BSS entry\n"); + hddLog(LOGE, + FL("Not able to add BSS entry")); wlan_hdd_netif_queue_control(pAdapter, WLAN_NETIF_CARRIER_OFF, WLAN_CONTROL_PATH); + if (!hddDisconInProgress) { + /* + * Here driver was not able to add bss in cfg80211 database + * this can happen if connected channel is not valid, + * i.e reg domain was changed during connection. + * Queue disconnect for the session if disconnect is + * not in progress. + */ + hddLog(LOGE, FL("Disconnecting...")); + sme_RoamDisconnect( WLAN_HDD_GET_HAL_CTX(pAdapter), + pAdapter->sessionId, + eCSR_DISCONNECT_REASON_UNSPECIFIED); + } return eHAL_STATUS_FAILURE; } #ifdef WLAN_FEATURE_VOWIFI_11R |
